My simple C++ implementation of Kosaraju's algorithm runs in 0.7 sec, so yours is probably slower because of language. What language do you use?
EDIT: oh, I see you code in C++. So it might be because of cin/cout instead of scanf/printf.
Search found 8 matches
Search found 8 matches • Page 1 of 1
- Tue Nov 09, 2004 3:12 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10767 - Barcelona's trams
- Replies: 6
- Views: 2511
I used dynamic programming to find the best velocity for the x-th segment if I arrive with y crashes. When computing this, the corresponding function T(v) (input: speed on the x-th segment, output: expected time to finish the whole track, valid inputs: (0,M-y> ) has only one local minimum and this ...