shevlopmes's blog

By shevlopmes, history, 6 months ago, In English

Hi Codeforces,

We saw an unusual amount of hacks today. Specifically, there were a lot of hacks on problem B, I did one myself. The submission I hacked looked like this

Spoiler

As you can see, it's a completely valid solution except there are 2 unnecessary if statements which made it hackable. That made me think of 2 things: why there wasn't any 10-digit number in pretests and why the contestant wrote that "if"?

But after the contest I saw a list of hacks and, to my surprise, there were A LOT of hacks on similar submissions. So my hypothesis is that one of the authors intentionally spread an incorrect solution in some cheating community and removed all 10digit numbers from pretests. If that's true, I pay my respect

  • Vote: I like it
  • +402
  • Vote: I do not like it

»
6 months ago, # |
  Vote: I like it +211 Vote: I do not like it

there was an intentionally wrong solution uploaded by youtube that we were aware of during contest, but we have no idea who posted it. we wouldn't spread a solution online even if it would eventually WA from hacks and FST.

as for the pretests, during preparation we saw no reason to have 10 digit numbers in it (there isn't a solution that would work for 10 digit numbers but not for 18 digit numbers — solution doesn't depend on number of digits save maybe small 1-3 digit numbers)

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +2 Vote: I do not like it

    so I hope, you are going to use this fact, to catch cheaters this time

    because, cheating is at it's peak these days.

    ||Please say Yes||

»
6 months ago, # |
  Vote: I like it +207 Vote: I do not like it

To whoever spread the WA solution: if you're ever lonely or sad, remember that I will always love you. You have my respect.

»
6 months ago, # |
  Vote: I like it +57 Vote: I do not like it

total_sum = 35 feels super suspect, by just glancing at the code. But sz % 10 is really funny. I didn't even notice it at first, i thought it was just that other condition.

  • »
    »
    6 months ago, # ^ |
      Vote: I like it +32 Vote: I do not like it

    I looked through some of the other solutions that failed system test, and it looks like 35 comes from adding up all 'large digits' (5 to 9), and some people just calculated it themselves (like how arr exists but isn't actually used in that code). It's still suspicious, though.

    What makes me scared is that some of them even solved up to problem D and they would've been above my rank if these solutions didn't fail. If this kind of thing has happened casually, I just can't imagine how many ranks I've been losing just because I've always participated in contests conscientiously.

    • »
      »
      »
      6 months ago, # ^ |
        Vote: I like it +95 Vote: I do not like it

      Given the unused variable and seemingly random checks, could this solution be the output of ChatGPT or a similar tool?

      • »
        »
        »
        »
        5 months ago, # ^ |
          Vote: I like it +3 Vote: I do not like it

        not the exact output in my opinion, but chatgpt may be used to edit the code and make it weird, but it's a common act of cheaters to spam add function + random variables + random conditions, this causes the plag checker which uses AST to check the similarity of codes executing not be able to identify it since because e.g. in a loop they updated 10 variables which just makes the checker not be able to identify it

»
5 months ago, # |
Rev. 2   Vote: I like it +78 Vote: I do not like it

What's even more ridiculous is 264905546, a similar code.

Can you find out what's the difference?
»
5 months ago, # |
  Vote: I like it +2 Vote: I do not like it

huge respect for authors /\

»
5 months ago, # |
  Vote: I like it +4 Vote: I do not like it

I respect this behaviour but, is there a possibility that, somebody would read the code and recognize the solution, and then implement the solution completely on his own way to escape plag check?

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

    i dont think plag check is working anymore , they convert the code into another language , even they discard the function from code and mix with main code by chatgpt .

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +42 Vote: I do not like it

    If it caught 95% cheaters and helped 5% to solve problem B, it's a reasonable compromise.

»
5 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Cheaters are so dumb that they do not even read the code and copy and paste it.

I hacked a solution of Saumy_1, by a simple test case of 1567890.

»
5 months ago, # |
  Vote: I like it -34 Vote: I do not like it

if someone got fst on problem B, it doesn't means he cheated for sure

»
5 months ago, # |
Rev. 4   Vote: I like it +9 Vote: I do not like it

Genius idea. orz

»
5 months ago, # |
  Vote: I like it -21 Vote: I do not like it

There was a similar leetcode question. ig people just copied that solution here hence many got wrong