Comments

Yes,you are right. But I was not much aware of the hacking process. I think that as my submission was accepted once it will never turn around.

Okay, thanks for your informative suggestion.

During contest time I submitted my code and it was accepted on the second attempt. But after system testing I found WA because of TLE in the 7th test case. I found no reason behind it. Plz help me. Here is my submission link https://codeforces.me/contest/1613/submission/137660678