Hello Codeforces
After countless nights of yapping, bedfight duels, and failed zero cycles
The authors of the three best Div. 1 of all time, nifeshe, chromate00, and I, have joined forces to create the Division $$$1+2$$$ round that will break the internet: Nebius Round 2 (Codeforces Round 1088, Div. 1 + Div. 2), which will be held on Mar/28/2026 17:45 (Moscow time). This round will be combined for Division $$$1$$$ and Division $$$2$$$ and will be rated for everyone.
You will have $$$2.5$$$ hours to solve $$$8$$$ problems. Between $$$6$$$ and $$$7$$$ problems will not be split into subtasks. Also, between $$$6$$$ and $$$7$$$ problems will not be interactive, so you are recommended to read the guide to interactive problems if you have not encountered them before.
We would like to thank the following people for making the contest possible:
- Um_nik for pre-reviewing the round.
- cadmiumky for the coordination and helping with preparation.
- BurnedChicken for VIP testing.
- Dominater069, Geothermal, EvenImage, and SomethingNew for LGM testing.
- sammyuri, __baozii__, dinohaur, Dragos, rolandpetrean, Sana, and _istil, for red testing.
- Lilypad, JeffreyLC, misteg168, AksLolCoding, mwen, and PMiguelez for orange testing.
- efishel, tvladm, and madlogic for purple testing.
- mathtsai, Jamshed11, lev1106, Argentum47, simplelife, and SpyrosAliv for blue testing.
- nik_exists for cyan testing.
- Alexdat2000 for translating statements to Russian.
- MikeMirzayanov for Codeforces and Polygon.
- and last but not least, You for participating!
The scoring distribution is below.
| A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|
| $$$500$$$ | $$$1250$$$ | $$$(1250+1000)$$$ | $$$2000$$$ | $$$2500$$$ | $$$3000$$$ | $$$3250$$$ | $$$4000$$$ |
Now, a few words from our sponsor Nebius!
We are a Nasdaq-listed company building cloud infrastructure and hyperscale platforms for AI innovators worldwide. We support the entire AI lifecycle from training to deployment, powered by high-performance NVIDIA GPUs. Behind the platform is a global team of over 1400 people, including more than 400 engineers working at the frontier of AI, supported by a dedicated in-house AI R&D team.
We’re thrilled to invite you to enroll into our first Early Talent Program! It’s designed for students and new grads to learn, contribute to building AI infrastructure, and grow into core members of our team.
If you are interested, please fill in this form. It could be your opportunity to start your career journey at Nebius.
And last but not least about the prizes for Nebius Round 2.
We’ve got something exciting lined up for the top 15 contestants on the leaderboard. Rewards come in the form of credits for Nebius Token Factory – they can be spent on inferring AI models, eg. generating text or powering AI-driven applications or agents.
- 🥇 1st place – equivalent of $1000
- 🥈 2nd & 🥉 3rd places — $500 each
- 🥇 4th–15th places — $100 each
We hope you will participate and enjoy the problems. Good luck!
UPD: the contest has been delayed by 10 minutes to allow everyone to register.
UPD2: https://mirror.codeforces.com/blog/entry/152448 editorial
Top 15:









Of course there is 6 7 joke
Can we move on from this?
Sorry Bud the world aint healing
And that is good.
Oh how right you were... (B)
As a tester, I would like to thank the Codeforces legal team for reasons I am not allowed to disclose :)
i know what it is but i can't prove it yet
As a tester I tested my first round :)
as someone who AKed last contest in 5 minutes, I think it's too easy for me, and to prove it to the world, I'm gonna be solving problems using ML based approaches, expected time to AK: 15 minutes, and yet I need to email mike to update my rating from previous round, because there is a bug, because of which system update rating only for >=1 placed participant's, and I got 0th
Down vote all you can, but I don't care, because I know I will win this easily, and reach 4000 rating in no time
that's a lot of shittalk for someone stuck in python 2
what trash talk? What bad did I say? Is believing in myself trash talk now?
like, bro is not tourist
what? My rating not update because of bug, but I emailed mike by now, hopefully, my rating will be 1400+ soon, after they fix the bug.
bro's cap so big that it caused global warming
my dude stop cooking leave some for us
roll back happen, and you went from master to expert, good job on cheating, don't reply my comments, I don't care about cheater
I don't see any bugs in the system, just in your brain
Your brain also got one, too...
ye i cant seem to fix it tho
gottem lol
Is this a bot XD
0/10 ragebait
Oh i cant bear it.Ur just so funny bro XD
You mean you're using LLM?
you fix your logic first
Why don't you try? You have an LLM and I don't
how on earth did nife and chromate agree to write a div together
Why wouldn't they?
As a tester, I have been banned permanently from Codeforces by nifeshe 😿
I hope Proof_by_QED nifeshe chromate00 are all having a good day.
Auto comment: topic has been updated by chillingjellyfish (previous revision, new revision, compare).
After a long time giving a contest, hope to get +ve delta! Best of luck, everyone!
Failed zero cycles? Does Codeforces know MCSR ball knowledge?
subtle flex
orz pb (Ground zero instead of zero cycle though, you know what you need to do now...)
I was surprised not many people commented on the MC reference.
hoping i can stomp the problems instead of being goombah stomped myself
Problem B of 1250?
TOO HARD....
sometimes i found the last problem is too easy for me, sometimes the first problem is a nightmare
Why am I expert tho :(
Also, between 6 and 7 problems will not be interactive, so you are recommended to read the guide to interactive problems if you have not encountered them before.
WHAAAT?
6-7 problems won't be interactive. total their are 8 problems, so one problem at least will be interactive.
It's good.
I think this contest is to very hard
Hope to return my Expert, please.....
is this the beginning of my pupil era??
I hope that I will solve at least 2 problems
Will everyone be in the same rating table? If so, why write div1+div2 if div1 is possible?
usually div1 A is about the same difficulty as div2 C. div1+div2 means the first problems with be of div2 hardness.
thanks
Hoping for a positive change in rating..
"UPD: the contest has been delayed by 10 minutes to allow everyone to register." But the registration was already open for quite some time ???
UPD: My bedtime has been delayed by 10 minutes.
same here
Ready with coffee, contest delayed 10 min
Guys, why all the problems are on the same topic — arrays, subarrays and permutations? The only problem on a different topic is a problem E.
Question to the coordinator of this round — shouldn't the round be balanced and contain problems on different topics? It's very boring when all the problems are about good and bad subarrays and permutations.
Not to be overly sarcastic, but asking "Why are all the problems about arrays?" feels akin to saying "Why do all the problems have numbers in them?" or "Why do all the problems have input and output?" Arrays (and subarrays, and to a slightly lesser degree permutations) are a fundamental concept in computing, to the point that problems in the vast majority of competitive programming topics are often best framed as problems about arrays. Indeed, I'd e.g. characterize D as a problem about bitwise operations, F as a counting problem, H as a casework/data structures problem, etc.
Steelman: Compare these problems with the problems of, say, the recent ICPC North America Championship. Just vibe-wise, they look very different! And indeed I would argue that the problems of the latter seem more diverse. That is not to say they are better, of course.
Mathforces
yeah
A and D are good but B and C2 is more like Guessforces also sample test very weak both B and C.
bro how did you able to do the B problem it is very hard than C1
In B, let g=x-y, now every divisor of g would appear as a valid partition. So you count number of divisors of g and the array itself can be 1111.. -1-1-1....
any hints for c2?
Yes but its little tricky and more than that wrongs idea close to AC sol of B and C's have same answer as sample test. I feel when its little guess work then sample test must be better.
Anyways that my opinion surely I maybe just acting stupid bcoz I got a lot of WA on both of them.
I think the fact the prefix sum increases or decreases by 1 was the giveaway.
Oh hell naww, I will drop back to newbie after this contest ;((. At least, I will become the newbie with the most contribution on codeforces! (lol)
By the way, I love how CF's admins reacted in this contest; in just 30 seconds after Pa8ITER345's AC on H, Pa8ITER345 got banned.
I'm cry on C2....
Cucked by $$$C2$$$
What's wrong with my solution to C1? I thought the last k elements' ordering doesn't matter, but the for first n-k, a[i] = b[i] (unless b[i] = -1). 368564987
I got hit by the same issue. Think symmetrically. The last k elements on both sides are important, left and right side
last k elements ordering does matter
consider [1 2 3 4] and k=2 now if you put [1 2 4 3] consider the subarray [2 3] it is not the permutation of [2 4] if i am correct
The problems are cool <3 but why is E way harder than F 😭😭
D is a very good problem! but How can I solve C2?
I used data structures to solve C1, but encountered issues when applying them to C2
When a window of size k is shifted towards right, index i -> i+1 and i+k-1 -> i+k. This implies two things: either both a[i] and a[i+k] are same or if they aren't same then a[i]=b[i] and a[i+k]=b[i+k]. Following this you check for each index i (0<=i<k) which category this group of indices fall into. Then you check if ith index is of type 1 then all elements at indices i+k, i+2k, ... in array b should also have that same value or (for 2nd case) then the elements at the corresponding indices should be same. Since it can have multiple elements , do not forget to keep a count of the elements positive. If it goes below 0 at any time print NO immediately . You can check out my submission here: https://mirror.codeforces.com/contest/2211/submission/368587191
gimme d3 or i'll retire
F Too simple.
G Just randomly guess some sufficient/necessary conditions.
AI shitted the contest. Bad round.
You don't understand how hard I tried to make G harder without making it ugly and failed every time
Yes, Problem F was clearly easier than Problem E. I think F was more like a template problem. It didn’t require much technical skill; you basically just had to copy the problem statement verbatim.
What do you mean by “AI shitted the contest. Bad round.”? Did the AI actually solve this 3000-point problem? That’s unbelievable.
Quick question: Was the data set not very challenging, which is why my memory-based search optimization using an unordered_map actually passed?
bro the brainrot in b...
What was even the right approach tried multiple things got WA on 2nd everytime.
Think about all 1's or -1's case i.e. x = 0 or y = 0. Solve for them. Then in any other case just convert the case to all 1's or -1's.
Say you have 1 1 1 1 -1
The last three element can be treated as single one. (1 + 1 + -1 = 1)
I'm not quite sure will it pass the system testing tho.
~~~~~~~~~~~~~~~~~~ void solve(){ int n;cin>>n;
} ~~~~~~~~~~~~~~~~~
why does it says memory limit exceeded for this code(problem E), isn't 60 * N sufficient
The size of offer[x] is not bounded by 60 in your solution.
I thought every number added increases lcx(which cannot happen morethan 60 times)
I can see the code is wrong(lcm part). I wrote it last minute. But it somehow passed a lot of tests.
I was surprised to see my name appear in G's sample
orz
orz
Why does the E grade solutions in 5++ minutes????
If it graded them earlier, I could try using the LCM of the set
Because interactives always are slower, and there are 40 tests in order to cut various wrong approaches.
Why didn't you get that killing case earlier, because I saw at least three of my friends got TLE/MLE on the same test case?
My first and second submission on C1 are wrong answer in pretest 1 (sample). I already check it locally and it gives me the correct output but somehow it gives different output on codeforces. I then submit basically the same solution in python for my third submission and it passed all the pretests. Does anybody know why this happened?
In
if (cnt[i] >= 2)you access the cnt vector at an invalid index wheni == -1which is undefined behavior.Thank you!
E is hard to figure out a simple solution. F is rather too simple?
Nice round to me anyway.
Is E just storing keys as coprime basis? Had this idea right after it ended :sob:
Apparently you can use single LCM of GCDs instead.
This is my code to Problem B. Who can tell me why I Wa on test 2? Thank you so much.
The greedy construction of your array is wrong. For x>=y your construction is correct but for y>x the construction should be reversed. All the -1's would come first and then all the 1's would come after that.
This is wrong, keep in mind that if you reverse the construction, you can just take the segments from the back instead of the front and get the same result
You are right. It would be the same even if you took the segments from the back as well. I wrote the answer hastily. I guess the issue in the code then might be due to the use of sqrt(x) function.
Don't use the sqrt(x) function, it can be inaccurate due to floating point errors when you floor it
Don't use floating-point sqrt unless you specifically want to use floating points for some reason. 368608808
I see.I should use 'int(sqrt(x))' or I mustn't use 'sqrt(x)'.Morever,'sqrt(x)' is not excact.
Don't use the built in sqrt method if you're trying to get a floored value, you can just calculate it in sqrt(n) or use binary search to get it in log(n)
Seems E misleads quite a some participants into storing primes/coprimes/keys with deletion, including me. How come can you guys come up with LCM?
I stored kind of prime basis of gcd's with all of it's children's prime basis. In order to tradeoff between size of basis and time to factorize a number , I tried storing primes till 1e6 and then a big number but it was not under the TL. Tried 1e5, 1e4, 1e3 and finally submitted on 1e4.
I only realised it after the contest, but for me the idea was.
For each node $$$u$$$ you have a set of primes $$$S_u$$$ which gives the optimal output for that subtree. If $$$P_u$$$ are the prime factors of node $$$u$$$, then you can compute $$$S$$$ as follows,
Then, if $T_u$ is non-empty $$$S_u = T_u$$$, $$$S_u = P_u$$$ otherwise.
Now think of each set as a frequency table, the above recurrence is equivalent to $$$\max_v(\min(P_u, S_v))$$$.
Now instead of making $$$P_u[p] = 1$$$ if $$$p$$$ divides $$$a_u$$$ and $$$0$$$ otherwise, make $$$P_u[p]$$$ be the number of times $$$p$$$ divides $$$a_u$$$. This obviously doesn't affect us since we just want to know if the value is $$$0$$$ or not.
Now just note that if you look at the prime factorisation, LCM is equivalent to $$$\max$$$ and GCD is equivalent to $$$\min$$$.
I am storing coprimes. Log^2 is more like tiny number squared in this case.
Please upload the editorial.
It's been uploaded 1 minute after the contest ended. Check the end of the blog.
oh thanks.
Bonus: what if $$$\displaystyle{f(a)_k=\sum_{1\le i_1 \lt i_2 \lt \ldots\ \lt i_k\le n} a_{i_1}a_{i_2}\ldots a_{i_k}}$$$ in problem D?
Solve $$$x^n+\displaystyle{\sum_{i=1}^{n} (-1)^ib_ix^{n-i}=0\ (\textrm{mod}\ 10^9+7)}$$$.
But I don't know how to solve that :(
BTW I didn't solve D during the contest.
Clannad my fav. Ushio :D
I got baited by 676767677 in the problem B, I thought the answer would never reach that high, so my approach is wrong cause why else would they mention it. Never thought I'd get rekt by 67.
haha same, wasted too much time on B.
I submitted this code on 2h 24 min, it passed the pretest after 2h 30min, is this submission legal?
Why can't it be sys tested?
https://mirror.codeforces.com/contest/2211/submission/368593258
upd : Tt is solved. Thanks to Proof_by_QED.
The proof for B is just brilliant!
I wasn't able to make my intuition in-contest rigorous, but I'm not even mad because of how elegant the argument is.
is the system testing done? there was a message that it's rescheduled for another round of system tetsing!
https://mirror.codeforces.com/contest/2211/submission/368524210
another day another cheater. even his B submission is LLMish. kindly review it please
The A problem Really easy for me, Or maybe the one who created make a flaw?. My logic only if n >= 2 then output 2,
output 2 2 times lmao. i got a WA on test2 :(
at least solved 2 problems
Hello,
I would like to clarify the plagiarism warning for my submission.
I mistakenly participated in the contest using two accounts. Both submissions were written by me, which is why they appear very similar. I understand now that using multiple accounts in the same contest is against the rules.
There was no intention to copy from others or gain unfair advantage, but I realize this is still a violation. I sincerely apologize for this mistake. I will use only one account for all future contests and follow the rules strictly.
Thank you for your understanding.
Subject:Appeal for submission 368581194 for problem 2211C1 My submission ID 368581194 is lower than 368584326, proving I submitted first and did not use anyones code The algorithm similarity exists because this problem has only one intuitive approach, confirmed by the official editorial verify the overlapping window with a frequency map. Any independent solver arrives at this exact structure. Our coding styles are clearly different: I used bits/stdc++.h, long long, no IO optimization, map named cnt, and YES outside the if-else. Sridhar_M used separate headers, int, ios_base::sync_with_stdio, map named available_counts, YES inside each branch. I solved this independently, drawing on practice from similar problems like CF 1553E. My past submissions are consistent with this coding style. I have never violated Codeforces rules and request a fair review of the timestamps and code differences. please reconsider my case codeforces team
Subject: Appeal for Submission 368536297 (Problem 2211C1)Dear Codeforces Team,My solution for 2211C1 was flagged for similarity with user -zura-. I would like to provide evidence that my work is original:Time Advantage: My submission (18:09:14) was made 25 minutes earlier than the other user's (18:34:34). It is logically impossible for me to have copied their code.Mathematical Necessity: For the Easy Version, since $$$a$$$ is a permutation, the sliding window constraint $$$b_i = b_{i+k}$$$ combined with the permutation property forces $$$b_i = a_i$$$ for all $$$i \le n-k$$$ and $$$i \ge k+1$$$. This is the standard mathematical derivation for this problem, which naturally leads to the identical if conditions in most implementations.Implementation Differences: My code uses #define int long long and a standard vis array, while the other user uses a heavy template with custom macros (vi, vp, etc.) and fast I/O optimization. Our coding habits are entirely different.Given that I submitted much earlier and the problem logic is highly restrictive, the similarity is a coincidental result of reaching the same optimal mathematical conclusion. Please reconsider my case.Best regards,
.
I wrote this solution independently during the contest and did not copy or share code with anyone. I used my usual personal template that I had before the contest. If needed, I can provide editor history / timestamps to show that the code was written by me.
Hello Codeforces Team,
I received a notification stating that my solution for problem 2211C1 (submission ID: 368591160) significantly coincides with another participant’s solution. I would like to clarify that I wrote my solution independently during the contest.
My method is based on a simple observation about the constraints of the problem particularly taking advantage of the fact that array a is a permutation. An obvious and common solution is to fix elements outside of a specific range and validate the middle segment using a presence check. As a result it is possible that several participants came up with very similar implementations.
I should also add that I had previously practiced similar problems and studied Codeforces blogs so I was familiar with this type of approach. Although my solution's structure might have been impacted by this earlier exposure, I didn't copy any code during the competition.
I did not share my code with anyone, nor did I use any public IDEs or platforms that could have exposed my solution unintentionally.
If needed, I am happy to explain my approach in detail or provide further clarification.
Thank you !
I would like to raise a concern regarding my recent contest being flagged for the solution 2211F.
I want to clearly state that I did not cheat. I used a straightforward combinatorics-based intuition along with a recursive approach to count values. Even though I wasn’t sure if it was the intended solution, I implemented the idea that came naturally to me during the contest.
I understand that in such problems, many participants can arrive at similar logic and structure independently. My solution was written entirely on my own.
I kindly request the admins to review my submission again. You can also compare it with my past accepted submissions, as my coding style and structure have been consistent across contests.
Thank you for your time and consideration.
by seeing your profile I can say atleast one thing, you are doing great, I will just tell one thing, forget about this just do questions, as I am saying because of lots of cheaters, it is very difficult to know who is cheater and who is not but one thing I can for sure, it does not matter until or unless you are enjoying problem solving, so happy coding
The cheaters still received a rating increase, I hope the ratings will be rolled back and recalculated soon.