## 662 - Fast Food

Moderator: Board moderators

hachi
New poster
Posts: 2
Joined: Thu Feb 27, 2014 7:10 pm

### Re: 662 - Fast Food

I get the following for the input listed above by chuzpa, but I still get a WA. Is there something wrong with my formatting or my answers? Some answers are different from others but they are still optimal.

Code: Select all

``````Chain 1
Depot 1 at restaurant 2 serves restaurants 1 to 3
Depot 2 at restaurant 5 serves restaurants 4 to 5
Depot 3 at restaurant 6 serves restaurant 6
Total distance sum = 8

Chain 2
Depot 1 at restaurant 1 serves restaurant 1
Total distance sum = 0

Chain 3
Depot 1 at restaurant 2 serves restaurants 1 to 2
Total distance sum = 10000

Chain 4
Depot 1 at restaurant 1 serves restaurant 1
Depot 2 at restaurant 2 serves restaurant 2
Depot 3 at restaurant 4 serves restaurants 3 to 4
Total distance sum = 1

Chain 5
Depot 1 at restaurant 1 serves restaurant 1
Depot 2 at restaurant 2 serves restaurant 2
Depot 3 at restaurant 3 serves restaurant 3
Total distance sum = 0

Chain 6
Depot 1 at restaurant 2 serves restaurants 1 to 2
Depot 2 at restaurant 4 serves restaurants 3 to 5
Total distance sum = 3

Chain 7
Depot 1 at restaurant 2 serves restaurants 1 to 2
Depot 2 at restaurant 4 serves restaurants 3 to 5
Total distance sum = 3

Chain 8
Depot 1 at restaurant 3 serves restaurants 1 to 5
Total distance sum = 6
``````

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### Re: 662 - Fast Food

My AC code is identical to your output. Are you printing a blank line after the last test case?
Check input and AC output for thousands of problems on uDebug!

hachi
New poster
Posts: 2
Joined: Thu Feb 27, 2014 7:10 pm

### Re: 662 - Fast Food

I've tried with the blank and without it, but it still gives a wrong answer.

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### Re: 662 - Fast Food

Post or PM me your code.
Check input and AC output for thousands of problems on uDebug!

hxlll
New poster
Posts: 2
Joined: Tue Mar 04, 2014 8:39 am

### 662 - Fast Food help me

Last edited by hxlll on Wed Mar 05, 2014 11:06 pm, edited 2 times in total.

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### Re: 662 - Fast Food help me

Output a blank line after each test case, including the last one.
Check input and AC output for thousands of problems on uDebug!

hxlll
New poster
Posts: 2
Joined: Tue Mar 04, 2014 8:39 am

### Re: 662 - Fast Food help me

yes I did

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### Re: 662 - Fast Food help me

Output a blank line after each test case, including the last one. You're printing a blank line in between test cases.
Check input and AC output for thousands of problems on uDebug!