Search found 2 matches

by svelasqu
Fri Dec 12, 2003 6:00 pm
Forum: Volume 1 (100-199)
Topic: 125 - Numbering Paths
Replies: 56
Views: 11367

the problem doesnt say how many intersections you have, so you need to find the biggest name. If it says 1 5 2 3, for instance, intersections are 0, 1, 2, 3, 4, 5. I recommend you using DFS, i tried with floyd-warsshall and I messed up, seems to be cases that doesnt handle it. I used floyd-warsshall ...
by svelasqu
Mon Dec 01, 2003 4:43 pm
Forum: Volume 1 (100-199)
Topic: 110 - Meta-Loopless Sorts
Replies: 92
Views: 16398

110: What the h.. is wrong about this answer?

this is the answer i got for 5, it's fine to me but it got WA.

program sort(input,output);
var
a,b,c,d,e : integer;
begin
readln(a,b,c,d,e);
if a < b then
if b < c then
if c < d then
if d < e then
writeln(a,b,c,d,e)
else if c < e then
writeln(a,b,c,e,d)
else if b < e then
writeln(a,b,e,c ...

Go to advanced search