Problem: https://mirror.codeforces.com/contest/1355/problem/B
My solution: https://mirror.codeforces.com/contest/1355/submission/80313155
This uses the same logic as used in the editorial. Can someone explain why I got the TLE verdict?
Time Limit Exceeded
Problem: https://mirror.codeforces.com/contest/1355/problem/B
My solution: https://mirror.codeforces.com/contest/1355/submission/80313155
This uses the same logic as used in the editorial. Can someone explain why I got the TLE verdict?