sama004's blog

By sama004, history, 9 days ago, In English

Hello, Codeforces community!

I am excited to introduce a new browser extension I’ve developed called Codeforces Cheater Flagger. This tool aims to help maintain the integrity of our platform by flagging users who might be cheating.

How does it work?

The extension analyzes user submissions made only during contests. A user's profile is flagged (marked as cheater) when all their submissions in a contest were skipped, indicating potential foul play. This tool aims to make it easier for the community to identify such profiles.

Note: This extension works only on profile pages, specifically URLs in the format https://codeforces.net/profile/${username}

What it does?

  1. Changes the rank (if a cheater is pupil it would show cheater)
  2. Changes the user avatar.

Example

Follow the readme for installation:

https://github.com/Sama-004/cf-cheater-flagger

Honourable mention: https://cfcheatdetector.netlify.app/

Edit: Made some new changes. Please get the latest version (1.5)

1.5 (2024-07-09)

Features:

  • Changed cheater detection logic
  • Changed contest threshold to 8 instead of all contests
  • Fetch submissions in batches of 100 until it has data for at least 8 contests
  • Partial verdicts are not counted as cheat
  • Don't flag above 2100 rated

Fix:

  • Now also works on codeforces.com/profile/username/
  • Only counts contest participations and not virtual contest
  • Vote: I like it
  • +204
  • Vote: I do not like it

»
9 days ago, # |
  Vote: I like it -16 Vote: I do not like it

I hope city logo is after detecting cheater else i won't install this .

»
9 days ago, # |
  Vote: I like it +8 Vote: I do not like it

Now you already know the source of downvotes.

»
9 days ago, # |
  Vote: I like it +4 Vote: I do not like it

W extension, installed. Cheaters are quite annoying, so it's nice to see stuff like this.

Btw, I'm on MacOS, and even though the extension is working, I'm getting this error on the Chrome extension page:

Spoiler

Might be something to look into.

  • »
    »
    9 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Chromium-based browsers don't support browser_specific_settings in the manifest, but they are required by Firefox-based browsers. A solution is to create different manifest.json files for Chrome and Firefox. I haven't done that because it works fine and only gives a warning on Chrome nothing else.

»
9 days ago, # |
  Vote: I like it +8 Vote: I do not like it

Installed just for the man city avatar

»
9 days ago, # |
  Vote: I like it +9 Vote: I do not like it

upvoted we need more stuff like this

»
8 days ago, # |
  Vote: I like it +5 Vote: I do not like it

I once got wrongly flagged in a div4 contest, but the contest was anyways already unrated so didnt drop any rating. Would that also count or not ?

»
8 days ago, # |
  Vote: I like it +11 Vote: I do not like it

What if Codeforces skipped someone's submissions but he was innocent? This might be because some users use the same pre-written codes from some websites.

This happened to me. You can see my comment.

Unfortunately, no action was taken...

  • »
    »
    8 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I encountered a similar situation where someone used pre-written code from a website, but the same solution was leaked, leading to them being flagged. Unfortunately, Codeforces API does not provide reasons for why a solution is skipped, so you will still be considered a cheater.

    • »
      »
      »
      8 days ago, # ^ |
        Vote: I like it +8 Vote: I do not like it

      But ignoring such comments, that gave proof of being innocent should be considered, isn't so.

      One suggestion is that it might be better if you only look at the past 6 months' contests instead of all the contests. I guess this would be better. If someone has changed his mind and is not cheating for the last 6 months(or any certain period) he will get relief from this stamp.

      • »
        »
        »
        »
        8 days ago, # ^ |
          Vote: I like it +24 Vote: I do not like it

        Thanks for the suggestion will try this.

  • »
    »
    8 days ago, # ^ |
      Vote: I like it +7 Vote: I do not like it

    Yeah the devs should probably implement a feature like: If skipped <= 2 times, and number of contests since the last skipped is > 20, it shouldn't give the cheater flag

    • »
      »
      »
      8 days ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      Why not implement an exponential backoff? Just give it some thought. If this is the your ith contest which gets skipped (due to plagiarism checks), then your last 2^(i-1) rated contests will became unrated for you.

»
8 days ago, # |
Rev. 2   Vote: I like it +36 Vote: I do not like it

I don't think it is a good idea, especially the situation Kaleem_Raza_Syed related to.

I hate cheating myself, but I do think using dirty words to comment anyone iscorrect. What if he/she turned on a new leaf (after cheating) because of being ashamed and has never cheated again?

Every person has his/her selfishness. And, we need to give them a chance to change, to whitewash what he/her has done. Attacking them is not a rational thing.

To provent misunderstanding, I will state that I hate cheaters with no responsibility of what they have done. But these are the ones we can't change. So why not just ignore them and imporve yourself insted?

  • »
    »
    8 days ago, # ^ |
      Vote: I like it +14 Vote: I do not like it

    We can simply remove somebody from the list if he's previously flagged and solved 3 consequent contests on his own, showing that he's willing to change.

  • »
    »
    8 days ago, # ^ |
    Rev. 2   Vote: I like it +6 Vote: I do not like it

    suggestion, if the last time they cheated was idk 6months ago or like 6 contests ago, remove that thing, I personally used to cheat, but after a while, I started noticing my downfall and getting weaker in problem-solving. this caused me to stop cheating but I'm still marked as a cheater. I understand that What I did Was cheating, and I take responsibility for it, all I'm saying is that even when A person(in this case me), is trying to change, or even better, he changed and is successfully giving contests, this would be humiliating for him

    BTW this extension is really cool, upvoted

»
8 days ago, # |
  Vote: I like it 0 Vote: I do not like it

I ain't installing it because of man city logo.

»
8 days ago, # |
  Vote: I like it +1 Vote: I do not like it

Nice shot. I support this project. Upvoted.

Cheaters, enjoy our rage.

»
8 days ago, # |
  Vote: I like it +3 Vote: I do not like it

This is cool, thanks for sharing! Perhaps in a future update, you can have a little note / symbol next to their name in ranklists and institution pages, and not just profile pages.

»
8 days ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I think there is error in the extension when i check on the website -> https://cfcheatdetector.netlify.app/ it show's Block_Cipher ** is a legit person!!** where as when i check using extension it show Cheater Block_Cipher ?? And i haven't cheated any contest!

  • »
    »
    8 days ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    The website is created by me and extension is created by another person so there is logical difference, i have added some extra parameters to check whether cheated in Contest or not

  • »
    »
    8 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The extension shows you as cheater because your only submission during Global Round 18 is skipped. Why the other site doesn't show you that or whether you actually cheated or not I do not know.

    • »
      »
      »
      8 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Actually I did that on purpose because he was only able to solve 1 question, I don't know weather he did cheating or anything other but if his true intentions was to cheat he would done more than 1 question so what I have implemented is if he have solved more than 1 question in contest or not , let me know should I remove this parameter or not

      • »
        »
        »
        »
        8 days ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I see.

        Since you are already showing a "detailed" result (list of contests) for each user with skipped contests, maybe it would still make sense to show the ones with attempts to only one problem too? You can even give them different CSS and show a note that only one problem was attempted if you are unsure about such cases.

    • »
      »
      »
      8 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Sorry I didn't know about skipped at that time that submitting the same code in the multiple languages would only accept recent solution.

»
8 days ago, # |
  Vote: I like it 0 Vote: I do not like it

is Legendary Grandmaster guy is also cheater -> QAQAutoMaton??

  • »
    »
    8 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    That's the mean reason why have added features to see cheated contest, so that we will able to judge the person, per his profile we can see that he has get skipped in 1 contest that may be because of many reasons so we can conclude that he is legit

    • »
      »
      »
      8 days ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      first of all, why would u even judge someone here?

      • »
        »
        »
        »
        8 days ago, # ^ |
          Vote: I like it +4 Vote: I do not like it

        Judge in sense if someone has only 1-2 skipped contest it may be because of some other reason, we cannot say he is cheater based on that but if a person has more than 3-4 skipped contest it may indicate he/she is cheating.

    • »
      »
      »
      7 days ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      That contest was 5 years ago. since then he has reached LGM and everything, idt This is a good way to judge them, rather put a trophy instead of a clown, bcuz he stopped cheating and got lgm

»
8 days ago, # |
  Vote: I like it 0 Vote: I do not like it

nice! but what does "skipped submissions" mean?

  • »
    »
    8 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    if you see skipped on any submission, they have copied someone else's code.

    • »
      »
      »
      7 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Not entirely true. If you make multiple correct submissions to a problem in a contest, all but your latest submissions are skipped (even if you haven't copied)

      • »
        »
        »
        »
        7 days ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        oh yeah yeah.... My apologies, I forgot to add this.

»
8 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Nice initiative, actually the extension will work really good if ML algorithms are employed during actual contests for checking logical plags, because the actual amount of cheaters are significantly more as compared to what will be displayed with the extension.

»
8 days ago, # |
  Vote: I like it +1 Vote: I do not like it

I was trying to implement this same feature from the algorithm I made specifically for detecting cheats. But I encountered CORS policy (no control access origin) using it thru extension, can you please tell me how did you fix it?

Also, your extension flags me in Codeforces Round 852 (Div. 2) (I didn't ever cheat on CF). So there are few inaccuracies you got to tackle. It would be so fun if companies could consider using something like this before shortlisting candidates ahaha.

  • »
    »
    7 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    lmao your whole round 852 got skipped and you are saying you didn't cheat.

    • »
      »
      »
      7 days ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      the__phoenix and angesh are my seniors, and asia west finalists. I myself qualified regionals. I don't think the extension really does what it is meant for.

      But whatever, you are free to make assumptions :P

      • »
        »
        »
        »
        7 days ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I suggest something similar like if threshold is reduced to 4 as those are the most recent rated attempts by the user.

        • »
          »
          »
          »
          »
          7 days ago, # ^ |
            Vote: I like it +1 Vote: I do not like it

          I respect that but that wouldn't track cheaters, what if I reached International Master with cheating and I remained legit for god say "x" contests, I'll loose just 50-70 points per contest and then, I'm still a cm with cheating?

          • »
            »
            »
            »
            »
            »
            7 days ago, # ^ |
              Vote: I like it +1 Vote: I do not like it

            I actually forgot people above experts too cheat :/ lol forgot to consider

      • »
        »
        »
        »
        7 days ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I don't know whether you cheat or not but if you are creating an application that defines a user cheater on the basis of just skipping of question, then you are also a cheater according to that application.

        • »
          »
          »
          »
          »
          7 days ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Actually the website he mentioned is still good! as that shows user cheated or got skipped in which contests but his extension just spoils profiles which even got skipped within last 8 rated rounds.

»
8 days ago, # |
Rev. 3   Vote: I like it +4 Vote: I do not like it

sdcb

»
8 days ago, # |
  Vote: I like it +6 Vote: I do not like it

I think this extension must flag the person who cheats in one contest of the last "x" contest he/she participated. sama004

»
8 days ago, # |
  Vote: I like it +5 Vote: I do not like it

There are some bugs brother, It is showing Um_nik and Shayan as cheaters. Plus I think you should add a check whether the skipped submission are on last 6 months(let) or in last n contests. Else Good work.

»
8 days ago, # |
  Vote: I like it +1 Vote: I do not like it
Hello,

Me and my Friends viewed your code, We have little suggestion to make it better or accurate.

Please replace participantType !== "PRACTICE"
this line of code with participantType === "CONTESTANT

Hope this will help you!

»
8 days ago, # |
  Vote: I like it +6 Vote: I do not like it

Lol no hate, but i use this extension to check some user's profiles, and one of those is of Errichto[ legendary grandmaster] who was also marked as a cheater.. like is it possible ??

»
7 days ago, # |
Rev. 4   Vote: I like it -18 Vote: I do not like it

I crossed 1400+ and participated using my alternate account in a Div4 contest.This was my first Div4 contest after reaching Specialist rank. I was afraid of losing my rank for the first time, so I made an alt account and participated from there. I didn't think I would be considered an official participant, and I know I'm guilty for that. Despite working hard, I've been labeled as a cheater mistakenly, when my intention was simply to submit, as it's my daily goal to code. I was not considered an official participant, and I acknowledge my guilt in this matter. There have been multiple cases where users create two accounts and submit from the second one after it's accepted to minimize penalties which I realized after being flagged but this was not my case . I submitted E,F in alternate account before i submitted here !!

»
7 days ago, # |
  Vote: I like it +1 Vote: I do not like it

As stated by some users already, this extension falsely marks people like nsqrtlog and Errichto as cheaters. This is because they've participated in contests where they've had to make multiple submissions, and their previous submissions get skipped just as a result of this. Given this, just counting the number of skipped submissions is probably not a good metric. What I would suggest instead is to only count a skipped problem as being illegitimate if there's no in-contest AC submission to that problem by the same person.

  • »
    »
    7 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Still not enough, check my submissions.

    Actually if a user is caught for plagiarism, it says Skipped with a '*' symbol. That should be used.

  • »
    »
    7 days ago, # ^ |
    Rev. 2   Vote: I like it +21 Vote: I do not like it

    What I would suggest instead is to only count a skipped problem as being illegitimate if there's no in-contest AC submission to that problem by the same person.

    That is exactly what the extension does and indeed the case for nsqrtlog and Errichto: they have only Skipped submissions in 1723 and 594 respectively.

    The thing is, it is possible to have Skipped on all of your in-contest submissions for reasons other than cheating. The problem 594A - Warrior and Archer had a mistake in the author's solution:

    Announcement from the contest page

    For some reason, at the time, this was handled by removing the problem from the contest, skipping all in-contest submissions and restoring a fixed version the next day. As a result, everyone who participated in that contest and only attempted 594A - Warrior and Archer is called a "cheater" by this extension. (sigma_mail, maybe you were right to not consider contests where only one problem was skipped).

    I don't know what happened with nsqrtlog, but it could be many things. Maybe they were involved in the preparation of the contest in some way and for some reason had to test something during and in the live contest.

    There are other situations like this, too. For instance, there once was a coordinator (I can't remember who) who participated in a contest and discovered after solving some problems that, unbeknownst to them, a problem which they had reviewed had been included in the set. They notified the admin of this and their submissions were skipped.

    Then there is VK Cup 2015 - Wild Card Round 2, where a lot of submissions are skipped for whatever reason, even if it is the user's last attempt.

    On a platform with a history as long as Codeforces, this is something you have to take into account when creating tools like this. You can't assume "condition X happens (if and) only if a user cheated". You also can't assume that unusual situations like wrong model solutions have always been handled the same way, or even that they have been handled the same way in recent cases, just because you checked a number of recent ones and noticed a pattern.

»
7 days ago, # |
  Vote: I like it 0 Vote: I do not like it

The status "Skipped" has multiple meanings and thus it's somewhat dangerous (possible false positives) to use the status as an indicator of cheating.

I think it would be nice if Codeforces adds a new status (say, "Flagged") specifically for solutions skipped due to contest rule violations (plagiarism, code obfuscation etc.). I guess this should be relatively easy to do. (I even want the user profile page to include some details about history of rule violations, but I understand it requires a good amount of engineering work.)

»
7 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Long back , i mistakenly gave 2 solutions to one of friend during the contest , at that time i didn't knew that codeforces has some verdict known as "skip" , but that resulted me in getting skipped for the whole contest. But i never copied anyone's solution and had been genuine throughout my cp journey. Would I be still flagged as cheater ? I mean dont u think you u should add some conditions before marking someone as cheater ? , like if(numContestSkipped > 1 ) then mark as cheater or smtg. Kindly look into it , coz umm it feels bad when u're called as a cheater for no reason. sama004

»
7 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Cool but why man city ?

»
7 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by sama004 (previous revision, new revision, compare).

»
7 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Robom_08 , Divy_2507 , notHuman9504 We have little suggestion for fix your bug.

replace participantType !== "PRACTICE" with participantType === "CONTESTANT"

Hope this suggestion helps you!

  • »
    »
    7 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yeah it is done in the new version. Thanks for your help. I was doing !== practice because i saw that there are only 3 types of participant type that is practice contestant and out_of_competition but actually there is another one virtual for virtual contests. Also doing only contestant won't work because when your solution is skipped you're marked out_of_competition

    https://github.com/Sama-004/cf-cheater-flagger/releases/tag/V1.5

»
6 days ago, # |
  Vote: I like it 0 Vote: I do not like it

This is a revolutionary idea!!

»
6 days ago, # |
  Vote: I like it 0 Vote: I do not like it

lol , l like the photo