Getting Strange Accepted on problem D of DIV2 959

Revision en1, by rishichowdhury711, 2024-07-19 20:14:26

Hello Codeforces , I have a question regarding the problem D of the previous contest. I just solved the question using brute force and DSU and it got accepted. I dont understand why it is not giving TLE. It would be really helpful if you can please explain the reason for the code getting accepted or the testcases are weak. Thank you here is the Code

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English rishichowdhury711 2024-07-19 20:14:26 465 Initial revision (published)