Can anyone tell me why I got TLE in this code [Submission 1](https://codeforces.me/contest/1729/submission/171937869)↵
and then why did it get accepted in this code [Submission 2](https://codeforces.me/contest/1729/submission/17193786946732)↵
↵
and then why did it get accepted in this code [Submission 2](https://codeforces.me/contest/1729/submission/1719
↵