10525 - New to Bangladesh

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

Moderator: Board moderators

Postby FAQ » Thu Mar 30, 2006 6:15 am

Help me please :(
FAQ
Learning poster
 
Posts: 84
Joined: Wed Jan 28, 2004 6:23 pm

Postby 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.
User avatar
little joey
Guru
 
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm

Postby 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
FAQ
Learning poster
 
Posts: 84
Joined: Wed Jan 28, 2004 6:23 pm

10525

Postby 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

Postby 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.
asif_rahman0
Experienced poster
 
Posts: 209
Joined: Sun Jan 16, 2005 6:22 pm

Postby 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)
User avatar
Martin Macko
A great helper
 
Posts: 481
Joined: Sun Jun 19, 2005 1:18 am
Location: European Union (Slovak Republic)

Postby 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.
sakhassan
Experienced poster
 
Posts: 105
Joined: Sat Mar 11, 2006 9:42 am
Location: cse,DU

Postby 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
Jan
Guru
 
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh

Postby 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
sakhassan
Experienced poster
 
Posts: 105
Joined: Sat Mar 11, 2006 9:42 am
Location: cse,DU

Postby 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
ashikzinnatkhan
New poster
 
Posts: 8
Joined: Wed Jan 25, 2006 6:25 pm
Location: Dhaka, Bangladesh

Postby 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
Jan
Guru
 
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh

Postby 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
ashikzinnatkhan
New poster
 
Posts: 8
Joined: Wed Jan 25, 2006 6:25 pm
Location: Dhaka, Bangladesh

Postby 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.
aha2007
New poster
 
Posts: 10
Joined: Sun Jan 21, 2007 10:38 am

Postby helloneo » Sun Mar 04, 2007 7:32 am

I think you should remove "printf("\n");" at the very first line of each case..
helloneo
Guru
 
Posts: 516
Joined: Mon Jul 04, 2005 6:30 am
Location: Seoul, Korea

Postby aha2007 » Sun Mar 04, 2007 8:43 am

thanks helloneo , i got acceepted.
aha2007
New poster
 
Posts: 10
Joined: Sun Jan 21, 2007 10:38 am

PreviousNext

Return to Volume CV

Who is online

Users browsing this forum: No registered users and 1 guest