macaquedev's blog

By macaquedev, 5 months ago, In English

I hope you all enjoyed the contest! Special thanks to:

Rate the contest!

A — The 67th Integer Problem

Solution
Rate the problem!

B — The 67th 6-7 Integer Problem

Solution
Rate the problem!

C — The 67th Permutation Problem

Solution
Rate the problem!

D — The 67th OEIS Problem

Hint 1
Solution
Rate the problem!

E — The 67th XOR Problem

Hint 1
Hint 2
Solution
Bonus
Rate the problem!

F — The 67th Tree Problem

Hint 1
Hint 2
Hint 3
Solution
Rate the problem!

G — The 67th Iteration of "Counting is Fun"

Hint 1
Hint 2
Hint 3
Hint 4
Solution
Rate the problem!

Full text and comments »

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

By macaquedev, 5 months ago, In English

Hello Codeforces!!

I (macaquedev) and damamila would like to invite all of you to my long-awaited Codeforces Round 1090 (Div. 4) on 04.04.2026 17:35 (Московское время)! You will be given $$$6$$$ or $$$7$$$ problems, and you will be given $$$2$$$ hours and $$$15$$$ minutes to solve them. We hope that you will find the problems interesting, and that all participants will learn at least $$$6$$$, $$$7$$$ or (ideally) $$$67$$$ things.

The format of the event will be identical to Div. 3 rounds:

  • ICPC rules with a penalty of 10 minutes for an incorrect submission;
  • 12-hour phase of open hacks after the end of the round (hacks do not give additional points)
  • after the end of the open hacking phase, all solutions will be tested on the updated set of tests, and the ratings recalculated
  • by default, only "trusted" participants are shown in the results table (but the rating will be recalculated for all with initial ratings less than 1400 or you are an unrated participant/newcomer).

We urge participants whose rating is 1400+ not to register new accounts for the purpose of narcissism but to take part unofficially. Please do not spoil the contest for the official participants.

Only trusted participants of the fourth division will be included in the official standings table. This is a forced measure for combating unsporting behavior. To qualify as a trusted participant of the fourth division, you must:

  • take part in at least five rated rounds (and solve at least one problem in each of them),
  • do not have a point of 1400 or higher in the rating.

Regardless of whether you are a trusted participant of the fourth division or not, if your rating is less than 1400 (or you are a newcomer/unrated), you may choose to participate rated or unrated.

Large text, to get your attention for the following:

PLEASE NOTE the rule restricting AI use. If you are caught using AI in an unorthodox manner, either by us manually or detected automatically, YOUR ACCOUNT WILL BE TERMINATED. I will be actively scouring submissions and terminating rulebreakers. Remember that the author of this round is also the creator and guardian of cry's basement, also known as the Cheater Database.

Anyway, I would like to say a massive "thank you" to all the following people for making this round possible:

Update: Editorial is here.

Full text and comments »

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

By macaquedev, history, 5 months ago, In English

I'm going to preface this blogpost by saying that nothing, really, ever surprises me. Anyone who knows me in person will testify to this; I am not a person who is easily shocked, outraged, surprised, etc.

However, when you create a project that becomes famous / notorious within hours of release, and ten months later you see an AI-generated PowerPoint about your own project on Scribd, which has.... completely incorrect information.... on it, and claims that the project was not developed by you, but by someone who you've never met and do not know, don't you agree it's quite hard not to be surprised?

Well, this happened to me today, with the Cheater Database that you're all so familiar with. And here's the presentation, that claims that the project that I spent my free time creating (and later received some help from AksLolCoding) was created by... Prabal Pratap Singh, an individual I do not know and have never met. The account that posted the PowerPoint is called "swastkpandey" — one can only wonder whether there is any relation to the notorious cheater swarya that keeps spamming about a billion comments under every blog.

Can we please put an end to this garbage once and for all, and get rid of these people's accounts from Codeforces?

Full text and comments »

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

By macaquedev, 5 months ago, In English

Because the official editorial is slow, here's mine.

A: look at the arrow colour and orientation — each arrow type is paired up with another identical arrow — other than C2.

B: find the unicode symbol of the emoji in the problem description (1F601)

C: inside the mash of letters, the phrase "XOR MINUS MEDIAN" is encoded, take the xor of the three numbers and subtract the median to get the answer.

D: I don't even fucking know. walk, no, no, no, yes, yes, backwards, seven. Am I a human? Am I an AI? Am I pretending to be a human? An AI? I think I'm doing a bad job at pretending to be both. Ergo I must crawl into a hole and have an existential crisis. Six seven. Six seven. Six seven.

E: pay attention to the spelling of "dikjstra" — this is a reference to mixing up the variables in floyd-warshall's algorithm. Code it up with the three loops in the order "i, k, j" and you get the answer. Trivial, really.

F: someone enlighten me.

G: look at the submissions of "AprilFoolsClairvoyant". He submitted to B, then, I, then G, etc... this spells out BIGCHADJEFF. find the ith character.

H: https://piellardj.github.io/stereogram-solver/. How the fuck do 67676767 people know about this and not me? Cheaters. Rampant cheaters.

I: The three laws of robotics. Isaac Asimov. Robot strategy is to minimise the number of dead humans, then the number of dead bots. I realised the human part but not the bot part..... :(

J: unfortunately there's no smart way round this — just solve all the captchas....

Rest in peace, my dear old sanity, that I never had any of anyway.

Full text and comments »

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

By macaquedev, history, 13 months ago, In English

Hello Codeforces,

My Cheater Database has just surpassed 2000 caught users! I write this blog to mark this momentous occasion — and would like to thank everyone who has sent reports, whether or not they were accepted. I would also like to thank my amazing admin team, who have also contributed to the development of the site and accepting reports.

Finally, I would like to thank whichever kind soul in Mumbai, India (according to Vercel) decided to DDoS the site the other day, your service to the community is greatly appreciated.!

Now, a few important points that I should reiterate, to ensure both the site and the Codeforces community stay as positive as possible:

  • Please STOP polluting "recent actions" with blogs about cheaters. It's not really a good experience for anyone, whether new users or veterans, to open up Codeforces and see a billion new blogs about some random new GPT cheater. It also won't speed up the process of them getting banned from the site. It's just irritating, so don't do it.
  • I am not a Codeforces admin, nor is cry or any other contest writer. Therefore, asking us to ban people is useless, because we simply do not have the power to do this. What we are already doing is reporting high-rated cheaters to the admins directly, and this issue is slowly getting dealt with, so please be patient.
  • When writing reports, please send specific submission links. As admins, it wastes our time when users just send us links to the user's profile.
  • Please refrain from writing racist comments/blogs about cheaters. Cheating is bad, full stop. No need to weaponise the cheating issue on this site to justify your racist prejudices, there is simply no way doing this can possibly be good for anyone involved.

Also, a number of users have complained that not all cheaters are showing up as cheaters on the Chrome extension. This has been fixed, and it is due to an extremely stupid bug that I let through on an old version of the extension. Please update to the latest version of the extension, and this will no longer be an issue.

Finally, if anyone wants to fix the Firefox version of the extension, please go ahead and do so, then make a PR, because I don't have a clue how Firefox extensions work.

Full text and comments »

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

By macaquedev, history, 14 months ago, In English

So yes. The person who created the Cheater Database, macaquedev, is a cheat himself. I apologise wholeheartedly to the entire CF community for my immensely hypocritical actions of cheating in today's div3 round, after literally creating a Chrome extension to highlight cheaters.

You may ask, how did macaquedev cheat? macaquedev didn't even participate.

Well, enter macoquedev and mocaquedev. Two more accounts. Both belonging to me, obviously. Clear violation of every rule in Codeforces. And why do I have these alts, you may ask?

Open hack phase. That's why. I like hacking. Unfortunately, MikeMirzayanov and other CF admins have made it unbelievably difficult to do any meaningful hacking, because straight after submitting two (2) hacks, I got ratelimited and was unable to submit anymore. I literally didn't even participate in the round, I just opened two submissions, submitted two hacks, and boom. Rate limit. So in order to continue hacking, I unfortunately had to view submissions on this account (the only one I participate on), and then submit hacks on the other two accounts (well, originally only one of them, but then that got rate limited as well). How ridiculous is that?

So yeah, a message to the CF admins. I love your work and the platform you've created, I really do. If you have the time and energy to ban those alts, go ahead, they mean nothing to me anyway. But can you please use that time and energy to just remove the rate limit.... at least during the hack phase? Then maybe I wouldn't need to create two more accounts just for the purpose of hacking :(

Full text and comments »

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

By macaquedev, history, 14 months ago, In English

Hello Codeforces!

I have now created a brand-new frontend for the cheater database that has been circulating in your CF recent actions for the last 48 hours. So now, please do NOT DM me or Proof_by_QED or cry. Now, you can submit reports here

Just a reminder that reports:

MUST contain conclusive evidence (just linking their profile and saying "he cheated" is NOT enough) Cannot contain too many submissions (we are human after all, we don't have all the time in the world) MUST have usernames spelt correctly. Case sensitivity is not important.

Here it is: https://cf-cheater-database.vercel.app/

Note that the Chrome extension remains unchanged and still works.

UPDATE 26/06/2025

Hello Codeforces!

It's been amazing seeing you all contribute to this project — so thank you very much for doing so. I need to share some updates.

  1. APPEALS — now, if you feel you have been wrongly labelled as a cheater, you can submit an appeal directly on the website. Therefore, do not spam the blog further, and use the website.

  2. CHROME EXTENSION — some people have reported a bug with the chrome extension where it does not highlight all cheaters. This was a genuine coding mistake from me, due to which I have released a NEW VERSION of the chrome extension. Please redownload it from GitHub and reinstall if you downloaded the extension before today.

  3. OUTAGES — some people reported outages — these are again the fault of the developers, and the issues have been fixed.

  4. POLICY – Add ALL cheaters to the platform, no matter how they cheated. Submit concise reports with clear, conclusive evidence — full profiles will be ignored. If a report is declined, gather stronger proof before resubmitting; do not spam the same report multiple times. If you are submitting a report and see a skipped submission/contest, you can attach it, but the mere existence of a skipped contest does NOT constitute conclusive proof that the user is a cheater, especially because Codeforces marks all but the last AC submission as Skipped in Div 1 and 2 rounds.

Thank you again for all of the support, with your help, we are well past 1000 cheaters in the database and this number is quickly increasing.

Full text and comments »

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

By macaquedev, history, 14 months ago, In English

It's been great seeing people report quite a lot of cheaters. I think I need to issue an update.

  1. About 100 cheaters were caught yesterday, thanks to your help.
  2. If you've submitted a report and I haven't replied, it's not because I've ignored you. It's because CF has ratelimited me — and it doesn't let me send messages to more than 2 distinct users in a day.
  3. Everyone who submits reports is ANONYMOUS — I will NOT be revealing the names of anyone who reports cheaters.
  4. Please don't send me 10 submissions — that's a waste of my time. Find one or two, or maybe three, which confirm that the person's obviously a cheater, so that I can just add them and move on. I received a report yesterday where the person sent about 15 submissions, none of which had conclusive evidence, but one quick look at the person's profile revealed obvious GPT usage.

I will be writing a frontend hopefully soon!

Edit 24/06/2025 12:50 — submissions made outside of contests ARE NOT CONSIDERED CHEATING, so don't send them to me please. And don't worry, if you've submitted with GPT outside of contest time, you will NOT be flagged.

Full text and comments »

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

By macaquedev, history, 14 months ago, In English

Well, I've got the perfect Chrome extension for you.

A prolific team of problemsettorz, more commonly known as the testuwuers, or cry's basement, have come together to create a database of CHEATERS. And I, one of his most faithful disciples, together with ChatGPT, our archnemesis, have created a Chrome extension, which edits the way Codeforces displays on your machine, and highlights every user who has been found by us to have cheated with GPT in past contests.

If YOU want to join in on the fun, go here and follow the instructions, and you will also see cheaters glowing in shame.

If you find cheaters, you can DM them to me (**with concrete evidence please**), and we will investigate and update the database. Currently it's only got about 150 users but that number will increase very fast.

Full text and comments »

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

By macaquedev, history, 15 months ago, In English

Manoj_mk phoenix_beast117 sukhbir0609 1091857051 cai_lian_2023 HARSHdeep1234 (I think that's all of you)

That was me. Hi, I guess.

Or rather, it was you, submitting in an old version of Java, and using Arrays.sort(), that caused you to get hacked. Unfortunately, it's possible to make Arrays.sort() take O(n^2) time when sorting primitive data types — and that's because it ends up defaulting to quicksort, and if I use a certain script that I don't even understand properly, I can create an array specifically to cause quicksort to use the worst possible pivot at each iteration. That's why you all got hacked.

If you don't want to be hacked or FST, use Collections.sort(). But also, why don't you just use the newer Java version?

Full text and comments »

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

By macaquedev, history, 17 months ago, In English

Prior to yesterday, there were some cheaters who managed to get to red, who were smart enough to evade detection, and prompted LLMs in a very careful way to get maximal performance out of them, for example lequoctran181.

However some of them just don't even try to hide it. It's actually pathetic, and with yesterday's release of o4-mini and full o3, we'll have hundreds if not thousands of them reaching red... ugh.

arnabmanna 309859410 309858141

Just look at this. It's actually just sad at this point...

Full text and comments »

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

By macaquedev, history, 18 months ago, In English

Intro

Addition modulo p is simple, just add the two numbers, then modulo the result. Multiplication is also simple — multiply then take modulo. However, subtraction cannot be done in this way. This caught out quite a few people in today's Educational round due to the weak pretests on problem C, and I wanted to make a blog about it so that hopefully this doesn't happen again.

The pitfall

Take this: 306786744 submission for example. There were plenty that did exactly the same thing, but I just picked this one because it's relatively short. Specifically, let's look at the following line of code:

ans = (ans+one-onemain)%MOD;

You might think — what could possibly go wrong here? You're just adding and subtracting some numbers and taking modulo. Quite a lot as it turns out. The issue is that in C++, the modulo operator does not work well with negative numbers, and will just give you a negative remainder. This causes a problem because when I carefully (read: ask GPT to) construct a countertest, I can exploit this incorrect behaviour of the modulo operator, and cause your code to output the wrong answer. The way it's done is that I try to create a testcase where onemain is large, and ans+one is small (in this case, has just been wrapped round by the modulo operator). Now, we've got a negative number, and we take modulo, so now the calculation just outputs a negative number and you got hacked.

How to ensure this doesn't happen to you?

Two ways:

  1. Make sure to add MOD after subtracting two numbers, then take the modulo of the result. If we correct the code to ans = (ans+one-onemain+MOD)%MOD;, everything passes.

  2. Just use a modular arithmetic template. It comes up in so many problems, so I think it's a waste of time writing all this MOD stuff out every time, and it could save you a lot of WA, or if you're REALLY unlucky like today, FST.

Hope this helps someone!

Full text and comments »

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

By macaquedev, history, 19 months ago, In English

Hi guys!

In the last div3 I hacked a couple of submissions that used quicksort. For some reason, I'm failing this time.

305347283

This submission uses an array of primitives, then uses Array.sort() which should be hackable. My generator is as follows

std::vector<int> anti_sort(size_t n) // 2n + 1
{
    std::vector<int> res(2 * n + 1);
    std::iota(res.begin(), res.end(), 1);
    // std::reverse(res.begin(), res.end());
    for (size_t i = n; i-- > 0;)
    {
        std::swap(res[2 * i + 1], res[i + n]);
    }
    return res;
}

signed main(void)
{
    auto v = anti_sort(99999);

    cout << "1" << endl;
    cout << "199999 1" << '\n';
    for (int i=0; i<v.size(); i++) 
        cout << v[i] << endl;
    return 0;
}

Why does the hack not work? And can someone suggest a hack that WILL work?

Full text and comments »

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

By macaquedev, history, 20 months ago, In English

.... is having weak pretests on not one, but TWO problems in today's Div2 round...

To all the people I hacked on A (including GM Hamed_Ghaffari), I'm sorry. It's such an unbelievably braindead hack. All I had to do to hack you guys was find a number just below a very very big power of 4 (288230376151711674 worked), and then the log functions output some form of overflowed garbage that made your solutions output a number that was twice as big as it should have been.

On C, somehow we had blatantly O(n^2) solutions getting unpunished, for example this one: 298315499

This works well for random tests (because the alternating 1's and -1's make the range of possible sums quite small, so just doing an unoptimised:

for (auto i : st1)
{
    for (auto j : st2)
    {
        ans.insert(i + j + arr[pos]);
    }
}

works... but it's very obvious how to make a countertest (just have lots of 1's, then 100000, then lots of -1's, then you have a nested loop that runs about 10^10 times, which will obviously TLE in any language)

It's just so sad when tests that are this obvious don't get added to the pretests.

Full text and comments »

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

By macaquedev, history, 22 months ago, In English

Hello codeforces,

It has been brought to my attention that a certain myst-6, the author of today's esteemed div2, spoiled part of the contest to his friends.

This is truly shocking news, and I expect the community to take action against this great injustice.

Full text and comments »

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

By macaquedev, history, 2 years ago, In English

I don't know what the significance of this number is, or why it's in about 300 submissions to yesterday's problem F which all either got hacked or FSTed... does anyone have any ideas what 855401101 stands for?

279564452 279584685 279589992

what on earth is going on here

Full text and comments »

  • Vote: I like it
  • -11
  • Vote: I do not like it

By macaquedev, history, 2 years ago, In English

See this... How the hell does creating a 1e5 ish sized array 1e4 times pass?? I think he's probably hacked Codeforces or something...

Full text and comments »

  • Vote: I like it
  • -45
  • Vote: I do not like it

By macaquedev, 2 years ago, In English

This contest had problems. A,B and C were suboptimal.

A and B were fully-GPT solvable. Paste statement into GPT, solve and done.

My friend got within the first 20 submissions on B with GPT despite submitting a wrong answer on both A and B. I got A and B within 6 minutes without GPT but clearly it could have been even easier with GPT. This can discourage new participants on codeforces from actually trying to solve the problem, when it’s simply easier to paste the problem into GPT and get a quick solve. Problem B was around 600-700 rating difficulty and so anyone below this rating would have experienced a rank increase by just pasting the statement into GPT and submitting. In fact, the problem is worse than this. Since C’s difficulty was around 1465, it was possible to get a 1430 performance from just A and B, so in this contest GPT would get 1430 performance, significantly above the average participant. This shows how codeforces is falling to GPT, and how much harder it is getting to write problems that cannot be easily solved by GPT. This however is a necessity to keep contests interesting for all participants.

The third problem was an interactive. It was a nice problem, however it is misplaced in such a contest. Many participants (myself included) have struggled severely with the interaction, and what is more, on the announcement it did say there would be an interactive problem, but in small, non boldface print. It should be a law for any interactive problem to be mentioned in 48 pt size bold underlined italic text to ensure that it is not missed, and to ensure that this problem is accessible to everyone.

Full text and comments »

  • Vote: I like it
  • -73
  • Vote: I do not like it

By macaquedev, history, 2 years ago, In English

So, I joined today's round with pretty high expectations, because I enjoy trying to speedsolve div3's and 4's However, the problems today were truly awful and rife with issues.

Let's start with Problem A. It's probably the easiest problem ever seen on this site. As soon as the contest began, submissions poured in by the thousands, clogging up the queue. It was chaos. I ended up submitting C and D before even finding out if my B submission was correct.

Speaking of Problem B, it was a nightmare of unclear instructions, leading to a flood of Wrong Answer submissions from thousands of people. "For a better understanding, please check the notes section." Seriously? That’s just pathetic, and so lazy...

Surprisingly, Problem C was decent, but Problem D? An absolute disaster! The weak pretests allowed a flood of grey Python/C# users to fail miserably when my braindead brute-force hack of:

1
?????????????????????????????...
abcdefghijklmnopqrstuvwxyzabc...

caused a whole page of submissions to topple like dominoes. And don’t get me started on the terminology — it's "contiguous subsequence," not "continuous." Google could have corrected you, for crying out loud!

Then there was E. Another nightmare with weak pretests and ridiculous O(nt) solutions passing (and of course, the legendary stils somehow using some kind of black magic to withstand about 300 hacks of a nonsense O(nt) solution, including about twenty from my friend myst-6). Of course, it is even in the contest creation guidelines to ensure that "stupid bruteforce solutions" don't pass, but I guess the rules maybe didn't apply to today's contest? Lord knows.

And just when I thought a good problem came up, one I actually rather enjoyed solving, I get a message straight after the contest from a certain AG-88301 telling me that GitHub Copilot solved this problem with no input from him???? I thought it was common sense to run problem statements through generative AI to make sure they aren't instantly solved, but I guess not for today's problem writers.

And then after all this, we're hit with just about the most standard ternary search question in existence? It's not even funny at this point, it's just embarrassing.

Rant over. I hope those who deserved rating got it. In a perfect world, low-quality contests like this wouldn’t happen, but in our flawed reality, it’s just another day.

Full text and comments »

  • Vote: I like it
  • -63
  • Vote: I do not like it

By macaquedev, history, 2 years ago, In English

Just when I wanted to try and figure out what the whole barrage of hacks was about in the last div3 I discovered this:

prodigy_tourist is hacking their own deliberately bogus submissions on their alt account olympiad2027... and it's obvious that samin07 thinks they will get rating points out of hacks, but they won't in a div3!

Seems like a silly way to out yourself as a cheat...

update: yes please keep downvoting me, I've got the third most downvoted comment in all of Codeforces and it's a badge of honour

Full text and comments »

  • Vote: I like it
  • -2
  • Vote: I do not like it

By macaquedev, history, 3 years ago, In English

There have been like hundreds of blogs about people finding blatant cheaters on this site, thought I'd add one...

https://codeforces.me/contest/1926/submission/247357457

at least try to hide it please...

Full text and comments »

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