Posted: Fri Aug 11, 2006 3:55 pm
Yes, it's correct.
My AC's output is the same.asif_rahman0 wrote:Please check my Input/Output:
Is it OK?
Try:asif_rahman0 wrote:Then why i am getting wa again and again?? here is my code:
Code: Select all
10
A
B
C
D
E
F
G
H
I
J
3
I E
E A
J B
Code: Select all
Case #1: Dilbert should drink beverages in this order: C D F G H I E A J B.
If nothing helps to get AC, just post it here again...asif_rahman0 wrote:now i changed my code. And Still WA.
ivan.cu wrote:What is teh correct output for
3
a
b
c
1
a c
a b c or b a c or a c b?
Code: Select all
Case #1: Dilbert should drink beverages in this order: a b c.
If still getting WA you can post your code here. If I'll have time I'll try to find some I/O your code outputs wrong answer for.ivan.cu wrote:Thank, i don't understand why i have a WA, it's a simple topological sort, i decide the tie for input order and ignore multiple edge. Some one see my error?
Code: Select all
Code was remove, thank to all people that help me whit this problem.
Your code seems working... and I wasn't able to find any I/O it's not working on neither by hand nor by random generator.ivan.cu wrote:Code: Select all
//import java.io.FileInputStream; //import java.io.FileNotFoundException; ...
Code: Select all
g.addEdge(Consola.readWord(), Consola.readWord());
Code: Select all
String ss = Consola.readWord();
String dd = Consola.readWord();
g.addEdge(ss, dd);
Code: Select all
g.addEdge(Consola.readWord(), Consola.readWord());
Code: Select all
String ss = Consola.readWord();
String dd = Consola.readWord();
g.addEdge(ss, dd);