Page 1 of 4
Posted: Sun Jan 06, 2002 8:46 pm
by 10153EN
My program gets wrong answer after the rejudgement. But I don't know what's wrong with it after testing it with many special data.
Can anyone tell me what's tricky for this problem or any special cases for this problem?? thx
Posted: Sun Jan 06, 2002 9:04 pm
by Adrian Kuegel
I think, that there is one test case, in which there remain more than X persons. After the Rejudgement I had the same Problem until I changed my program, so that it printed all the remaining positions.
Posted: Sun Jan 06, 2002 9:17 pm
by 10153EN
Problem solved. thx~~
but it seems to have contradiction with the problem =(
Posted: Sun Jan 06, 2002 9:31 pm
by Adrian Kuegel
Yes, there is a contradiction to the problem.
I have written an E-Mail to the admins but got the answer, that there is not such a case, that there remain more than X people.
Posted: Sun Feb 10, 2002 9:18 pm
by chang
Hey Adrin/10153EN ,
Would u pls clarify the bug in details. I can't understand ur topic. So pls give that special input that u mentioned & the outputs that ur code gives.
Thanks in advance for ur help.
Chang
Posted: Sun Feb 10, 2002 9:35 pm
by Adrian Kuegel
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).
Posted: Mon Apr 01, 2002 4:15 pm
by Saveman
Also we can get 'wrong answer' or even 'time limit exceeded' when we will work until the number of remaining people will be == X.
I don't know why the judges says that there is no such input data!

I can prove it :-)
Posted: Thu May 16, 2002 6:20 pm
by lundril
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
Posted: Sat May 25, 2002 7:41 am
by sjn
who can tell me what is the output for
25 1 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11
Posted: Sat May 25, 2002 9:56 am
by Adrian Kuegel
Output is:
Selection #1
1 2 3 4 5 6 11 19
Posted: Sat May 25, 2002 7:10 pm
by sjn
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???

Posted: Sat May 25, 2002 10:12 pm
by Adrian Kuegel
Your output is correct, but test your program with this input (I am not sure that it is used, but I considered the case in my program):
10 11 3 5 4 3 2 9 6 10 10 6 2 7 3 4 7 4 5 3 2 4
Output:
Selection #1
1 2 3 4 5 6 7 8 9 10
Posted: Sun May 26, 2002 10:03 am
by sjn
i can also pass it

i really don't why
i use pascal language
if u know pascal,i hope u can help me with my porgram.

402 - M*A*S*H
Posted: Sun Jun 23, 2002 11:14 pm
by mido
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?
Posted: Mon Jun 24, 2002 6:34 am
by 10153EN
Sorry for interrupt, what do you mean by *left, right*?