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

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

I have a suggestion that might be somehow useful in the procedure of catching cheaters who use ai chatbots like chatGPT and others.

Now consider this solution here

Nothing is fishy at all at the first glance. But when we have a further look inside the code, we will find that the code has lots of comments that don't make any sense. If I am solving a problem, I won't care much about writing very descriptive and well-written comments like these ones, I will try to write the minimum comments that just help me while doing the code.

The other thing is the naming of the variables. In CP, we mostly care about speed and easiness, so it is better for me to write cmp instead of compare_wealth and check instead of check_unhappiness.

So only chatbots (like chatGPT) can produce this neat, well-commented and very long explaining codes. Now for the naming part it for sure not reliable to depend upon, as there might be some users who really prefer to write long and descriptive names and they also are so fast in writing them. But if we considered the comment part, we will find it is so reliable and we can depend on.

Now of course cheaters can just simply remove the comments out of the code or specify that they don't need comments in the prompt. Yes, now we won't be able to catch them, but after all if we can catch some number of cheaters it is much better than zero :)



I am too excited to hear your thoughts and counter opinions on this suggestion right here, and I hope MikeMirzayanov will take this suggestion into account.

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

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

Can you provide a TL;DR ?

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

    I am not an expert in markdown, would you tell me how to do that?

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

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

So only chatbots (like chatGPT) can produce this neat, well-commented

This is irrelevant to your point and I just want to rant. Chatbot or not, this code is not well-commented. Actually, this is probably the biggest misconception about commenting code. Almost every comment in the program you linked is something along the lines of

    // Sort the wealth array
    qsort(population_wealth, population_size, sizeof(long long), compare_wealth);

Why is there a comment? What does it add? qsort(...) already tells me you are sorting the array. Comments that just say what the next line does. Unless the next line is some obfuscated mess, why would a comment like that be necessary?

Comments are for when you want to explain why you are doing something.

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

    That's exactly my point!

    Such comments are so descriptive but not necessary, that's why I am saying that such a code can never be generated by a human who is trying to increase his/her rank during the contest time. That's why we will be confident when we detect such a code to be cheating from some chatbot.

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

    I like how your nonsense comment is downvoted even thought your a gm