Code: Select all

`cut after AC`

**Moderator:** Board moderators

Code: Select all

`cut after AC`

Last edited by asif_iut on Thu Nov 11, 2010 5:05 pm, edited 1 time in total.

After a quick overview i found a bug to your problem. you take the input N and R and instead of taking R roads you are taking N roads of information.

However if you correct this i think you will get tle.......

In the warshall() function u used a loop

for( double x = 0.00; x <= v[z][l]; x += eps ) where your eps is 1e-6

this will lead to tle......

However if you correct this i think you will get tle.......

In the warshall() function u used a loop

for( double x = 0.00; x <= v[z][l]; x += eps ) where your eps is 1e-6

this will lead to tle......

oops, this is not the intended way to solve this problem. The test cases are not strong enough but I admit that I have no idea how to generate good ones. Any one has some ideas?asif_iut wrote:thanks a lot bm_anas...i made a stupid error as well as reduced the eps to 1e-2 and AC!!!! thanks once again...

what should have been the idea for solving this problem??oops, this is not the intended way to solve this problem. The test cases are not strong enough but I admit that I have no idea how to generate good ones. Any one has some ideas?

you may take a look at this: http://en.wikipedia.org/wiki/Ternary_searchasif_iut wrote:what should have been the idea for solving this problem??