Yep, I finally became LGM, that's it. AMA
Hi! Today I saw some terrible, hateful, harassing comments on Codeforces, which, I believe, should get their author banned instantly. However, it turns out you can't report comments made three weeks ago, and there is no report button inside the author's profile, so really if they hadn't posted one (!) comment two days ago, I wouldn't have been able to do anything. In this particular case, I could report their last comment, but there won't always be a recent last comment.
This post, of course, is about the huge need for a report button inside profiles. But my thoughts don't stop here.
Lately, with the development of AI, the number of successful cheaters, and thus the overall number of cheaters, has increased significantly. Nowadays I see a lot more heated discussions about who cheated and who didn't than before. People throw baseless accusations on unrelated blogs, in unrelated threads, spread hate and overall act like cavemen. And let's be honest, most of these people are the ones who are affected the most — grays, greens, etc. IMO, if I were gray today, it would demotivate me a lot that a bunch of angry hateful idiots, who are obviously the most vocal people on the platform, make low-rated people look like lunatics.
I feel like something should be done, for example, untrusted accounts should be deprived of their commenting rights. And returning to the beginning — there should be a clear profile report system. I don't mean a cheater report system, that's just not the best idea, since there aren't enough people to check all the cheating reports manually. However, profile reports are a whole other story — first, it's easy to just check the latest blogs and comments, second, it can be automated with the use of AI (ironic, huh).
Thank you!
Please investigate this grandma: k1r1t0. He is a cheater 100%. There is no evidence but who cares have you seen his ugly code? His code is so ugly and his performance is so unstable. Terrible. Terrible cheater!!!!!!!11111111
Here are his suspicious sob missions:
(insert crying emoji here)
I mean, are there any secret websites where you can solve secret chinese problems all LGMs know how to solve or something?
The idea behind my solution is that in the optimal path you don't enter any vertex after the first time it can be entered + n. I wonder if there is a proof that this works correctly or a way to disprove it, but I'm having trouble finding either. If anyone is interested, please help.
Recently I was trying to solve the following problem: 102441E - Очень простая сумма.
In process of solving it, I realised that I need to use xor convolution and just copied FWHT code somewhere from the internet. My solution passed, but I wanted to know how does it work, so started searching info on FWHT and xor convolution.
After some time of going through endless blogs talking about weird matrices and other difficult stuff, I decided to reinvent everything on my own, as I always do. Here I will describe a simple algorithmic way to look at xor convolution, I hope that it doesn't contain any crucial mistakes and will be useful for you.
Let the size of the arrays be $$$2^n$$$, we want to calculate
for all $$$0\le i\le 2^n - 1$$$.
If we look at halves of the arrays separately, first half consists of indices with $$$n$$$-th bit set to zero, and the second consists of indices with $$$n$$$-th bit set to one, so the sum becomes
where $$$X0$$$ is the first half of $$$X$$$ and $$$X1$$$ is the second.
Let's take a look at the xor convolution of $$$A0+A1$$$ and $$$B0+B1$$$:
Here I will describe a way to maintain deque that will allow us to find the smallest element in deque at any time. Maybe this technique is well-known, but I couldn’t find any info about it, so decided to post it there.
First, we want to maintain stack with the ability to find its smallest element whenever we want. Let's store minimums on the corresponding prefix of stack along with elements. This way we can easily push/pop elements and find minimum in $$$O(1)$$$.
Minimum Queue can be maintained using two Minimum Stacks: one stack will store some elements from beginning, and the other from the end. We will push elements to the second stack and pop them from the first. If the first stack becomes empty, then we move all elements from the second stack into the first. It will work in $$$O(N)$$$ amortized.
Actually, we can maintain Minimum Deque the same way we maintain Minimum Queue, but it will be too slow. The problem is the number of moved elements: in the worst case we will move all elements every operation by removing first and last element alternately. So instead of moving all elements let's move only a half of them at a time. Turns out it works in $$$O(N)$$$!
But how to prove it? Let $$$k_i$$$ be the number of elements deque contained right before $$$i_{th}$$$ operation of moving elements between stacks, the algorithm above obviously works in $$$O(N + \sum k_i)$$$. Also $$$k_i = \frac{k_{i-1}}{2} + q_i$$$, where $$$q_i$$$ is the number of elements added between operations $$$i-1$$$ and $$$i$$$. We can see that $$$q_i$$$ contributes $$$q_i$$$ to $$$k_i$$$, $$$\frac{q_i}{2}$$$ to $$$k_{i+1}$$$, $$$\frac{q_i}{4}$$$ to $$$k_{i+2}$$$ and so on. It follows that $$$q_i$$$ contributes $$$O(q_i)$$$ to $$$O(\sum k_i)$$$. $$$\sum q_i$$$ is obviously $$$\leq N$$$, so $$$O(\sum k_i) = O(N)$$$. That's why the algorithm above is $$$O(N)$$$ amortized.
Thank you for participating in #25!
104743A - Make All Elements 0 by Think_Only_Once:
104743B - Array Construction by wuhudsm:
104743C - Prefix MEX Problem by pavlekn:
104743D1 - Prefix XOR Problem(Easy Version) and 104743D2 - Prefix XOR Problem(Hard Version) by pavlekn:
104743E - Range Modulo Queries by Ashutosh.Singh:
104743F - Yet Another Tree Problem by aryanc403:
Hello, Codeforces!
We are glad to invite you to TheForces Round #25 (5^2-Forces), which will take place on 29.10.2023 17:35 (Московское время)
You will be given 6 problems and 2 hours to solve them.
The round is TheForces rated! After the round you can find your rating changes here.
Prizes: the participant in the $$$i$$$th place will receive $$$2^{3-i}$$$ dollars $$$(1 \leq i \leq 3)$$$ as a prize. In addition, we will randomly select $$$\lfloor \frac{p}{30} \rfloor$$$ lucky participants and give each of them $$$1$$$ dollar as a prize, where $$$p$$$ is the number of participants. Please actively participate!
You can get more information about theforces rating and prizes in our discord server.
We want to thank:
physics0523, wuhudsm $$$-$$$ for coordinating the round.
wuhudsm, pavlekn, aryanc403, Ashutosh.Singh , Think_Only_Once $$$-$$$ for developing and preparing problems.
physics0523, blxst, pavlekn, Ashutosh.Singh, Banis, plata0plomo, HexShift $$$-$$$ for testing this round.
Also we want to thank You $$$-$$$ for participating in our contests.
Congratulations to the winners:
1.Kude
2.siganai
And $$$3$$$ lucky participants(we only count people who have submitted at least once):
(Pls DM wuhudsm in CF or Discord for your prize :) )
Editorial published
104683A - Banis and Cards by Banis
104683B - Left or Right Shift by wuhudsm
104683C - Yet Another ÷2 or +1 Problem by wuhudsm
104683D - Sum and Difference by Banis
104683E - L-shaped Dominoes by chromate00
104683F1 - Maximum Flow in DIV3?(Easy Version) and 104683F2 - Maximum Flow in DIV3?(Hard Version) by astilate
104683G - Useless Trick by amenotiomoi
Thanks you for participating in TheForces Round #18! Here is editorial:
104443C - Morco-Feely Palindromes
Hello, Codeforces! We are happy to invite you to TheForces Round #18 (JuneIsApril-Forces), which will take place on 23.06.2023 17:35 (Московское время) (which is unusual)
Problems of this round will have the April Fools style, Registration is open now!!
You will have 120 minutes to solve 8 problems.
Problems were prepared and authored by k1r1t0, Amir_Parsa, Away_in_the_heavens and vikram108.
We would like to thank testers of this round: Little_Sheep_Yawn, k1r1t0, blxst, NaturalSelection, Eyd, Away_in_the_heavens, Banis, rainb0ySimp.
Also we want to thank You for participating in our rounds.
Discord Server (1000+ people)
Thanks you for participating in TheForces Round #4! Here is the editorial: