Why WA ?
http://ideone.com/yp6ghp
12488 - Start Grid
Moderator: Board moderators
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 12488 - Start Grid (WA)
Input:
AC output: 10
Code: Select all
5
1 2 3 4 5
5 4 3 2 1
Check input and AC output for thousands of problems on uDebug!
Re: 12488 - Start Grid (WA)
Here's some input / output that I found useful during testing / debugging.
Input:
AC Output:
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
Code: Select all
0
1
98
Re: 12488 - Start Grid
Hi Vinit,
Could you please check the second test case you posted?
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
Could you please check the second test case you posted?
Code: Select all
2
12 1
1 12
Best regards,
Camilo