I was trying Problem and was unable to understand the complexity analysis.
Morover , there is not much detailed explanation on google! Can someone help? What I think the steps in such a problem is :
1) Define a state that represents the whole situation of a system ( LIke in DP) 2) Define some transitions (Each transition should have same weight ) 3) Search for the state applying some constraints!
But I cannot understand the Complexity analysis too!
Morover my code here gives TLE on the same problem 12483335 Can someone explain?
Please !!
Here is the editorial