ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1004. Sightseeing Trip

WA1 - is important order path?
Posted by Wojciech Wawrzyniak 18 Feb 2005 20:41
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
Posted by Wojciech Wawrzyniak 20 Feb 2005 02:53
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?
Posted by The Big Bad Wolf (Cristina Stancu-Mara) 9 Mar 2005 14:50
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?
Posted by Superthinker 13 Mar 2005 19:20
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?
Posted by Wojciech Wawrzyniak 5 Apr 2005 20:29
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?
Posted by Sasko Vuckov 1 Feb 2007 17:45
WA1 - is important order path?
- NO
Re: WA1 - is important order path?
Posted by .Net, Java - any pcode sucks 21 Apr 2007 02:46
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?
Posted by Smielov Valery 4 May 2007 00:20
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?
Posted by Fessmax 6 Mar 2009 21:37
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?
Posted by Kwc-Oliver 5 Jun 2010 15:18
Thank you very much!!The answer is too long,I have to use
 ansistring in pascal.

But unfortunately I was wrong agian.