WA1 - is important order path?
I have got many WA but I'don't know why .. I test my program and compare output test with CEOI1999 and have only one difference .. My find sometimes no the same path. not for example 23 54 56 34 but 56 34 23 54 ... this can be reason for WA?
No subject
I was change my program and i get the same results that OUT in CEIO1999 test any one can help me same advise?.
Re: WA1 - is important order path?
it's important the path..
in this problem you have to output the crossing points of the shortest sightseeing in the order how to pass them.
for your example if the route is 23 54 56 34 it's wrong to output 56 34 23 54 because you jump from a crossing point to another even if there is no road between them..
check the output for the CEOI problem with this one and see if there is any difference..
Re: WA1 - is important order path?
I don't understand.
If the input is:
---------------------
3 2
1 2 1
2 3 1
3 2
1 2 1
2 3 1
1 3 1
-1
---------------------
Isn't the output like this?
---------------------
No solution.
3 1 2
---------------------
Help, please.
Re: WA1 - is important order path?
Ok but if I have sightseeing :23 54 56 34 this is a cycle right? so 56 34 23 54 is the same cycle but it's only start from another point.
I didn't try to sending solution from one month perhaps now i'll find source of problem :)
Re: WA1 - is important order path?
WA1 - is important order path?
- NO
Re: WA1 - is important order path?
NO, the first vertex of cycle does not matter.
My program prints sample out in such way:
2 5 3 1
And I got AC
Re: WA1 - is important order path?
try to do test use this program:
var fout:text;
i:integer;
begin
assign(fout,'test1004.in'); rewrite(fout);
writeln(fout,'100 101');
writeln(fout,'1 20 20');
for i:=1 to 99 do
writeln(fout,i,' ',i+1,' 1');
writeln(fout,'100 1 1');
writeln(fout,-1) ;
close(fout);
end.
It real help me.
Re: WA1 - is important order path?
My program prints sample out:
3 5 2 1
No solution.
And I got WA test 1
Edited by author 06.03.2009 21:37
Re: WA1 - is important order path?
Thank you very much!!The answer is too long,I have to use
ansistring in pascal.
But unfortunately I was wrong agian.