12488 - Start Grid

All about problems in Volume 124. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
cyberdragon
New poster
Posts: 20
Joined: Fri Aug 30, 2013 5:42 am

12488 - Start Grid

Post by cyberdragon »

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

Re: 12488 - Start Grid (WA)

Post by brianfry713 »

Input:

Code: Select all

5
1 2 3 4 5
5 4 3 2 1
AC output: 10
Check input and AC output for thousands of problems on uDebug!
uDebug
A great helper
Posts: 475
Joined: Tue Jul 24, 2012 4:23 pm

Re: 12488 - Start Grid (WA)

Post by uDebug »

Here's some input / output that I found useful during testing / debugging.

Input:

Code: Select all

2
1 2
1 2
2
12 1
1 12
24
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
10 1 24 3 23 4 6 9 11 13 14 15 16 7 8 17 12 18 19 5 20 21 22 2
AC Output:

Code: Select all

0
1
98
Check input and AC output for over 7,500 problems on uDebug!

Find us on Facebook. Follow us on Twitter.
hquilo
New poster
Posts: 13
Joined: Fri May 02, 2014 9:45 pm

Re: 12488 - Start Grid

Post by hquilo »

Hi Vinit,

Could you please check the second test case you posted?

Code: Select all

2
12 1
1 12
It does not conform to the input description: "Each competitor is identified by a number from 1 to N." In this case, 12 is not a valid competitor identifier (it should be 2 instead of 12).

Best regards,


Camilo
Post Reply

Return to “Volume 124 (12400-12499)”