你好,Codeforces!
We are delighted to invite you to participate in Codeforces Round 1105 (Div. 1) or Codeforces Round 1105 (Div. 2), both of which will be held on Jun/27/2026 17:35 (Moscow time).
For both division 1 and division 2, you will be given $$$2.5$$$ hours to solve $$$6$$$ problems in each division.
The problems were authored and prepared by Gold14526, Milkcat2009 and wangmarui.
We would really like to thank the following people for making this round possible:
- Um_nik for the preliminary review of the round
- cadmiumky for the great coordination.
- Alexdat2000 for providing Russian translations.
- hcywoi and Network_Error who also prepared problems that were ultimately not used in this round.
- lkrqwq for optimizing many details of problems.
- StarSilk and errorgorn for black red testing.
- Network_Error, StelIawinD, _istil, jiazhichen844, ETO_leader, Dragos, MtSaka, Caylex, nifeshe, rolandpetrean for red testing.
- Proof_by_QED, lkrqwq, Watersphere, Timosh, tzl_Dedicatus545, 0x0002, a_little_cute, morandyg, abruce, programpiggy for yellow testing.
- MornStar, Ns6Juruo for purple testing.
- cybher, zhouyitao123, Nyemot, Pie_TealCompressorDragon for blue testing.
- xiaohaoaibiancheng666 for cyan testing.
- NSZBD_dklmq_12 for green testing.
- NanguX for gray testing.
- MikeMirzayanov and KAN for the great Codeforces and Polygon platforms.
- You for participating in this round.
Scoring Distribution:
| Division | A | B | C | D | E | F |
|---|---|---|---|---|---|---|
| Div. 2 | 500 | 1250 | 2000 | 2250 | 2750 | 3500 |
| Div. 1 | 750 | 1000 | 1500 | 2000 | 2750 | 3500 |
Good Luck & Have Fun!
UPD: Editorial has been posted








Auto comment: topic has been updated by wangmarui (previous revision, new revision, compare).
Auto comment: topic has been updated by wangmarui (previous revision, new revision, compare).
After 5 years, I’m back in Div. 2 :///
Seems like I’m getting old, just like tourist :)
I wonder why are your contributions negative?
The first Div.1 competition I participated in, looking forward to it!
Sorry for the meaningless comment.
As a tester, there is at least one catgirl among the authors :)
niceI guess her handle inlcude "cat"
As far as I know, _istil is the only catgirl
It's always weird that a catgirl didn't want to admit to her ethnicity.
As another tester, I can confirm that she’s telling the truth.
Div. 2 contest is back yay!
Where have they gone? Makes sense for Div4, Global and most importantly CodeTON rounds; but we have Div2 rounds consistently.
Anyways now after you have pushed me to nostalgia, why we don't have CodeTON rounds anymore?
The last time CodeTON round was held; I remembered my credentials for previous account.
As a tester, I think the problems are quite interesting. And I hope everyone can enjoy this contest!
There is at least one catgirl among the authors :)
bruh
meowwwww
Long time no see...individual div.1 and div.2's. Hoping it to be a great contest! All the best.
It might be a problem on my end but whenever I try to register I get an error.
You can change your chrome
Aren't there any interactive or communication problems? In fact they're interesting.
As a tester, I lost the right to gain positive or negative rating delta in this contest.
As a tester, this contest contains a non-zero number of great problems, so you should participate.
As a participant I hope to hit GM
As a bystander I hope you don't
As a t
Good luck to all participants!
As a participant, I hope to reach CM
Shouldn't it be TBD
True, I am illiterate unfortunately
On the verge of falling into 1200s again
isn't this round 1105?
It's weird because it was 1105 before and the title was just edited
I don't know why it shows 1104, but we actually filled in the correct contest ID
You can try pasting link with text as 1105 maybe
Wasn't Order Capital one round 1104?
I'm scared of 2000 points for task C
Judging by the testers, the contest won't be easy.
Does 2000 C mean that C will be as hard as a normal Div2 D? I'm scared...
Hope to solve 3 problems and get higher rating! don't want to become CM :(
As my first div1 I hope to become expert and enjoy the problems
Points for B(1250) and C(2000) look tuff (  ̄- ̄)
true,if looking only at points div 1 looks easier than div 2.
2000 points for C? this is scaring me lol.
1250 points for B, does that mean that is going to be harder?
B 1250... C 2000...! What will happen in the Division 2?
wangmarui?????!!!!!
i am not able to register for this contest(div 2) , whenever i am clicking the register button it just shows some internal server error. can anyone help me out?
skill issue
good luck to all
Again , No Interactive Problem :(
2000 rating points for problem C (o_O)
guys someone please tell me, is it a typo, or the div 2 problem C is actually gonna be worth 2000? can someone tell?
CM isn't allowed to register for div2?
As a tester, orz Gold14526
Can't wait to get humbled by problem C.
As a tester, this round is nice.
.
Div 2 C is 2000 points!
I will be giving this contest after a very long time today.. let's see If I still have what it takes to solve 2-3 problems.. targeting 3... :)
i will consider this my first contest since coming back to cf after months. this time imma try to make this thing work
I hope everyone who usually relies on problem C or D to save their contest can solve it, my friend.
why both on same day same time, any logic behind it ??
why so many dislikes, just explain something
its at the same time, 9:35 PM in my timezone, but it may change depending on timezones
MikeMirzayanov
Hello, I am writing this post through my new account to appeal for my disabled account abcd1145.
I understand that my account was disabled, possibly due to my recent performance where I solved some problems very fast. I want to sincerely apologize if my actions caused any concern. I can assure you that I completed the work independently, but I fully understand how it might have looked unusual.
In fact,I have solved several 2400-rated problems recently.Problems happened to be straightforward for me.
I humbly request you to please reconsider my case and give me one last chance to restore my account.
This account won't be used for any contest.
Thank you for your time.
I also want to mention that I was using a VPN during that contest to improve network speed, because I can't pass the Cloudflare verification in China. The VPN node I used was located in Japan. I understand this might have caused an unusual IP pattern. I'm happy to provide any additional info if needed.
Its the photo of VPN.
https://i.imgur.com/DmMvVsa.png
Mathforces isn't fun :(
This contest is seriously humbling me, can't wait for the editorials lol
Stating "hack is disabled for this problem" indicates that uphack is also prohibited.
I think the rule of 1A~2B being unhackable only applies in contest.
This contest is TERRIBLE.
How does one even solve Div2B?????
I hope I can explain it.
Consider a 2 x 2 matrix.
according to question a ^ b ^ c ^ d = 0
now d ^ d = 0; hence, a ^ b ^ c = d
So if we know the value of a, b, c, we know the value of d
Now, let's consider a 3 x 3 matrix.
According to the formula above, e is forced, so now check b ^ c ^ e ^ f = 0. If e is forced, then f is forced too,
Similarly, h is forced, and in e ^ f ^ h ^ i = 0. e, f, and h are forced; hence, i is forced.
This idea generalizes. For an r × c window, once the first r−1 rows and the first c−1 columns are fixed, every remaining cell is forced by the XOR constraints.
Therefore, the only free cells are those in the first r−1 rows and the first c−1 columns.
and = m(r−1) + n(c−1) − (r−1)(c−1)
now only 1 and 0 is possible, 2 possible cases, so do
2 ^ ans over the mod given
I think the statement for Div1 B is very poorly written. At first glance, I thought we had to distribute gifts to ALL OF THEM, and the order of distribution determines the answer.
After reading the example explanation, I realized that we choose a subset of people to receive a gift. Fine, but I still thought the order of distribution matters.
However, it turns out the author actually means all chosen people receive gifts at the same instant (how could it be? inappropriate background story) and makes it a really easy problem. What?
Also, I haven't done CP for a while, but is it acceptable these days to use 998244353 in problems that don't actually require it?
That mod thing for problem C) was kind of a troll move ngl
Nice trolling in div2C
Just guessed that the answer for $$$B$$$ has to be $$$2^x$$$, and found $$$x$$$ by luck lmao. Thanks for giving a lot of sample tests.
Good problems, but cheaters done ruined it as always.
How to solve div1D:
Given $$$10^6$$$ constraints, it is quite likely that the answer should be $$$\binom{n}{m} \sum_{i=m}^n \binom{n-m}{i-m} \cdot \text{something}$$$. Just write brute force and guess :)
Is it just me or this contest is insanely difficult, especially because of the confusing problem statements that you'd only understand if you work with them and the examples on paper.
why problems are so hard T_T
P.s problems are really interesting tho
Problem div1A is very cool <3
Nice problemset
I overthinked B and wasted a lot of time :(
mathforces
Div2B and Div2C are cool problems. Though admittedly I kinda hate 2C cuz I needed to use too many braincells and so none was left to do D haha
Bitforces.
I want to know what's the reason behind div2B for that name?
Do authors check if the problem is solvable by ChatGPT ?
Div2C was pure evil. After struggling with the math in B, seeing mod get mentioned again in C made me look for scenarios not resulting in instant win or loss (to no avail obviously) basically ONLY due to expecting a large answer, and wasted way too much time for absolutely no reason. D was relatively straight-forward, but couldn't finish coding it up in time due to this. Great trolling.
How can someone pass Div.2 F in 16 minutes
Does anybody know why I'm not a trusted participant??
last Order Capital Round 2 (Codeforces Round 1104, Div. 1 + Div. 2) i did A+B+C
this Codeforces Round 1105 (Div. 2) i did...NOTHING !
what went wrong T_T
please help.
Does codeforces have a special feature to report cheaters? https://codeforces.me/contest/2240/submission/380349840
I mean like:
And at which moment auto checking is performed?
There's no such feature. Also, I wouldn't hope on the rollback, since it's very weak, and doesn't ban blatant cheaters like s0ld4t1k (from newbie to 83th place in div1+2). Moreover, LunarSheriff had same comments in Order Capital Round 2 (Codeforces Round 1104, Div. 1 + Div. 2), and they weren't banned after the rollback.
I suggest taking a look at Community rating project. I'm building this project for people who care about sportsmanship.
Fick dich!
I think problem A in div2 should always be very simple so almost everyone who reads it solves it unlike in todays contest
29k people registered but there is only 8k in official standings where as the previous 2 div2s had 30k registered/11k standings and 29k registered/ 11k standings respectively
i think the 3k difference is from people who saw the first question and decided not to join the contest skewing the results
someone who placed 1k out of 8k in todays contest should have been placed 1k out of 11k which is a better placement
or alternatively just add anyone who registered for the contest and read a question from the contest to the standings
U are the smartest person in this comment section because:
I was literally wondering why are rating changes negative even after getting better ranks
I myself sometimes think to leave the contests after checking the first question
These days it is really difficult to gain a positive delta, so many cheaters.
why was div2A and div2B in that order? i found B easier than A and solved it in 1/3 of the the time.
Tbh I was confused about how in (div1) AB it is said at the beginning that hacks are disabled, and then in problem C
Like I understand that it's probably assumed that "It is guaranteed that the permutation exists [in our tests]" and any other input is invalid and hacks never allow invalid inputs. But I still feel that all this should've been expressed better.
(because of this I solved the problem D first, which was overall nicer to think about anyway)
This decision was taken for reasons of good taste, given I think many other rounds have already interdicted hacks on the lower half of the problems (as to mitigate stupid cases where beginners may have a bad experience od getti g hacked, e.g. unordered map shenanigans). Indeed, this was an oversight, but I don't think an important one (clearly giving p 1 n times will not constitute a valid test).
In response for the solution 380357351, coinciding with 380360295:
I have a habit of storing my solutions for problems after contests (weather they be Leetcode or Codeforces), on github. I usually do it after the contest is over, but yesterday during the contest, I had to leave and carelessly comited my changes before the contest was over (at 9:38 pm IST), the other solution was posted around 9:44 pm IST. I am sorry for my actions, I will make sure to change the visibility of my github repo as well as to only save the solutions after the contest concludes. Here are the proofs:
https://drive.google.com/drive/folders/17A8BPgexfwhAXO5J-RMLm0uIrhcizEvs?usp=sharing
The drive link has both my commit time and the other user's submission time. Please forgive me for this time, I will not repeat my mistake.
thanks to this contest for promoting me to specialist XD
Hello MikeMirzayanov. My solution 2239B https://codeforces.me/contest/2239/submission/380328246 has similar structure such as some other solutions. I kindly ask you to reconsider your decision in light of the following factors. This problem 2009F (https://codeforces.me/blog/entry/133296) is conceptually similar to the following problems (cyclic array a+a and pref sum with it), but the final formula for working with indices is slightly different. Also the problem 1358D (https://codeforces.me/blog/entry/77869?utm_source=chatgpt.com) has a similar idea for processing a cyclic array. I corrected part with the initialization of the cyclic array, just in a more optimal form. Next, I went through the array and used the forumula that almost everyone has in their solution (2*d*a_i — sum(a_j)). I use github copilot (NOT FOR LOGIC) and it also suggested a line with pref sums.
This structure was used in many solutions from the competition ( https://codeforces.me/contest/2239/submission/380339445 https://codeforces.me/contest/2239/submission/380332546 [https://codeforces.me/contest/2239/submission/380335268 https://codeforces.me/contest/2239/submission/380332745 https://codeforces.me/contest/2239/submission/380329551 https://codeforces.me/contest/2239/submission/380329223) )
someone's gotta address the elephant in the room
You are absolutely right
You are absolutely right!
$$$E$$$ is a beautiful problem, coming up with the solution and proof was amazing (even though the editorial is shit and explains nothing).