|
|
back to boardIs there any solution aside from DP? I solved it using pretty straigtforward DP O(n * m^2), obviously it's just a complexity without any additional factors but it doesn't seem to be fitting time limit. Somehow it did. But I wonder, is there any more intricate idea for a faster solution? Re: Is there any solution aside from DP? Posted by LeTim 23 Jul 2025 12:06 pretty straigtforward DP O(n * m^2) it doesn't seem to be fitting time limit Most likely, your solution is actually O(N*M), because the statement says "It is guaranteed that the total number of wishes does not exceed 2 · M." |
|
|