AI Cheating Prevention During Contests
Hello everyone,
With the rapid advancement of AI tools, maintaining fair competition has become increasingly challenging. While no technical solution can completely eliminate cheating, I believe there are several measures that could significantly increase the effort required to misuse AI during live contests.
I would like to propose adding an optional "contest protection mode" for the duration of official Codeforces rounds.
Proposed features
1. Disable text selection and copying on problem statements
- Prevent selecting text with the mouse.
- Disable common copy shortcuts such as Ctrl+C.
- Disable the context menu (right-click) on problem statements.
These techniques are not foolproof, but they discourage casual copying and make it less convenient to paste the statement directly into an AI assistant.
2. Make screenshots more difficult where possible Modern web browsers cannot reliably prevent operating-system screenshots, so I understand that this cannot be completely solved on the web. However, if there are browser features or experimental approaches that can make automated capture more difficult, they could be worth investigating.
Why this is useful
These protections will not stop a determined cheater. Someone can always:
- Type the statement manually.
- Take a photo with another device.
- Use OCR or other workarounds.
However, security is often about increasing the cost of abuse rather than making abuse impossible.
Today, many AI-assisted cheating attempts are extremely easy:
- Copy the statement.
- Paste it into an AI model.
- Receive a solution within seconds.
Even adding a small amount of friction may discourage opportunistic cheating and help preserve the spirit of the contest.
Important considerations
These protections should only be active while the contest is running. After the contest ends, the problem statement should return to its normal behavior so that participants can:
- Copy sample tests.
- Quote parts of the statement in editorials or discussions.
- Translate or study the problem.
- Use accessibility tools as usual.
Final thoughts
I fully understand that this proposal is not a complete anti-cheating solution. Client-side restrictions can always be bypassed by determined users.
Nevertheless, I believe that making AI-assisted cheating less convenient could improve contest integrity with relatively little impact on honest participants, especially if these measures are enabled only during active contests.
MikeMirzayanov, thank you for creating and maintaining Codeforces. I would like to hear your thoughts on whether this proposal could be considered.
Thank you for reading.








Good solution to prevent cheating from cf!
Your idea is good. But there are multiple issues:
How about preventing AI from writing blogs?
GOAT
What specific food can I eat to increase my efficiency in the contest?
Dark chocolate with a higher cocoa percentage, fish, eggs, nuts — the goat, and drinking more water. That is all. You also have to consume a lot of calories to fuel your brain
I don't think it matters. As my coach likes to say, being concerned about the food you eat before contest is probably hurting your performance more than actually not eating well.
(As an n=1 study I do rounds on a breakfast of 320 calories of light and fit greek yogurt. 48g of protein tho)
Honestly I don't really care, I just wanted to see how they would respond if I wanted to find out more
oh wait i see lmao
Potion of Swiftness
nah, use Potion Of Night Vision so that you don't get tired trying to solve A at 3 AM for 90 minutes
I gave the full idea and AI gave the implementation only
damn
lolllll
this is mary shelley's frankenstein from 1818. these detectors mean nothing
damn, can't believe that Mary Shelley used AI
I gave the full idea and AI gave the implementation only.
But there is a way to cheat. If a cheater cannot take screenshots or copy text, they can just use their phone to take a photo
yeah, i think rating is useless; cz you know a lot of peoples using AI and cheating in live contests, what do you think about rating?
Since cheating in contests has made it feel like that rating is useless, but the rating is the only thing that preserves the spirit of competitive programming. Without rating, it's simply obscured DSA problems!
One thing you definitely don't know is that, almost all problem statements have anti-AI prompt. This mean that, copying the problem statement and then give it to an AI result in a higher chance of being caught. However, cheaters can bypass this by taking screenshots, so I agree that we should find a way to prevent them taking screenshots.
Or, they simply just give a few seconds to read the task and delete these anti-AI prompts ;-)
i'm guessing this won't be worth the effort. people will just screenshot, which is worse than copying since at least while copying you can add some hidden prompt to the statement. there is no (for privacy reasons) reliable way to prevent screenshots on desktop OS's.
¡Exactly! You are right. It is not worth the trouble; those AI-systems are now trained quite well to detect those anti-AI prompts and just ignore them (I have tested quite much of them)… It is just a race-game between the cat and the rat… This platform here is a place to learn which implies that it is an offer; you cannot enforce it. Those who are unwilling to learn are always going to find a way to not to learn (and to get the virtual number here which is a good motivation to learn; but does not provide any advantages in the real world without learning something…
ya it must be adopted
Yup, i'm in the same perspective with this author.
We cannot make an environment with Zero-Cheating system. However, we can improve our community security system so that it can implies to make other people will more respect the fire & integrity of competition.
As with all the other posts of this form, none of these are viable solutions. It adds minimal friction while having the potential to prevent legitimate users from competing. Having to take a screenshot instead of copy paste is basically no added friction; they just use prtsc and select a loose region easily. This will make it more annoying for legitimate contestants from translating the problem statement if they need to. Preventing screenshots would involve DRM which not everyone can/wants to install.
I implore everyone on this platform who is planning on posting a future blog with a similar premise to 1) stop and think about how their proposal might adversely affect legitimate contestants, and 2) whether it is likely that Mike has already thought of such a solution (and is either already implementing it or, more likely, deemed it to be more harmful than beneficial).
Thank you. You speak from my heart :)
This cheating stuff feels really out of hand and is very discouraging. Can we please conduct off-line contests more often with proper monitoring of so each and every player? It's really hard to believe that there are a ton of beginners who perform better than some grandmasters? Is this believable? I know there can be a possibility of a temporary account made by a GM or someone good at solving problems. But not everyone of those beginners seems to be a GM.
One more thing, personally I struggle a lot on CodeForces. I need like 5-6 attempts for a relatively difficult problem. How all of a sudden the beginners swoop the contest with a single attempt.
One more thing which I observed Arpa was struggling with one of a question recently. I'm not sure, but I think it was C from Div 2. He solved the question question after like 1 hours 10 mins. If he was struggling with that respective question, it doesn't feel natural for 6000-7000 people solving it during the contest.
If contestants are allowed to submit their code written in an external IDE, AI-assisted cheating would be just easy as taking a photo. A promising idea is only allowing submission from an internal IDE, which is built-in in Codeforces. We can disable pasting to force cheaters handtype their code, and slow down them.
Offline contests use limited network access to prevent AI-assisted cheating. For online contests, as contestants can't submit their code without Internet, it is just impossible to stop cheaters. The golden rule is making AI tools hard (or inconvenient) to use during the contest.
some people need to copy paste statements for translation