11060 - Beverages
Moderator: Board moderators
-
- Experienced poster
- Posts: 209
- Joined: Sun Jan 16, 2005 6:22 pm
/*code is removed*/
Last edited by asif_rahman0 on Fri Aug 11, 2006 9:23 pm, edited 2 times in total.
-
- A great helper
- Posts: 481
- Joined: Sun Jun 19, 2005 1:18 am
- Location: European Union (Slovak Republic)
-
- A great helper
- Posts: 481
- Joined: Sun Jun 19, 2005 1:18 am
- Location: European Union (Slovak Republic)
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.
-
- Experienced poster
- Posts: 209
- Joined: Sun Jan 16, 2005 6:22 pm
-
- A great helper
- Posts: 481
- Joined: Sun Jun 19, 2005 1:18 am
- Location: European Union (Slovak Republic)
Please help me!!
What is teh correct output for
3
a
b
c
1
a c
a b c or b a c or a c b?
3
a
b
c
1
a c
a b c or b a c or a c b?
-
- A great helper
- Posts: 481
- Joined: Sun Jun 19, 2005 1:18 am
- Location: European Union (Slovak Republic)
Re: Please help me!!
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.
-
- A great helper
- Posts: 481
- Joined: Sun Jun 19, 2005 1:18 am
- Location: European Union (Slovak Republic)
Here is my WA Code
Code: Select all
Code was remove, thank to all people that help me whit this problem.
Last edited by ivan.cu on Tue Aug 15, 2006 12:30 am, edited 1 time in total.
-
- A great helper
- Posts: 481
- Joined: Sun Jun 19, 2005 1:18 am
- Location: European Union (Slovak Republic)
Re: Here is my WA Code
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; ...
Found it:
change this:
into this:
Check this thread, there are some common Java gotchas there:
http://online-judge.uva.es/board/viewtopic.php?t=3805
change this:
Code: Select all
g.addEdge(Consola.readWord(), Consola.readWord());
Code: Select all
String ss = Consola.readWord();
String dd = Consola.readWord();
g.addEdge(ss, dd);
http://online-judge.uva.es/board/viewtopic.php?t=3805
Thank Darko!!
After ages AC!!!
But i really don't understand this, can you explain to me what problem have:
it is exactly:
or not?
After ages AC!!!
But i really don't understand this, can you explain to me what problem have:
Code: Select all
g.addEdge(Consola.readWord(), Consola.readWord());
Code: Select all
String ss = Consola.readWord();
String dd = Consola.readWord();
g.addEdge(ss, dd);