Please help in this problem
This is authors solution 55959992
This is my solution 55959887
I am getting TLE although i have used the same approach
https://codeforces.com/contest/675/problem/D