|
|
back to boardO(V^3) - OK in C++ , tl4 in Java ... The same algo gives tl 4 in java ... In C++ I use vector of vectors for the capacity matrix as well as in java and the input is with the Scanner class . How can I optimize ? Thanks in advance. Re: O(V^3) - OK in C++ , tl4 in Java ... Did you read the FAQ (Frequently Asked Questions) ? Re: O(V^3) - OK in C++ , tl4 in Java ... I have TLE4 in pascal! why? Re: O(V^3) - OK in C++ , tl4 in Java ... I don't know. Using C++ and good old Dinic you can get 0.015ms. Actually, you can perform greedy initialization in linear time (of matrix size) and get AC with most suboptimal flow algorithms. |
|
|