|
|
вернуться в форумIf your complexity is O(N^3) and your solution only gets AC in C/C++ then maybe you should print the matrix of where is best to drop the first egg. If your complexity is O(N^3) you can use the fact that when number of eggs >= log(N) , answer is log(N) . O(N^2*log(N)) . If your complexity is O(N^3) you can use the fact that when number of eggs >= log(N) , answer is log(N) . O(N^2*log(N)) . Keivan, that's such a good observation! Is that the intended solution though? |
|
|