Eh, yes. I tried again. Naive checking both sides passed, but DP still failed.
P
partizan
@partizan
0
Reputation
7
Posts
85
Profile views
0
Followers
2
Following
Posts made by partizan

RE: Anybody solved this problem using Python with O(n^2) complexity?

RE: Anybody solved this problem using Python with O(n^2) complexity?
I agree, I tried optimizing the code time and time again, but still failed. Both Java and CPP are fine.

Anybody solved this problem using Python with O(n^2) complexity?
I tried solving this problem in 2 ways, which are naive checking and dp, using Python. But I can not make it within the time limit. Anybody managed to solve it?