How to solve this problem??
problem link - https://www.codechef.com/ZCOPRAC/problems/ZCO14004
one simple solution is this - https://www.codechef.com/viewsolution/9958859
But I’m not able to understand his logic.
Please help!
How to solve this problem??
problem link - https://www.codechef.com/ZCOPRAC/problems/ZCO14004
one simple solution is this - https://www.codechef.com/viewsolution/9958859
But I’m not able to understand his logic.
Please help!