Why is binary search giving tle?

Revision en1, by m_nigam01, 2023-11-28 16:01:35

Hello, my basic thinking is if I can connect all elements in x iterations. then x+1, x+2... can be ignored.

https://codeforces.com/contest/1830/submission/234754662

https://codeforces.com/contest/1830/submission/234753813

This is my submission in python and c++ one I've converted using help from gpt.

Thank you for reply.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English m_nigam01 2023-11-28 16:01:35 367 Initial revision (published)