HBar26's blog

By HBar26, history, 2 weeks ago, In English

Hello Codeforces Community,

We always talk about Alice and Bob. We talk about the tragic erasure of Bob, or how they always play optimally. But can we please check in on Polycarp and Monocarp? Because I’ve been reading recent problem statements, and I am genuinely concerned for their mental health. Alice and Bob are sophisticated. They sit down, they play a beautiful game with a matrix or a string, and they go home. But Polycarp and Monocarp? Their relationship is pure, unadulterated chaos. Let’s look at the facts:

  1. The Extreme Financial Irresponsibility Polycarp never just buys a normal amount of something. If he wants candy, he doesn't buy a bag. He buys n candies where n ≤ 2 ⋅ 10⁵, and each candy has a distinct weight (a_{i}). Why? Why are you buying two hundred thousand pieces of candy, Polycarp? And then, instead of eating them like a normal human being, he sits on the floor with Monocarp and spends 3 hours trying to divide them so that the absolute difference between their total weights is minimized. Just use a scale, man. Or go to therapy.

  2. The Absurdly Rigid Boundaries Have you noticed how they can never just do a normal activity together? If they go for a walk on a graph, they have to take the shortest path, but only if the weight of the edges is a prime number. If they are eating chocolate bars, Monocarp starts from the right and Polycarp starts from the left. If they accidentally touch the same piece of chocolate at the exact same millisecond, the whole friendship breaks down unless one of them yields "like a true gentleman". Who lives like this?

  3. Polycarp is Monocarp's Worst Enemy Monocarp will literally just be minding his own business, preparing an array for a contest. Polycarp will walk into the room, choose a random permutation p of length n, and completely shuffle Monocarp’s array while he's in the bathroom. Then Polycarp smiles and says, "Hey bro, I'll give your array back, but only if you can sort it using exactly k operations where you invert the suffix." That isn’t a friendship. That’s a hostage situation.

  4. The Gift-Giving Trauma When normal friends give gifts, they buy a shirt or a video game. When Polycarp buys a gift for Monocarp, he puts it in a box locked with a multi-layered string encryption. Monocarp has to find the number of distinct palindromic substrings just to find out if Polycarp bought him a pair of socks.

Conclusion: Problem setters, I beg you. Let them go to a cinema without calculating the maximum number of people they can sit between to maximize their social anxiety. Let them buy a coffee without checking if the price is a coprime to the number of sugar packets.

Pls do somethng to help Monocarp. He has been putting up with Polycarp's behavior since 2010, and he deserves a normal friend.

Full text and comments »

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

By HBar26, history, 2 weeks ago, In English

Hello Codeforces community, We’ve all been there. The countdown hits zero, the contest starts, and you open Problem A. It looks simple. Too simple. You rush an implementation, hit submit, and... Pretests failed on test 2. Suddenly, the panic sets in. You look at the scoreboard, see that 3,000 people have already solved it, and your heart rate doubles. You spend the next 15 minutes aggressively patching your code with random if statements instead of finding the actual flaw. By the time you fix it, your penalty time is ruined, your mental stamina is drained, and Problem C feels completely impossible. Lately, I’ve been analyzing why my performance varies so wildly between practice and real rounds. I realized it rarely comes down to not knowing an algorithm—it’s almost entirely about contest psychology and bad coding habits. Here are the three biggest traps I’ve noticed we fall into, and how to avoid them:

  1. The "Speed Demon" Fallacy

We are so obsessed with getting a fast solve time on Problem A and B that we skip reading the constraints or handling edge cases. • The Fix: Spend exactly one extra minute after writing your solution to mentally test it against extreme values (n=1, (A_i = 0), or max constraints). That one minute of patience saves you a 10-minute penalty and a massive tilt.

  1. The "Frankenstein Code" Strategy

When a solution fails a pretest, our instinct is to append ugly, chaotic fixes to our current code. We build a tower of nested loops and edge-case exceptions until the code is unreadable. • The Fix: If your logic is inherently flawed, delete it. It takes courage to clear your IDE, but rewriting a clean version from scratch based on a correct idea is always faster than trying to fix a fundamentally broken approach.

  1. Scoreboard Watching

Checking the standings every 3 minutes is the fastest way to destroy your focus. Seeing people outpace you creates artificial urgency, forcing you to rush problems that actually require calm, logical derivation. • The Fix: Hide the scoreboard. Treat the contest like a private virtual round until the last 15 minutes. Your only opponent is the problem setter. I’m curious to hear from others—especially those who managed to transition from Pupil/Specialist to Expert and beyond. What was the biggest mental or tactical shift you made to stop throwing away your rounds?

And a lot of thanks to Mike Mirzayanov for creating polygon and codeforces, and thanks to the cf community for using theese GOATed sites like it is supposed to.

Full text and comments »

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