[1541B] Pleasent Pairs — Same logic, One got AC, but another gives TLE. Why?

Revision en1, by Cooper1214, 2022-05-30 17:08:27

So, I have encountered a strange problem while solving 1541B — Pleasent Pairs My first solution gets accepted ( Solution 1 ) , while the second one got TLE ( Solution 2).

I don't understand why this is happening. They both are almost same. Any help? Thank you.

Tags tle, strange behavoiur

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Cooper1214 2022-05-30 17:11:33 18
en1 English Cooper1214 2022-05-30 17:08:27 552 Initial revision (published)