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
- Thu Oct 02, 2008 12:40 am
- Forum: Volume 115 (11500-11599)
- Topic: 11504 - Dominos
- Replies: 55
- Views: 31848
- Mon May 23, 2005 11:44 am
- Forum: Volume 108 (10800-10899)
- Topic: 10853 - Pablito nailed a nail
- Replies: 10
- Views: 4207
- Sat May 21, 2005 3:31 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10853 - Pablito nailed a nail
- Replies: 10
- Views: 4207
10853 - Pablito nailed a nail
Could anyone tell me an idea how to solve this problem?
- Sat Dec 11, 2004 5:15 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10775 - Mystical Matrix
- Replies: 12
- Views: 6619
- Wed Dec 08, 2004 10:59 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10775 - Mystical Matrix
- Replies: 12
- Views: 6619
10775 - Mystical Matrix
Can anyone explain an idea how to solve this problem?
- Wed Nov 10, 2004 12:40 am
- Forum: Volume 107 (10700-10799)
- Topic: 10767 - Barcelona's trams
- Replies: 6
- Views: 3062
- Tue Nov 09, 2004 3:12 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10767 - Barcelona's trams
- Replies: 6
- Views: 3062
Re: 10767 - Barcelona's trams
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 ...
- Tue Nov 09, 2004 2:55 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10767 - Barcelona's trams
- Replies: 6
- Views: 3062
10767 - Barcelona's trams
Can anyone give the idea to solve this problem?
Is it true that function T(v) has only one local extremum?
Is it true that function T(v) has only one local extremum?