Hello Codeforces,
I am glad to invite you all to participate in Codeforces Round 1101 (Div. 2), which will be held on May/30/2026 17:35 (Moscow time). You will be given 6 problems to solve in 2 hours, one of which to be split into two subtasks. This round will be rated for all users whose rating is less than 2100.
All problems are authored by me. :) I also would like to thank the following people:
- Um_nik for pre-reviewing the round
- Proof_by_QED for the excellent coordination and guidance.
- __baozii__, _istil, Dragos, nifeshe, sammyuri, CatalanConvolution, cry, omsincoconut, SpyrosAliv, wakanda-forever, chromate00, mannyw, nik_exists, simplelife, and ianding for testing and providing a wonderful feedback for the round.
- Alexdat2000 for Russian translations.
- MikeMirzayanov for Polygon and Codeforces.
The scoring distribution is as follows: 500 — 1000 — (750 + 1000) — 2000 — 2750 — 3250
EDIT: Change the scoring of C from (1000 + 750) to (750 + 1000)
EDIT 2: Editorial is available here.








3rd last binary contest before we die, Yay!
1101 1110 1111
are we gonna get nuked before contest 1111? is this a prophecy?
Yet another prophecy of 2026 being the last year for all...
i think he meant 3rd last, bc its:
1101 1110 1111 10000
if he meant 2nd to last then ima hire someone to assasinate donald trump tmrw
I guess he is not the only one with nukes tho brother...
I am sorry. I meant its the 3rd last contest lol. i fotgot about 1110.
btw something crazy will happen in the 1111 round for sure and its not a mistake.
As a tester, this round is so good that
i will be participating again on an alt so that I can experience this contest again(also first time having a blue name in a tester blog yay)As a participant, I’d chicken out and sleep early.
As a participant, I wish everyone Good Luck & Have Fun!
Also wish I can get candidate master :)
wish i can get specialist too
i am desperate for becoming puplil
not in a position to advice but start solving 1300 and 1400 more questions,You will reach pupil fast
thanks bro, i am thinking to practice div2 c,d from past contest
As a participant, wish I can go back to Expert
me too
As a participant, hope I can reach CM this time
As an ant, hope I can get 10'002'184;)
As a specialist, I hope to reach expert.
As a participant, hope I can reach CM this time
failed
Round 1101 feels like a new beginning.
Let's go!
waiting for that promised video from MIDORIYA_
Hope I can get +73 delta this contest (I lost the game)
edit: Would make this a seperate comment but I've already made 2, $$$C1 \lt B$$$ is interesting
They are subtasks. C as total has 1750 points, so you can't say C1 is easier than B.
What C being subtask changes? C1 having 750 logically means its easier than B.
See for yourself in the round !!
I think it's true.But C1(subtask) have 750 points and B(whole problem) have 1000 points,so it's normal to be C1<B because of C1 is just a subtask.C1+C2 have 1750 point.
What a short announcement! Hope problem statements are short and easy to understand like this
what does 1000+750 or 750+1000 actually means?
It means that there are subtask and for completing the first one you'll get (in the first example) 1000 points and for the second one 750, so 1750 in total.
Most of the time solving the harder one also solves the easier one.
I'm really excited about the contest and the opportunity to solve problems and boost my rating.
What are the usual ratings of A B and C1 in div2 ???
Since a few contests, usual rating for first three questions is like 800-1000-1200, but also sometimes 800-1200-1500. This is as per my observation.
800-900 1000-1200 1400(c1) 1900(c2)
So many C1+C2 these weeks
Fantastic!
In fact I'm fed up with them and really scared of them.
Cheaters cheat for rating. In fact, I sometimes ask AI for algorithems that I don't know. I don't know why the cheaters cheat, because an AI search query needs the amount of electricity to light a light bulb for fifthteen minutes, they don't get much prize money, and would you feel guilty after you cheat?! I would. Also, rating isn't worth anything to most of us, and when cheaters cheat, they'll get addicted to it, and one day, they'll be found out, and MikeMirzayanov (or any member of the headquarters whatsoever) would be furious.
Well, have you replied to the wrong comment?
MaxBlazeIceInk and I are talking about Problem C1 and C2 in recent contests.
Nah, I think the reply is on point. At least there’s a silver lining: watching cheaters (for less perceptive readers I refer to Kuro_neko) pretend they don’t get the point is somewhat funny.
Sorry, i thought that you're talking about cheaters.
But you accidentaly revealed a cheater. There's no need to be sorry about it.
Did I? Who? When? How? I didn't realize it.
now I have to decide whether to watch the UCL final or to participate in a binary round.
participate in the binary round cuz psg winning anyway
As an Arsenal fan, this is the only match I'll be watching which includes Arsenal and it's not complete haramball, so I have to consider
Agree.
I guess I should have T_T
hi
last c1+c2 gave me nightmares for days, couldnt sleep :)
i hope i can sleep after this round
Sleep now. Or you may not solve even B. Sleeping is very important for health and for contests.
People should develop a habit of checking the profiles of users they want to reply. sigbeta is very likely a cheater.
Be aware that a lot of cheaters impersonate active legit community members (that's a fact) to conceal their cheating (that's my theory). I can see multiple such users in this blog.
Also, it's absolutely crazy that your health advice is downvoted. Which is worse, people tend to upvote AI slop comments or blogs of some users just because their hanlde is yellow or sth (they cheated their way to master).
As a participant, I hope I'd reach pupil after this contest.
Hope I can get ABCDE accepted in my birthday.
It's a pity that I can't participate the Atcoder Beginner Contest cuz of my band.
But maybe I can participate.
Another C1 & C2. C2 looks a little tough, not sure if I can get it done
BYE BYE XVIII
Anybody will watch European Champion tonight?? I will participate in this contest for one and half hour,and then watch the amazing and excited Champion contest!!
who is for PSG
Having C1 and C2 is much more fun. Getting C1 accepted will lead to C2 accepted eventually.
I have a high hopes from this contest.. Last contest just ruined my confidence... All the Best for me and all of you !!
Hopefully, the problem statement will be as short as the announcement.
Why binary rounds make us bleed!!
I will drop to unrated because of this round lol (no offense to the authors — guess that I have skill issue)
AAAAAAAAA I hate constructives like $$$C$$$. Takes so much time to get the construction and you don't even know if it's the best way or not. And here's there no point in trying to solve $$$C1$$$, the author is basically telling us to solve it in a greedy/constructive way by giving $$$C2$$$.
Yeah, I thought it was a DP at first but I found the greedy solution (passes C1 and C2)
And here I thought the constraints would work until the numbers of seats gave me like 10^10... only C1 passed
but C is not a constructive :thinking_face:
but its not a constructive?
Thanks for announcing that system tests are equal to pretests. I was getting WA on case 17 of C2, so I just added the O(n^2) solution of C1 for some fixed cases , and it passed
It was my most stupid and the smartest solution at the same time.
code for C1:376683154
code for C2: 376695110
OMG I couldn't submit D for 3 minutes because the site crashed holy shit they stole my candidate master
so do i
Why couldn't I open the problem statement in the last few minutes of the contest? It showed the error 'Can't read or parse problem descriptor,' and I couldn't submit my code either.
Problem E is beautiful.
Were you able to prove the fact that every snake is crossing the diagonal at its middle point? It was an important fact for my solution, and I happen to guess it by looking at pictures.
The diagonal has $$$N$$$ squares and each snake can only cover $$$1$$$ square on the diagonal, so it's forced.
You can actually prove that the snake of size 2i-1 starts in a cell which is n-i cells away from (1, 1) and ends in a cell n-i cells away from (n, n), it would then follow quite trivially that its middle point its on the middle diagonal. To prove this you can see that a snake doesnt occupy more than one cell on each diagonal (of those defined by r + c = i, where this represents the i-th diagonal), then since there are 2N-1 diagonals the biggest snake must occupy at least one cell of each one then the remaining diagonals are equivalents to the ones on a (N-1) X (N-1) grid. Thus by induction the snake of size 2i-1 must start at the diagonal mentioned.
Oh wow this is a really cool way to put this observation — and it extends nicely to all diagonals besides the main one (i struggled with noticing it during the contest)! Thanks
Disclaimer: I didn't solve E, most probably (queued but meh).
As for the proof, well, looks like the whole configuration is symmetric along the main anti-diagonal, not just snake lengths. I didn't formally prove it, just, the construction falls apart if they aren't. A sketch:
Consider the longest snake. It sure touches both corners.
Now consider the second-longest snake. It should start and end in squares adjacent to the corners. So they are on one side of the longest snake.
Etc.
The way I thought about it was as follows:
Unfortunately I got this with like 15 minutes left and then panic submitted something which kinda worked but was wrong (you have to be careful about how you count)
Actually, the whole problem set is a nice step aside from the usual "100500-th fun fact about MEX" and its friends :) .
Problem F: How is $$$\frac{2n}{3}$$$ pancakes achievable? In particular, in the sample test with $$$a=1, b=2, k=2$$$.
Problem D: How to prove that the answer fits in $$$2^n$$$? I used the heuristic "go from solving Hanoi $$$(i, from, to)$$$ to $$$(i-1, from, to)$$$ and if all $$$i-1$$$ are on middle pole, switch the $$$from$$$ and $$$middle$$$". Intuition tells me it's not good enough if $$$i-2$$$ first elements were on middle pole and I had to return them all to $$$from$$$ so I have a fair $$$i-1$$$ tower to play.
Problem C1: does the lower constraint actually help in some meaningful way? I assume one may try to dp, but not clear what you can put as state parameter, that doesn't make the problem harder than C2 version.
Interesting problemset!
Let $$$ f(n) $$$ denote the number of steps required for the subtasks from $$$ 1 $$$ to $$$ n $$$. We will prove it by induction.
Base case: $$$ f(1) = 1 \le 2^1-1 $$$.
Case 1: $$$ f(n) = f(n-1) + 1 $$$: trivial.
Case 2: $$$ f(n) = 2f(n-1) + 1 \le 2 \cdot (2^{n-1} - 1) + 1 = 2^n - 1 $$$.
Case 3: $$$ f(n) = 2f(n-k) + f(n-1) + 1 $$$. Note that here we must have $$$ k \ge 2 $$$, hence
$$$ f(n) \le 2 \cdot (2^{n-2} - 1) + (2^{n-1} - 1) + 1 = 2^n - 1 $$$.
I didn't solve F but one of the obseervations i made was that if both a and b divide k you can "sacrifice" 1 out of 3 pancakes to cook the ones beside it. For example t = 1: (1 2 0) t = 2: (2 4 0) t = 3: (2 5 2)
For problem D:
Consider 3 locations: $$$from, to, free \in {1, 2, 3}$$$.
Let $$$f(m, l_1, l_2)$$$ be the ops number to move a $$$m$$$ layered tower with from location $$$l_1$$$ to location $$$l_2$$$.
We need to compute $$$f(n, from, to)$$$. Here $$$from = 1, to = 3, free = 2$$$.
Induction: $$$f(m, from, to) \le 2^m$$$ for $$$m \lt n$$$.
What do we need to move $$$n$$$-th layer? We want to have exactly $$$a_n$$$ elements on top of it.
Let's remove suitable layers above $$$n$$$-th layer greedily: in case there are several suitable layers, take the lowest. Let's say it is layer $$$k$$$.
To move layer $$$k$$$ we need to have the top layer on at least one of the positions $$$to$$$ or $$$free$$$ to be larger than $$$k$$$. How do we guarantee such state? We need to clean up a bit after each moved layer.
Namely, after each moved layer $$$k$$$ ($$$from \rightarrow to_k$$$) build a tower on top of it using all the suitable previously moved elements (that is all the moved elements $$$ \lt k$$$). What is the ops number to do that? By induction it's $$$\le 2^{k-1}$$$. Note that here each layer $$$k$$$ that is to be cleaned $$$from, free, to$$$ is just a permutation of $$${1, 2, 3}$$$, so induction $$$f(k, from, free)$$$ is indeed applicable.
Thus, moving layer $$$n$$$ we need to clean up at most $$$a_n \le n - 1$$$ layers, therefore, after we moved layer $$$n$$$ we used at most $$$1 + 2 + \dots + 2^{n-2} \lt 2^{n - 1}$$$ ops.
Then, we only need to put the rest on top of $$$n$$$. The rest is $$$n-1$$$-layered tower, that stays on position $$$from_{n-1} \in {from, free}$$$.
So, $$$f(n, 1, 3) \le 2^{n-1} + f(n - 1, from_{n-1}, 3) \le 2^{n}$$$
We can set $$$dp[i][j]$$$ to mean "At index $$$i$$$, exactly $$$j$$$ tables have been used. How many people can you fit?".
Thus, we have the following transitions:
$$$dp[i][j] = dp[i-1][j]$$$ (ignore giving someone a seat)
$$$dp[i][j] = dp[i-1][j-1] + 1$$$ (seat introvert / ambivert as introvert)
$$$dp[i][j] = dp[i-1][j] + 1$$$ (seat extrovert / ambivert as extrovert, only if seats remain, i.e. $$$dp[i-1][j] \lt seats * j$$$)
The result of $$$dp[i][j]$$$ is the max amongst all available transitions.
Additional unneeded information to optimize transitions: Note that it is always optimal to seat an extrovert whenever possible with this approach (exchange argument, if you seat an extrovert later you're only in as good a spot but lose the option to seat that extrovert elsewhere). The same can be said with treating ambiverts as extroverts, so a similar approach can be done there too. Finally, you can choose whether or not introverts (and ambiverts acting as introverts) can be seated in a new seat; in fact you can show optimality of forcing introverts to sit whenver possible (similar exchange argument). Thus, you can optimize some dp cases by forcing extrovert/introvert seating whenever possible (ambiverts still have options, so this alone doesn't remove the dp completely).
Nice round! I want to eat a cake now.
D was one of those problems when you need to think twice before implementing so that the implementation doesn't become cumbersome. Sadly, I didn't have enough time.
I submitted D in the last 5 minutes. It is still in queue. Maybe I could make it AC if I got the verdict before the contest finished.
Though performed extermely bad, I think the problems are interesting!
(Note: DP is important!!! Greedy and construction won't always work...)
https://codeforces.me/blog/entry/154147
Excuse me for bothering the competition organizers, but I hope you will take note of this post. I believe there was a wrongful ban.
https://www.youtube.com/@tenperformer To everyone who needs this editorial, There is a video under this channel where I have posted binary search solution on C1/C2 along with proof I also post regular videos on transformer architectures and evolving technologies if you guys are interested in understanding them
Good problemset, just one question why points of C1 and C2 were less than equal to B, they were way harder than B atleast for me
I think there're no problems in score distributon.
C1 is the lead-in of C2, due to finishing C1 would be helpful for finishing C2.
So I think the score of C1 and C2 is suitable.
Three contest down, and I still couldn't hack :twin:
What to do when I lose rating? (Wrong answers only)
Good contest though I just skill issued C
Modernize the CF website
The queue at the end of the round was diabolical. Would have solved C2 but I didn't realize it was wrong since it was in queue for 5 whole minutes before I tested it myself. Def a skill issue but that still wasn't a fun experience.
Regarding B, where in the problem statement can you infer the following points?
I had predicted this based on the sample output for a = (2, 3, 4, 3, 2) and a = (3, 3, 3, 1, 1), but I feel this was an inappropriate approach to reading the problem. For those who solved this problem quickly, what part of the problem statement did you use as evidence to recognize the above fact? This may seem more like a question about English than about cp, but please bear with me.
Well according to your understanding, the answer for 1..i would be min(a[1]...a[i]) which isn't the case for even the first sample.
I also thought the statement was vague. Even the "formal" explanation didn't seem formal to me, specifically, I couldn't understand what the word "pushed" meant initially.
I submitted my code for F just 2 seconds before the contest ended, but I had no idea whether it would pass until the system test (as my submission was still stuck in the queue). Just now, I kept refreshing the Status page, watching the number of submissions drop one by one, until only mine was left. Fortunately, it ended up passing, and I managed to AK the contest at the very last moment! What a thrilling contest!
Congrats!
Appreciate your hard work! Problem F was tough for me but very rewarding, and that last-moment pass made my day.
So sorry if the question is dumb I just started codeforces and cp before this contest I only did 3 cp questions, I was able to solve A problem and only A but why didn't my rating have any effect and it says in my profile that this contest was unrated
It takes time for ratings to be updates after a contest
problem statement of $$$B$$$ wasn't clear
https://codeforces.me/blog/entry/154148
by when will ratings update?
chat im finally rated
Nice round
The testing system however was absolutely dead in the last 5-ish minutes. I had a solution to D, sent it, it wasn’t tested until the system testing. I had a single wrong line that ruined the whole solution due to my stupidity… Or I just need more experience, started writing in C++ only about a year ago.
Still could’ve probably found it if I saw the WA2:(
very interesting rating graph this person has! https://codeforces.me/profile/oleinikowc
I am a noob and wanted to know whats wrong in this plzz help c1 ~~~~~ //this is code
include
include
include
include
include
include
include
using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin>>t; while(t--){ long long n,x,s; cin>>n>>x>>s; string str; cin>>str; long long limit=0; long long count=0; long long tables=x; long long ic=0; map<long long,long long>after; for(int i=n-1;i>=0;i--){ if(str[i]=='I')ic++; if(str[i]=='A'){ after[i]=ic; } } for(int i=0;i<n;i++){ if(str[i]=='I' && tables>0){ count++; limit+=s-1; tables--; } else if(str[i]=='E' && limit>0 ){ count++; limit--; } else if(str[i]=='A'){ if(limit==0 && tables>0){ count++; limit+=s-1; tables--; } else if(limit!=0){ if(after[i]<tables){ count++; limit+=s-1; tables--; }else{ long long ref=i+1; long long es=0; while( ref<n && str[ref]=='E'){
es++; ref++; } if(es-limit>=1 && tables>0){ count++; limit+=s-1; tables--; }else{ count++; limit--; }
} } } } cout<<min(count,s*x)<<"\n"; } return 0;} // ~~~~~
Try for the input
1 5 2 2 IAEAI
The greedy returns 3, while the optimal solution should be 4
The optimal seating:
I E
A A
Your greedy:
I A
A
thz
siddynexp Can you explain this to us: why do you cheat? Does it make you feel nice inside?
PSG finally won
if Alice isn't having a party, i don't have to do these problems.
Good luck everyone! Thanks for the great contest.
(Removed. I have moved this discussion to a private DM with the coordinator.)
Nice
Hello, I received a similarity notification for my submission to 2232C2 and would appreciate a manual review if possible.I did not copy code from other contestants or share my solution with anyone. One thing that I found confusing is that my solutions for C1 and C2 were very similar, since I solved the hard version first and then submitted essentially the same approach for the easy version. However, only the C2 submission appears to have been flagged.If additional information about my approach or reasoning is needed, I would be happy to provide it. Thank you for your time and consideration.
BYE BYE XVIII
Dear Codeforces Team, My solution was flagged as being similar to another participant's submission. I would like to request a manual review, as I wrote the solution independently and the implementations are completely different. While the underlying idea may be similar, which is common in competitive programming, the code structure and implementation were my own. I would appreciate it if you could recheck the submissions and reconsider the verdict. my solution 376701571 dpInvariant solution 376666673 please look into this matter
[Deleted]
Hello, I would like to clarify regarding warning I received for my submission (376687415) of 2232C2. I solved the problem independently during the contest. Since the problem had a C1 version with smaller constraints, my first approach was DP for C1. In DP I tracked the number of tables in use and for each such state, the maximum number of people already seated. I then analysed the DP state further and realised that greedy can help to solve this problem by tracking a the number of empty tables, available seats in tables in use and ambiverts whose placement can be changed later to allow an extrovert to sit. I also made a submission of C1 with the DP code I wrote first, then made submission for c1 with the greedy code and for C2 I made submission with the same greedy code. This approach was natural and I have derived the logic and written the entire code on my own and I did not intentionally violate contest rules. Thank you.
hello dear users of the best coding platform Codeforces , im writing this comment wishing to get called to translate official rounds(yea i know im loser with low rating , noname , etc.) pls i know russian almost perfectly mb you guys can like this comment to others can see this