Solutions failing hacks even with some non-optimal logic

Revision en1, by moaforlife, 2023-10-13 07:09:27

I was trying to hack some solution for problem D of yesterday's contest. Now, as far as I know, the solution which are running loop on all the primes should be failed in hacks, as the time complexity is around O(# of primes)*O(n). This is around $$$7.8*10^8$$$. And all these solutions are running in 2 seconds if they have used some thing like fast input output.

I think that the bounds in the problems should have been tighter for this to not happen... What do you guys think about this?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English moaforlife 2023-10-13 07:09:27 544 Initial revision (published)