Page 1 of 1
10968 - KuPellaKeS
Posted: Tue Nov 15, 2005 2:37 pm
by polone
It is so strange..
Code: Select all
Input consists of several test-cases. Each test-case starts with a line containing three numbers
Code: Select all
Sample Input
4 5
1 2
2 3
3 4
4 1
1 3
0 0
I can't see the picture so I assumed the first line is n,m
which n represent number of cities
and m is number of roads
I used BFS to solve it but got WA
coule someone explain it or give me some test data please?
Posted: Tue Nov 15, 2005 2:47 pm
by polone
Ohh...yes
my guess is right
there's some test data for someone who's solving this problem
Code: Select all
100 0
6 8
1 2
1 4
1 6
2 3
2 4
2 5
3 5
3 6
0 0
Posted: Tue Nov 15, 2005 9:54 pm
by w k
Hi,
Could You post more interesting I/O's for this problem? I can't find a mistake in my code.
Wojciech
Posted: Tue Nov 15, 2005 10:09 pm
by w k
Hi,
I found a mistake already - I/O's not longer needed.
Regards
Wojciech
Posted: Sun Nov 27, 2005 1:08 am
by Emilio
Hello there!
Could anyone say me if my output is correct for this input?
input:
Code: Select all
4 5
1 2
2 3
3 4
4 1
1 3
2 1
1 2
5 8
1 2
2 3
3 4
4 1
1 3
2 4
1 5
2 5
100 0
6 8
1 2
1 4
1 6
2 3
2 4
2 5
3 5
3 6
4 4
1 2
2 3
3 4
4 1
5 6
1 2
1 5
2 5
2 3
3 4
4 5
2 2
1 2
2 1
4 3
1 2
2 3
3 4
1 0
7 9
1 2
2 3
3 4
4 2
2 5
1 5
5 6
5 7
6 7
7 10
1 2
2 3
3 4
4 2
2 5
1 5
5 6
5 7
6 7
4 6
9 16
1 2
2 3
3 4
4 2
2 5
1 5
5 6
5 7
6 7
4 6
3 8
6 8
8 9
9 3
9 6
9 4
10 18
1 2
2 3
3 4
4 2
2 5
1 5
5 6
5 7
6 7
4 6
3 8
6 8
8 9
9 3
9 6
9 4
8 10
6 10
14 25
1 2
2 3
3 4
4 2
2 5
1 5
5 6
5 7
6 7
4 6
3 8
6 8
8 9
9 3
9 6
9 4
8 10
6 10
11 12
12 14
11 14
11 13
13 14
11 2
14 10
4 3
1 2
2 3
3 1
10 13
1 2
1 3
2 3
2 4
4 10
4 9
4 5
10 9
5 8
8 6
5 6
5 7
6 7
7 10
1 2
1 5
1 4
2 3
2 6
2 5
3 6
4 5
5 7
6 7
0 0
output:
Code: Select all
1
Poor Koorosh
1
Poor Koorosh
2
0
1
0
Poor Koorosh
Poor Koorosh
0
1
1
0
Poor Koorosh
Poor Koorosh
Poor Koorosh
2
Any tricky case will be highly-regarded!
Thanks in advance!
Posted: Sun Nov 27, 2005 7:29 am
by helloneo
Emilio~! My output for your input
Code: Select all
1
Poor Koorosh
1
Poor Koorosh
2
0
1
0
Poor Koorosh
Poor Koorosh
0
1
1
0
3
Poor Koorosh
3
2
Posted: Sun Nov 27, 2005 6:43 pm
by Emilio
Thanks helloneo!
I got AC. My approach was wrong!
Posted: Wed Sep 06, 2006 9:02 pm
by boshkash1986
Please i can not understand when should i output 0 and when should I output "Poor Koorosh"
Posted: Fri Dec 08, 2006 6:50 am
by Jan
If there is any city with degree 0, that means it is not connected with any other city in the territory, then you have to print "Poor Koorosh". And if all the cities have even degrees, then print 0 simply.
And the rest part is yours.
Hope it helps.