11280  Flying to Fredericton
Moderator: Board moderators
11280  Flying to Fredericton
I tried FloydWarshall but getting WA. Can anyone tell me how to solve this problem?
Thanks.
Thanks.
Code: Select all
dp(x,y) = min{dp(x,y), dp(i, y1)+cost(i,x)};
My solution is dp, and it works fine. May be you have done something wrong in your implementation.
Ami ekhono shopno dekhi...
HomePage
HomePage
Code: Select all
dp(x,y) = min{dp(x,y1), dp(i, y1)+cost(i,x)};

 New poster
 Posts: 11
 Joined: Sat Jul 22, 2006 8:45 pm
 Location: Sylhet, Bagladesh
 Contact:
what's wrong with my code?
Can I get some tricky I/O.
Code: Select all
code removed after finding mistake
Last edited by Masud_CSE_SUST on Wed Sep 19, 2007 6:37 pm, edited 1 time in total.
"Computer science is no more about computers than astronomy is about telescopes."  Dijkstra

 New poster
 Posts: 11
 Joined: Sat Jul 22, 2006 8:45 pm
 Location: Sylhet, Bagladesh
 Contact:
I get too many runtime error.plz help me................
deleted......................
Thanks
Keep posting;
deleted......................
Thanks
Keep posting;
Last edited by sapnil on Fri Sep 21, 2007 11:55 am, edited 1 time in total.
>>sapnil
U did the same mistake as Masud_CSE_SUST. Read this
Hope this helps.
U did the same mistake as Masud_CSE_SUST. Read this
Code: Select all
Read the problem statement carefully.
U have to find the shortest path from Calgary to Fredericton using not more than the requested number of stopovers. U can get a shortest path using (<stop) number of stopovers. It should be considered.