10525 - New to Bangladesh?
Moderator: Board moderators
-
- Guru
- Posts: 1080
- Joined: Thu Dec 19, 2002 7:37 pm
I still got WA :(
could anyone tell me some tricky tests please? I have just searched forum for it
Code: Select all
ACed
Last edited by FAQ on Thu Mar 30, 2006 1:17 pm, edited 1 time in total.
-
- Guru
- Posts: 1080
- Joined: Thu Dec 19, 2002 7:37 pm
There are several errors:
- You don't handle all the cases in the input (for (int cs = 1; cs < cases; ++cs));
- You print "No path." in stead of "No Path."
Both could have been easily avoided, so please check your output for the sample input against the sample output before posting your code.
- When reading input, you should also use the fastest/shortest criterium. So for this inputthe output is
This was corrected during the last rejudge.
- You don't handle all the cases in the input (for (int cs = 1; cs < cases; ++cs));
- You print "No path." in stead of "No Path."
Both could have been easily avoided, so please check your output for the sample input against the sample output before posting your code.
- When reading input, you should also use the fastest/shortest criterium. So for this input
Code: Select all
1
2 5
1 2 4 10
1 2 5 4
1 2 4 8
1 2 10 3
1 2 4 9
1
1 2
Code: Select all
Distance and time to reach destination is 8 & 4.
-
- Experienced poster
- Posts: 209
- Joined: Sun Jan 16, 2005 6:22 pm
10525
Code: Select all
removed
-
- 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)
Have you tried all the test cases mentioned in other threads on this problem? (see http://online-judge.uva.es/board/viewtopic.php?t=9591 and http://online-judge.uva.es/board/viewtopic.php?t=3412)asif_rahman0 wrote:Please Help Me.
Couldnt get this WA. It seems OK to me.
I did it my BFS. Am i in right way???
here is my code
I wonder why i am getting TLE in this problem
I check for all the input in the forum and it passed ... but still dont know why it is TLE
Here is my code ... can anybuddy help me


Here is my code ... can anybuddy help me
Code: Select all
CUT AFTER AC
Last edited by sakhassan on Sat Nov 11, 2006 6:40 pm, edited 1 time in total.
Increase your array size. There can be at most 25 roads, but there can be more than 25 nodes. Define N as 250 (I took 250). And you dont have to use 'long long'. Just use 'int' and define inf as 1000000000. Hope these help.
Ami ekhono shopno dekhi...
HomePage
HomePage
-
- New poster
- Posts: 8
- Joined: Wed Jan 25, 2006 6:25 pm
- Location: Dhaka, Bangladesh
My code gives correct output for all the sample inputs found in the forum.
But I am still getting WA. I can't find what is wrong
.
Can anyone help me? Please!!!!!!!!!
My code is:
But I am still getting WA. I can't find what is wrong

Can anyone help me? Please!!!!!!!!!
My code is:
Code: Select all
ACed
Last edited by ashikzinnatkhan on Tue Nov 14, 2006 5:46 pm, edited 2 times in total.
Ashik
Check the following I/O set...
Input:
Output:
Hope it helps.
Input:
Code: Select all
1
3 3
1 2 2 5
1 2 5 10
2 3 3 6
1
1 3
Code: Select all
Distance and time to reach destination is 11 & 5.
Ami ekhono shopno dekhi...
HomePage
HomePage
-
- New poster
- Posts: 8
- Joined: Wed Jan 25, 2006 6:25 pm
- Location: Dhaka, Bangladesh