Блог пользователя Filikec

Автор Filikec, история, 3 месяца назад, По-английски

Hi there, I've been looking at submissions for the latest DIV3 and I've noticed something that has surprised me quite a lot.

People placing intentional bugs in their code?

I filtered submissions by status "hacked" and I've noticed that a lot of those submissions have some code inserted in them that is very obviously meant to be hacked.

For example for problem 2000E - Photoshoot for Gorillas, there's many submissions with code such as this:

if ((n ^ m) + (k ^ w) == MAX_N) {
    cout << "0\n";
    return;
}

Why do people* submit such solutions?

*subject to speculation

  • Проголосовать: нравится
  • +16
  • Проголосовать: не нравится

»
3 месяца назад, # |
  Проголосовать: нравится +27 Проголосовать: не нравится

because theyre stupid cheaters

  • »
    »
    3 месяца назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    How is that related? If it's done for cheating, do they get banned? Very easy to spot such submissions and there is so many of them. And why would cheaters do that?

    • »
      »
      »
      3 месяца назад, # ^ |
        Проголосовать: нравится +25 Проголосовать: не нравится

      they go to telegram or youtube video or whatever and copy paste code without looking through it, and one of the distributors of the code decides to just troll them and put that stuff in, and since theyre stupid and cant comprehend what theyre copy pasting, they end up leaving stuff like that in the code.

      • »
        »
        »
        »
        3 месяца назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        How fkin stupid does one have to be to do that. I would binary search the answer but i don't know what the limits is.

        • »
          »
          »
          »
          »
          3 месяца назад, # ^ |
          Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

          You don't need to binary search, you could've just math'd the solution lol :)

          It was a fairly greedy solution, and this part of the code I spent over 30 minutes working on.

          repl(i, 0, n) {
              repl(j, 0, m) {
                  int row = min(i+k-1, n-1)-max(0LL, i-(k-1))+1-(k-1);
                  //if(row == k-1+k-1) --row;
                  int col = min(j+k-1, m-1)-max(0LL, j-(k-1))+1-(k-1);
                  //if(col == k-1+k-1) --col;
           
                  counts.pb(row*col);
                  //debug(counts[sz(counts)-1]);
              }
          }
          

          Just to clarify, counts represents how many times a square will be counted, and repl is just a macro for for(int i = 0; i < n; ++i)

      • »
        »
        »
        »
        3 месяца назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        some people are actually that retarded?

        • »
          »
          »
          »
          »
          3 месяца назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          Yes, just like that time when if(t == 100) cout << "100\n";

    • »
      »
      »
      3 месяца назад, # ^ |
        Проголосовать: нравится +1 Проголосовать: не нравится

      Possibly they don't understand the code and submit whatever their community hands over to them (probably they are a part of some cult ,lol)

»
3 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Yeah I noticed it too. Someone cooked here- Oh my it was delicious. I think CF Admins should consider it as Unfair Means as it just can be easily spotted and should skip their solutions.

»
3 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

They probably got that code by cheating from someone who either didn't realize there was an error, or from someone who intentionally wanted these people to get hacked, and set up a hackable code that passes all tests.

»
3 месяца назад, # |
Rev. 2   Проголосовать: нравится +18 Проголосовать: не нравится

Just cheaters who copy others' code line by line without even understanding it, and this "special case" is also created by our "hero" like in the previous contest.

»
3 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I suspect this is done to allow cheaters to hack their own code (from alternative accounts) and gain hacking points of some sort.

»
3 месяца назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится

TBH this will bend the hacking of the usual round.
Deceiving stupid cheaters is not bad, but lucky innocent participants can get free 100pts, and if someone knows this situation(including the broadcaster), they intentionally get such points. (Though there are many(around 600?) rooms, now we have crazy number of cheaters and maybe exceeding the number of rooms)
What's worse, we can't distinguish them.

A digression, but nowadays many rounds are designed as PT=ST, and some issues about hacking have already been discussed. Maybe we should reconsider the concept of hacking.