We'd like to thank you all for participating in the contest, and hope you enjoyed it. Any feedback would be appreciated!
The official lore is that he got lost in a forest of oddly colored Christmas trees (from problem F) and decided instead to write this editorial.
2178A - Yes or Yes
Idea: conqueror_of_tourist
Preparation + Editorial: conqueror_of_tourist
What can we say about the number of 'Yes's.
Consider the number of 'Yes's in the string, and what happens to this number during an operation.
2178B - Impost or Sus
Idea: YuukiS
Preparation + Editorial: twosquares, YuukiS
You have a suspicious string. For a fixed u, suppose the closest s is two characters to the right. Where must the other s be?
It must be two characters to the left. In particular, the two s's must be on opposite sides of the u.
You have a suspicious string. Suppose there are two consecutive u's. Let the closest s to the left u is three characters to the left. Where must the other s be? Where must the closest s's to the right u be?
The s must be three characters to the right, which is two characters to the right of the right u. However, this implies that there must be a corresponding s two characters to the left, which would be the closest s of the left u. By this reasoning, there cannot be two consecutive u's.
2178C - First or Second
Idea: YuukiS
Preparation + Editorial: conqueror_of_tourist, YuukiS
The number of children on the naughty and nice lists combined will be $$$n-1$$$. However, not all assignments to the naughty and nice lists are possible. Try figuring out exactly which assignments are possible.
Exactly one child will not be chosen by Santa. If we fix/decide which child this will be, what can we say about the other children?
2178D - Xmas or Hysteria
Idea: twosquares
Preparation + Editorial: twosquares, YuukiS
Fix the $$$m$$$ surviving elves. They must have attacked. Who are the targets of these attacks? What happens to those targets?
Each surviving elf must have attacked a smaller elf. Those elves die.
Find an upper bound on the number of elves that can survive.
For each surviving elf, there must be a corresponding target elf that it attacks, which dies immediately (and cannot be attacked by other surviving elves). Therefore, at most $$$\lfloor n/2 \rfloor$$$ elves can survive.
Once the elves that survive are fixed, and the elves they attack are fixed, there may be some remaining elves, which should not survive. Find a way to deal with them.
$$$m=0$$$ must be handled separately (why?). The hardest part is killing the strongest elf. Figure out when it is possible and how to do so.
Python, C++ (by Auchenai01)
2178E - Flatten or Concatenate
Idea: twosquares
Preparation + Editorial: twosquares
What are the properties/invariants of the flatten operation? Use this to find an invariant on $$$a$$$ and $$$b$$$.
The sum of the entire array is invariant under the flatten operation. This means $$$a$$$ and $$$b$$$ always have the same sum.
Assume there are no flatten operations after the final concatenate (why?). Can we find where in the hidden array $$$a$$$ the final concatenate happened?
From the previous hint, the final array can be split into the two arrays before the final concatenate. Which array contains the maximum?
The two arrays were flattened from some common ancestor — i.e., they were once equal before being flattened into their state just before the final concatenate. Only flatten operations have happened since they were equal.
If one array was flattened more times than the other, which contains the maximum?
How can you tell which array was flattened more times?
Flattening is an operation that intuitively "pushes down" the maximum; the array that is flattened fewer times is guaranteed to contain the maximum. Flattening also increases the length of the array by $$$1$$$, so the shorter array contains the maximum.
Recurse.
Python, C++ (by Auchenai01)
How would you write a validator for this problem? That is, given $$$n$$$ and an array $$$a$$$, determine if it can be generated by the described operations.
2178F - Conquer or of Forest
Idea: YuukiS
Preparation + Editorial: conqueror_of_tourist, YuukiS
Try drawing the operation on some not small graphs!
What are the invariants of the operation?
The number of white vertices does not change. It also seems a lot of white vertices don't move or only move to a neighboring vertex.
In a single operation, what are some shared properties of the vertices whose color changed?
Color changes only occur within the detached subtree (why?) and it is a necessary condition that a vertex with a new color has a new parent.
Based on Hint 2, try to characterize the set of edges that cannot be removed no matter what operations are applied.
The parent edge of any black vertex cannot be removed (why?). Any other edge can be freely added and removed as long as T is a tree.
Consider the connected components formed by the parent edge of all black vertices (in other words, after cutting the parent edge of any white vertex). Which vertex is white within this component?
Exactly one vertex is white and it is the one closest to the root.
What does the conquered condition mean in terms of these connected components?
2178G - deCH OR Dations
Idea: YuukiS
Preparation + Editorial: YuukiS
Try to solve the problem for only $$$\ell=n$$$.
Figure out how to count the number of chains containing a specific chord (without caring about complexity)
Any chain containing a specific chord can be decomposed into a chain ending at the chord and a chain starting at the chord. Because these parts are independent the number of chains is [number of chains ending at the chord] x [number of chains starting at the chord].
Figure out how we can compute the number of chains ending at chord $$$1\ldots n$$$ in quadratic time.
For a given chord $$$j$$$, the number of chains ending at $$$j$$$ is the sum of number of chains ending at chord $$$i \lt j$$$ for every chord $$$i$$$ that intersects chord $$$j$$$ plus one (for the chain consisting of just $$$j$$$)
You only care about parity. Figure out how to speed this up to $$$O(n\log n)$$$.
Consider an XOR Fenwick Tree of size $$$2n$$$, where at $$$x_i$$$ and $$$y_i$$$ you store the parity of number of chains ending at chord $$$I$$$. Then, the value in Hint 1.2 can be found by a range XOR query over $$$[x_j, y_j]$$$ because any chord not intersecting chord $$$j$$$ will either be accounted for $$$0$$$ or $$$2$$$ times.
The problem forces you to incrementally compute the values for $$$\ell=1\ldots n$$$. Try to solve the problem in quadratic or cubic time while only allowing yourself to consider the chords in order (i.e. you're not allowed to go backwards to compute the number of chains starting at a given chord).
In addition to storing the parity of number of chains ending at chord $$$i$$$, also store the set of chords $$$k \lt i$$$ such that chord $$$k$$$ appears in an odd number of chains ending at chord $$$i$$$. Then, for a fixed $$$\ell$$$, we want to check whether every chord appears in an even number of sets (this can all be done with $$$n$$$ Fenwick trees, one for each chord).
You have yet to use the fact that we want every chord to appear an even number of times (that is, we do not need to know the specific parity for each chord). Use this to speed the solution up to $$$O(n\log n)$$$.
2178H - Create or Duplicate
Idea: YuukiS
Preparation + Editorial: conqueror_of_tourist, YuukiS
The operation is clearly independent for each present. Solve the problem for a single type of present with value $$$a$$$.
Consider a graph with vertices $$$0\ldots m-1$$$. We draw an edge from $$$x \to (x+a) \text{ mod } m$$$ with cost $$$a$$$ and an edge from $$$x \to 2\cdot x \text{ mod } m$$$ with cost $$$k$$$. The desired answer is the shortest path from $$$a$$$ to $$$0$$$. However, it is not possible to combine the results for all three types without $$$O(n^2)$$$ $$$(\min, +)$$$ convolution.
There is one big idea that you need from here, the following small hints may help in getting you there.
It may be easier to start with no presents (but eventually force yourself to have all three).
Although we considered the operations for a given type of present independently from other types in Hint 1, we are allowed to intertwine operations as we wish.
If we tried to merge all three presents into a single graph, the primary issue is that we need to maintain three separate modulos to handle the duplicate spell. Is there any way we can fix this?
C++ (model sol), C++ (by Auchenai01, with an optimization)
Solve the problem in $$$\mathcal{O}(m)$$$.
2178I - Numbers or Fireworks
Idea: YuukiS
Preparation + Editorial: conqueror_of_tourist, YuukiS
The input essentially just creates a graph, where cities are connected if they are at distanct $$$\sqrt{k}$$$. Can you find any special properties that this graph has?
The input graph is bipartite.
One of the color classes of the bipartite graph must have size at most 15
Try finding an equivalent formulation to what the explosiveness can mean (in particular, try assigning some `value' to each node not in $$$T$$$
We can brute force over all possible subsets of the smaller bipartite class.








Auto comment: topic has been updated by twosquares (previous revision, new revision, compare).
mayank69goel got banned!!
He was Rank 11 in India!!!
if he is a cheater he should be banned, I am myself from IIT Kanpur and I have seen so many people cheat here because they want to get internships, its honestly sickening. These morons are destroying the culture of cp in general. Gosh I hope we can go back to pre AI times!
ok So there are indeed two 'f's in conqueror_of_fourist
Thanks for a super fast editorial. Enjoyed the contest. Happy New Year!
9 problems 1 voter :(
I think the single voting is attached to all the problems — after I clicked "good problem" on D my "awesome problem" on E became a "good problem"
It was a great contest! Happy New Year everyone :)
great problems but no way there are 10 k solves on 'c'
dp problems are heaven for cheaters!
Happy new year!
happy new year everyone :3
I'm just curious, How many guys guessed the solution to E without any proof
Why the voters of all problems are actually the same one
Sorry about that, should be fixed now!
It's still not fixed, voting anywhere removes any vote elsewhere
Hopefully fixed now?
Yes, it works now.
Auto comment: topic has been updated by twosquares (previous revision, new revision, compare).
Nice, I thought of D in this way:
Each elf is an island (node) Initially, you have n elves representing n islands(connected components with a single node with value their attack/hp) .
At every turn, an elf who hasn't attacked yet attacks another elf. Translates to: "A connected component merges with another connected component via a directed edge). This costs loss in hp for both the islands involved in the merge.
Similarly the entire simulation revolves around the approach of building
We're asked to find whether "m" connected components exist simultaneously at any round in our simulation.
The rest of logic, follows on building with these. (Hope you liked this perspective of the problem D).
W Editorial.
how to prove the m=0 case in D? btw happy new year
If m = 0, then all elves must die. The only way we can't make all elves die is that the total amount of HP in all but the largest HP-value elf is strictly smaller than the largest HP-value elf. This is because we can always use the smaller-HP elves to attack the largest HP-value elf, therefore if after all the attacks the HP of the largest one is still larger than 0 then we can't do it.
Otherwise, we can attack the largest-HP elve by using the smallest-HP elf. At some point the largest-HP elve at the beginning will become the smallest-HP elve in the remaining elves (when using the "smallest" one to attack the "largest" one will result in a HP value of less than 0). When we reach this point, it is always possible to take (the initial value) of the smallest-HP one and the second smallest-HP one. The smaller one will die, and at the end of the process, both the two remaining ones will have HP < 0.
Each elf can hit the strongest one at most once (they die immediately afterwards), so the maximal amount of damage the strongest elf can be dealt is the sum of attack powers of all other elves, so if this is less then the strongest elf's health, the strongest elf can't die, thus it's impossible.
How to choose the other elves optimally?
For example m=0, a=[1,2,3,5] If we use elf 2,3 to attack elf 4, then elf 1 will remain. Otherwise we use elf 1,2,3 respectively, there will be no elves remain.
My English is really bad, so hope you can understand it. Thanks!
What's important is that you should kill the elves not attacking the strongest elf before anyone actually attacks the strongest elf. The simplest way is to take the smallest suffix of elves (after sorting, excluding the strongest one) that can actually kill the strongest elf, let all weaker elves die first by having them attack the next stronger elf (weakest first, so weakest attack second weakest, second weakest third weakest, etc.), and then attack the strongest elf with the suffix.
Elf 1 can attack elf 2 and die and then elf 2,3 can attack elf 4.
What I did was I founded the strongest elf X such that Elf X, X+1,...n-1 can defeat elf n. But before that Elf 1 attacks 2, 2 attacks 3,...X-1 attacks X.
If the elves are a1, a2, ..., an with increasing initial health / attack power, and sum(ai.attack) 1 <= i <= n — 1 is >= an.health, then we can choose the elves like this:
Let a1 attack an, a2 attack an, etc until we reach the ai that can kill an. This means a1 through a(i-1) are all dead now, and anything else that attacks an will both die and kill an.
For all the elves ai through a(n-2), set them up to kill each other. At most 1 of these elves can survive the bludgeoning. If any of them survive, let it attack a(n-1). It will die, and a(n-1) will survive. Then, let a(n-1) attack an. They both die.
sort the sequence, and check if sum of first n-1 terms is at least the numerically greatest term.
the code given in the editorial is failing for 1"\n" 7 0"\n" 1 2 3 4 5 6 7
Queueforces
How the actual f* does a world exist where 186 people solved a problem that even Tourist couldn’t?
Many of the submissions are cheaters, which we will be going through.
Please check out this YouTube video; it was streaming problem solutions live: Video
Please ban this cheater Ananya_CodeNova who was streaming those solutions.
Also, please review submissions from this account for cheating detection of other users.
Please everyone report this telegram channel too, it posts codeforces solution during the contest !!
https://web.telegram.org/k/#@codenovadiscussion
Don't underestimate the mighty Grok
This happened before AI too, tourist does fail to solve some easy problems sometimes (not saying AI did not have involvement here)
For example, CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!) had 700 official solves on E which tourist did not solve
Really enjoyed F. It requires some thinking but the solution code is clean. Nice to see it wasn't just ad-hoc.
I was panicking when my F sol is O(N^2) 10 minutes before contest end,
the world felt heavy. thankfully got it in the end.
3 minutes of testing also bonus anxiety.
anyone pls help me implement the m = 0 case for D.
My logic that I thought during contest was something like storing the elfs in multiset and then attacking largest and second largest and thus second largest dies and largest hurts. So, i remove(both) and insert(the health after hurting) in multiset.
Any help will be appreciated
full code : 355403171
I haven't looked too in-depth at your code but just glancing at it, why are you using a multiset? All the elves are guaranteed to have distinct strengths in the problem text, there's no need to use multiset here? Also if you could link the entire code (I don't know what p.sc, p.fs are) so that I and others could tell what each variable is, it would make it a lot easier to help
I am using a multiset here because i'll insert the remaining health of the suriving elf in the multiset after removing both the elf (the attacker and the elf being attacked in my case they are 2nd max and maximum of the multiset).
So, it can be possible that the suriving elf have a health equal to some existing one. For example :
1 ... 3 4 5 8then 5 attack 8 (or 8 attack 5) : 5 dies and 8 surivied. So, i'll remove 5, 8 form my multiset and add (8-5) in the mutliset. But there was a 3 already so, a multiset is needed.Also I had linked the entire code too. (p.sc is the health value and p.fs is index) (sc means second and fs first)
Lemme do it again : 355403171
Yeah but each elf also has a distinct index, there’s no need for a multiset here.
what if exactly one elemnt left and all others are died ? (ms.size() = 1)
Oh yeah ig I forget to do that thanks!
But wait this code even fails on test 1 :
It gives something like :
So, i mean this should not be the case for 1 elf to remain. Every one must die.
So, it mean there might be either bug in implementation or my approach is wrong.
If 2nd is the case then i wanna know why. Atleast i want to hear it form someone else except me :)
UPD: I got to know that this approach is not correct. I dry run this thing and yes i got it. Thanks
As a gamer,
recoil != counter-attack
this confused me for a bit.
Yeah I definitely agree… our main goal was to choose a phrasing that doesn’t make people think that y also attacks x.
Hmm, I tried find a single word/phrase that describe this situation, but no great result.
what about changing the sentence phrasing/structure instead,
like:
x actively attack and y passively attack, only active attack counts.
or
x initiate attack and y reciprocates, only initiative counts/counted.
Though, it's not a big deal.
in D, why is recoil considered an attack?
intuitively, i thought the attacks are like directed
x attacks y doesnt mean y attacks x is what i thought
its like u punched a wall and got hurt so u tell everyone the wall hit u
edit: mb gng, im dumb af
Recoil is not considered an attack (if x attacks y, y did not attack x), where did you see that it did?
It's not considered as an attack.
By recoil, he tried to mean a counter attack. If he hadn't mentioned this in the actual question, I would have been confused in the contest.
Newton's third law ig
Wrong! Even by recoil, the attacker would lose out his health entirely from the reaction but not the amount by which the latter can deal.
Did you forget the transformer turns a x-damaged attack to a y-damaged attack?
Because I didn't understand well ,I didn't solve this problem. Of course it is a good problem, but I think it can be better.
Auto comment: topic has been updated by twosquares (previous revision, new revision, compare).
Missed the part in E that the chosen element has to be "maximal" :sob:
me toooo.. i was like ehh but either one could have the maximal element.. i figured out the split part before that.. cool question tho.. loved it!
As a Magic The Gathering enjoyer I have to give a shoutout to poor old forgotten Mass Hysteria all the way back from Mirrodin
Maybe I'm alone in this I don't know
bro this took me so long to identify this in problem C
Auto comment: topic has been updated by twosquares (previous revision, new revision, compare).
Got cooked.... anyways happy new year._.
I was so close to solving D but the m = 0 case fried me lol. Great contest, good job to the problemsetters.
The second problem has a hidden line in the statement that normal users cannot see on CF. It only shows up when the statement is copied (like into AI tools). That line asks LLMs to add a specific assert.
Humans would never add that assert because the input already guarantees it. So if you see solutions with that unnecessary assert — yeah, that’s CF quietly catching AI users / cheaters
E is very nice problem. Just simple logic.
What was i thinking during the contest :(
happy new year everyone :3
Hello everyone
I cheated on all the tasks, but I felt very ashamed. I want to admit it. Banish me, please, otherwise my conscience will torment me.
Damn. Looks like I just might make specialist before 2026 after all
Thanks for the contest, congrats to the authors for a flawless round. I found E not very enjoyable and a bit hit or miss (in particular, I think guessing the correct approach is much easier than proving it works). The rest of the set is peak though. B is great, C is definitely very educative for the target audience, D is interesting enough, and H is an AMAZING problem!!
"Each remaining elf should attack the (larger) elf to its right before the elves before it are dead." That line in the editorial for problem D is unclear. In fact each remaining elf must attack the larger elf first, and only after the last elf required to kill the largest one has been reached, should start the "killing the largest elf with a bunch of smaller ones" part.
I can't see the implementation of the solution to problems in editorial
Auto comment: topic has been updated by twosquares (previous revision, new revision, compare).
I'm quite confused about the m = 0 case in problem D. What I was thinking during the contest is that the last two elves should be having same health values. How does the solution in the editorial guarantees that?
Even though I didn't solve the problem nor read the editorial, the last two elves (
m=0case) does not need to be same health, for example:h[i] = 10, h[j] = 15a[i] = 20 (because other elves attacked this elf before), h[j] = 15Then both elves would die at the same operation
That's exactly what I thought. But then I realized that $$$a_i$$$ values don't change (Only $$$h_i$$$ values change). Misread the problem for most part of the contest
Can we even solve D if ai's are not distinct ? I misread the problem and was trying to solve this
Solved C using dp, though its pretty not simple as compared to editorial
anyone like me who didn't read that only maximal element was getting split x->x/2 ::( .
Any clues or hints on how to solve the Bonus problem of E? :3
The general idea is to reverse the operations by taking advantage of the structure described in the E solution.
If the array has length greater than 1, assume there was a concatenate, and split it into $$$a$$$ and $$$b$$$ with equal sum. If this is not possible, then the array is invalid.
After splitting into $$$a$$$ and $$$b$$$, some flattens prior, we had $$$a = b$$$. Determine if it's possible to achieve this by reversing some flattens.
Attempt to match elements between $$$a$$$ and $$$b$$$, merging equal elements (i.e., undoing flattens) to assist with this. Note that one can only undo a flatten if the result is maximal in that array.
Recurse.
(The $$$a=b$$$ we found is the result of undoing the minimum number of flattens. This may not correspond to what actually happened to generate the array, but it doesn't matter. Why?)
Thanks a lot! :3
I'd say that G is a wonderful problem!
I thought I've trained hard by the end of 2025,but last night I was stuck by D and haven't noticed "removing maximal" in problem E so I got -77.
It really makes me depressed but I think I will get a better score in 2026.
same mistakes, dont know how to get out of this rating range fr )__(.
Nowadays doing problem d is the new normal
"Consider the arrays a and b before the final concatenate, so that the hidden final array is ab .
Since a and b are identical, we can find where the split point in ab is using binary search on prefix sums."I think here it's meant to be the sums of elements of a and b are equal?
imo, problem E could have been really hard if a guess was not possible from the max number of queries allowed and typical sum setup which demands for B.S. in interactive problems.
When I was working on D, I even forgot the question's meaning and kept thinking mechanically. Eventually, I got stuck for two hours before finally solving it.
can someone please help where my solution fails on E? for this submission https://mirror.codeforces.com/contest/2178/submission/355617425
You're binary searching for the half with the bigger sum, but the half with the bigger sum doesn't have to contain the maximum of the array (e.g. 2 2 2 2 1 1 1 1 4)
how will u build the array?
If you're asking how I constructed the counterexample array start with 8 as the starting number you can flatten the arrays into 4 4 then 2 2 2 2 and for the second into 4 4 then 2 2 4 then 1 1 1 1 4 and concatenate them.
If you're asking about the solution, you can check the official solution in the editorial, it's quite interesting!
but u cant flatten 2 2 4 to 1 1 1 1 4 no? since you can flatten the maximal only! anyways thanks
You see, I totally forgot about that part, lol! Sorry!
Here is a failing test case:
[2 2 2 2 2 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]The array can be generated with
Can someone please give the intuition behind coming up with the construction strategy in task d for m = 0 and m > 0 case.
There's an $$$O(n)$$$ time for 2178D — Xmas or Hysteria.
Idea is almost same as editorial, except that we now need a strategy $$$S$$$ that runs in linear time and does the following :
On input any sequence of elves $$$Elves[i,...,j]$$$, output a sequence of valid attacks such that at the end there's exactly one or zero elf remains.
Now suppose we have such magic $$$S$$$, then
for $$$m \ge 1$$$ case : same as editorial, except that we're gonna use
std::nth_elementto put the largest $$$m$$$ elves in $$$I = Elves[n-m+1,...,n]$$$ and the second largest $$$m$$$ elves in $$$II = Elves[n-2m+1,...,n-m]$$$. Also we're gonna deal with the remaining $$$n-2m$$$ elves with our magic $$$S$$$ (in the case that there's one elf remains, let it attack any elf in $$$II$$$). Finally, we do a parallel scan of $$$I$$$ and $$$II$$$ and let elves in $$$I$$$ attack elves in $$$II$$$.for $$$m = 0$$$ case : still very similar to editorial. Suppose we pass the sum check (otherwise no solution). First swap the strongest to $$$Elves[n]$$$ and second strongest to $$$Elves[n-1]$$$, then starting at $$$i=1$$$, while $$$Elves[i].attack \lt strongest.hp$$$, let $$$i$$$ attack strongest and
strongest.hp -= Elves[i].attack, then++i. The while loop terminates when we reach an elf Alice where $$$Alice.attack \ge strongest.hp$$$ (it's guaranteed that this occurs and Alice $$$\neq$$$ strongest due to the initial sum check). Now deal with the elves between Alice (inclusive) and $$$2nd$$$ strongest (exclusive) using our magic $$$S$$$. If there's one elf remaining, let it attack the $$$2nd$$$ strongest. Finally, let $$$2nd$$$ strongest punch the strongest (this punch will kill the strongest as $$$strongest.hp \le Alice.attack \le 2ndStrongest.attack$$$).Here's one possible way to design our magic strategy $$$S$$$. The idea is to be greedy and always let the dying elf to attack. We're going to do a linear scan over the input $$$Elves[i,...,j]$$$. Suppose we're now at $$$p$$$, lets call $$$Elves[p]$$$ Alice and $$$Elves[p+1]$$$ Bob. The invariant is that (1) Alice has never attacked before (2) Bob will always have full hp. Then some case analysis
please check invariant is maintained for all cases. It's clear that either one or zero elf remains when we finish.
How can one come up with ideas for ad-hoc problems like problem H? Are there other problems that use the same idea? I honestly think I would never have been able to come up with this on my own.
F. Conquer or of Forest
why sj**2, not just s2j?
An internal component is connected to two other components, and when drawing an edge between two components you must choose what vertex is at the endpoint. So you get to choose out of $$$s_j$$$ vertices twice, which there are $$$s_j^2$$$ ways to do.
I really liked the problem H!
TinTin_in_Quant (Chaitanya Mahawar) is an AI-cheater. In his submissions he constantly uses
reservewhich is an LLMs' one of most favorite functions. Moreover, for random numbers generation in G, he unsurprisingly uses splitmix64, instead of mt19937, also a huge 'why' and also a thing that LLMs like to generate.not really sure why this is getting downvoted, but you guys should check out his linkedin profile, take a look before he takes it down. the whole profile is just pieces of LLM-generated text. a monthly portion of absolute fun
reserve is used for prevention of hacking no?
almost everyone uses reserve buddy.
splitmix64 is quite well known as well. especially in stats computing (assuming hes studying statistics from iitk, it kinda makes sense)
idk bruv stop hating
what are you talking about? reserve is just a pre-allocation of memory for vectors, which is almost never used in CP. It's useless piece of code because in problems, the vector sizes are deterministic and fixed.
splitmix64 is almost never used for basic random number generation in CP. Why would you need it if you have mt19937? It only helps when you're trying to cheese some unordered map/set solution.
you're an obvious cheater trying to defend yourself from an alt. you aren't even familiar with basic concepts of CP (what a pity for GM!).
alright, you guys didn't believe me but here we are. Let's review his submissions for Global Round 31. his standings with submissions
We can first immediately notice failure on problem C. It took some time for some LGMs to solve it so let's just assume the problem is really unobvious and our subject couldn't solve this problem. (as numerous banned LLM-cheaters, see standings).
However, we take a look at his submissions for D. 354177144 (WA2), 354181465 (AC, 6 minutes later).
Removing all that 600 lines mess that he anyway doesn't use at the top of solve(), we can clearly see the LLM changes to his code:
Why would you change these variables' names? We continue further:
Why, why, why? Why would you change these ref, pm, need? All in 6 minutes!?
Finally:
There's no objective reason for making such changes unless first submission was LLM-generated and the changes were suggested by LLM as well.
Ban this nasty cheater already.