402 - M*A*S*H
Moderator: Board moderators
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
I have no input for this special case, but in the description there is the line:
You are assured that Klinger's deck will get the job done by the time the 20th card is used.
This is wrong, because there must be a test case in the input the judge uses in which the number of remaining people is greater than X. If you print only X positions, you get Wrong Answer (but only since the rejudge).
You are assured that Klinger's deck will get the job done by the time the 20th card is used.
This is wrong, because there must be a test case in the input the judge uses in which the number of remaining people is greater than X. If you print only X positions, you get Wrong Answer (but only since the rejudge).
I can prove it :-)
Just to give my 2 cent as comment:
I can prove that there is such input, because I have a program which
won't be accepted if I change the abort condition of the loop
to NOT check the number of remaining cards.
Instead my program gets a segmentation fault or "Floating Point Error"
with this modification which clearly implicates that the program accesses
invalid memory, which might be the none existent cards.
so long
lundril
I can prove that there is such input, because I have a program which
won't be accepted if I change the abort condition of the loop
to NOT check the number of remaining cards.
Instead my program gets a segmentation fault or "Floating Point Error"
with this modification which clearly implicates that the program accesses
invalid memory, which might be the none existent cards.
so long
lundril
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
I have also passed this case,and the cases following
Input:
10 2 3 5 4 3 2 9 6 10 10 6 2 7 3 4 7 4 5 3 2 4
47 6 11 2 7 3 4 8 5 10 7 8 3 7 4 2 3 9 10 2 5 3
31 9 5 8 2 1 7 7 11 3 6 5 4 9 10 5 2 1 5 3 9 7
16 3 11 2 7 3 4 8 5 10 7 8 3 7 4 2 3 9 10 2 5 3
25 1 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11
Output:
Selection #1
1 8
Selection #2
1 3 16 23 31 47
Selection #3
6 8 12 14 17 21 23 26 28
Selection #4
1 3 16
Selection #5
1 2 3 4 5 6 11 19
but i still got WA,who can tell me???![:cry:](./images/smilies/icon_cry.gif)
Input:
10 2 3 5 4 3 2 9 6 10 10 6 2 7 3 4 7 4 5 3 2 4
47 6 11 2 7 3 4 8 5 10 7 8 3 7 4 2 3 9 10 2 5 3
31 9 5 8 2 1 7 7 11 3 6 5 4 9 10 5 2 1 5 3 9 7
16 3 11 2 7 3 4 8 5 10 7 8 3 7 4 2 3 9 10 2 5 3
25 1 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11
Output:
Selection #1
1 8
Selection #2
1 3 16 23 31 47
Selection #3
6 8 12 14 17 21 23 26 28
Selection #4
1 3 16
Selection #5
1 2 3 4 5 6 11 19
but i still got WA,who can tell me???
![:cry:](./images/smilies/icon_cry.gif)
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
402 - M*A*S*H
I'm not sure I understand the problem...I need a simple example to understand it...my question is this:
if we have this :
3 2 3
then 1 & 2 should be left, right?
if we have this :
3 2 3
then 1 & 2 should be left, right?