Why I am getting MLE in C Question of Codeforces Round 789 (Div. 2) ?

Revision en1, by dragonman164, 2022-05-09 09:57:55

I am getting MLE in test case 45 for C Question. I am not able to figure out the reason for it. Time Complexity and Space Complexity of my code are O(n^2) for each. Here's my submission. Can someone figure out my issue with my code ?

https://codeforces.net/contest/1678/submission/156387534

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English dragonman164 2022-05-09 09:57:55 362 Initial revision (published)