SabirM's blog

By SabirM, history, 5 hours ago, In English

Hey guys! I encountered a small problem with 1490F - Equalize the Array. I submitted a solution earlier in April, 369446066, and it did not get TLE. However, when I submitted exactly the same code again, 376501690, I got TLE on a testcase where it previously passed. What could be the issue?

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
5 hours ago, hide # |
Rev. 2  
Vote: I like it +1 Vote: I do not like it

The TLE submission uses c++17. The AC one uses ++23. Since your unordered map has no custom hash, it can be hacked using some specific numbers, without getting into details, these numbers change from some versions to other. Since this problem is from round 700, it doesn't have the anti hash test for that version, however it does for c++17, which is why it TLEs. However, if someone wanted and could hack you, they absolutely can.

  • »
    »
    5 hours ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    okay thank you!