Need help with a PyPy3 submission

Revision en3, by blackSnek, 2021-06-20 15:56:06

Problem — 1539C

My O(N*log(N)) PyPy3 code got TLE verdict for N — 2e5 (worst case)

Can someone explain what operations are being heavy in my code? and how can I optimize them?

Here is the submission link — submission

Tags #python, #727

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English blackSnek 2021-06-20 15:56:06 74
en2 English blackSnek 2021-06-20 15:55:00 45
en1 English blackSnek 2021-06-20 15:53:02 284 Initial revision (published)