10525 - New to Bangladesh?

All about problems in Volume 105. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

User avatar
little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm

Post by little joey » Thu Mar 23, 2006 10:12 am

It's 10525 - New to Bangladesh.
Please look in the 'Fixing Mistakes' section; there was a rejudge notice there.
The biggest problem with most problems is not how to solve the problem, but how to not solve what is not the problem.

FAQ
Learning poster
Posts: 84
Joined: Wed Jan 28, 2004 6:23 pm

I still got WA :(

Post by FAQ » Sat Mar 25, 2006 5:25 am

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.

FAQ
Learning poster
Posts: 84
Joined: Wed Jan 28, 2004 6:23 pm

Post by FAQ » Thu Mar 30, 2006 6:15 am

Help me please :(

User avatar
little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm

Post by little joey » Thu Mar 30, 2006 10:36 am

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 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
the output is

Code: Select all

Distance and time to reach destination is 8 & 4.
This was corrected during the last rejudge.

FAQ
Learning poster
Posts: 84
Joined: Wed Jan 28, 2004 6:23 pm

Post by FAQ » Thu Mar 30, 2006 1:20 pm

Thanks a lot little joey, I got AC at last
Many times I got wrong spelling, poor my eyes :D

asif_rahman0
Experienced poster
Posts: 209
Joined: Sun Jan 16, 2005 6:22 pm

10525

Post by asif_rahman0 » Tue Jun 20, 2006 11:36 am

Code: Select all

removed

asif_rahman0
Experienced poster
Posts: 209
Joined: Sun Jan 16, 2005 6:22 pm

Post by asif_rahman0 » Tue Jun 27, 2006 8:44 pm

accepted
Last edited by asif_rahman0 on Thu Aug 03, 2006 1:22 pm, edited 1 time in total.

User avatar
Martin Macko
A great helper
Posts: 481
Joined: Sun Jun 19, 2005 1:18 am
Location: European Union (Slovak Republic)

Post by Martin Macko » Mon Jul 24, 2006 12:04 am

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
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)

sakhassan
Experienced poster
Posts: 105
Joined: Sat Mar 11, 2006 9:42 am
Location: cse,DU

Post by sakhassan » Sat Nov 11, 2006 2:41 pm

I wonder why i am getting TLE in this problem :o :-? 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

Code: Select all


CUT AFTER AC


Last edited by sakhassan on Sat Nov 11, 2006 6:40 pm, edited 1 time in total.

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Post by Jan » Sat Nov 11, 2006 3:59 pm

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

sakhassan
Experienced poster
Posts: 105
Joined: Sat Mar 11, 2006 9:42 am
Location: cse,DU

Post by sakhassan » Sat Nov 11, 2006 6:38 pm

Thanks J@N ..... i change all those variablese and some minor changes in the code and got AC....

i was very confused with this input

3
1 2 4 4
1 2 3 4
1 2 3 5
just to consider the 2nd one :D

ashikzinnatkhan
New poster
Posts: 8
Joined: Wed Jan 25, 2006 6:25 pm
Location: Dhaka, Bangladesh

Post by ashikzinnatkhan » Mon Nov 13, 2006 7:12 pm

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 :oops:.
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

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Post by Jan » Tue Nov 14, 2006 3:40 am

Check the following I/O set...

Input:

Code: Select all

1

3 3
1 2 2 5
1 2 5 10
2 3 3 6
1
1 3
Output:

Code: Select all

Distance and time to reach destination is 11 & 5.
Hope it helps.
Ami ekhono shopno dekhi...
HomePage

ashikzinnatkhan
New poster
Posts: 8
Joined: Wed Jan 25, 2006 6:25 pm
Location: Dhaka, Bangladesh

Post by ashikzinnatkhan » Tue Nov 14, 2006 5:44 pm

Thanks a lot.
I got AC.

Actually it was a silly mistake by me.
I have tried with this aproach earlier. But then I made a mistake in array indexing. So I thought my idea was wrong and all the roads shld be just overwritten.

Thanks a lot again.
Ashik

aha2007
New poster
Posts: 10
Joined: Sun Jan 21, 2007 10:38 am

Post by aha2007 » Sun Mar 04, 2007 7:18 am

Any one tell me why i presentation error. I tried in many ways but without any success.

ac

[quote]
Last edited by aha2007 on Sun Mar 04, 2007 8:42 am, edited 1 time in total.

Post Reply

Return to “Volume 105 (10500-10599)”