We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Cute question, but why are the values of n and k so small?
Edit:
Just read the Editorial; the calculation of the worst-case complexity is wrong (it's too pessimistic) - you can easily solve the case for, say, n = 10'000'000 and k = 100'000 in 2 seconds in C++, and even then most of the time will be spent in I/O :)
Turn Off the Lights
You are viewing a single comment's thread. Return to all comments →
Cute question, but why are the values of n and k so small?
Edit:
Just read the Editorial; the calculation of the worst-case complexity is wrong (it's too pessimistic) - you can easily solve the case for, say, n = 10'000'000 and k = 100'000 in 2 seconds in C++, and even then most of the time will be spent in I/O :)