Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

efishel's blog

By efishel, 4 weeks ago, In English

¡Buenas, Codeforces!

We are super excited to announce Codeforces Round 1127 (Div. 1, Div. 2), which will start on Oct/11/2026 21:35 (Moscow time) Note the starting time is 4 hours later than the usual. The contest will be split into 2 divisions where you will be given 6 problems and 2 hours to solve them. At least one problem will be interactive so we recommend reading the guide on interactive problems

Div. 1 score distribution: $$$500 - 1000 - 1250 - 2000 - 2250 - 3500$$$

Div. 2 score distribution: $$$500 - 1250 - 1250 - 1750 - 2000 - 3000$$$

This round is based on the Mexican Olympiad in Informatics (OMI) 2026. All problems were written and prepared by our team of pupils, aka writers, namely jampm, Francisco_Martin, Teto, SopaconK, Remgagagali727, Marckess, and efishel. We hope you enjoy it and maybe learn something about Mexican culture along the way.

The team would like to thank:

cry for their considerate coordination (and ample basement).

All these pupils, aka testers, for their support and great feedback (we love you): SpyrosAliv, AksLolCoding, turska, JoenPoenMan, kevinyang, miniyahirpro, AmShZ, pyoro, Blagoj, br1g, Juanchoki, prvocislo, osvarp, ecnerwala, Argentum47, Keshi, prins, racsosabe, danielrmzkuhn1, 0xor1, temporary1, nik_exists, nifeshe, Edu175, CSQ31, tourist, Jose_17, x93bd0.

Alexdat2000 for translating statements.

ocarima et familia for their many years supporting the Mexican Olympiad in Informatics and pushing us to grow.

MikeMirzayanov & KAN. You know why :)

Writers + ozy1220:

UPD: Thanks to everyone for participating in the contest!

  • Vote: I like it
  • +321
  • Vote: I do not like it

»
4 weeks ago, hide # |
 
Vote: I like it +39 Vote: I do not like it

As a tester, I really hope that the competitors at the top of the standings don't have the same rating as the authors

»
4 weeks ago, hide # |
 
Vote: I like it +31 Vote: I do not like it

As a writer I wish you enjoy the problems and get a positive delta :)

»
4 weeks ago, hide # |
 
Vote: I like it +25 Vote: I do not like it

As a tester, I was definitely not tricked into testing by Remgagagali727.

»
4 weeks ago, hide # |
 
Vote: I like it +15 Vote: I do not like it

As a tester, I love efishel

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Good time for the chinese students.

»
4 weeks ago, hide # |
← Rev. 2  
Vote: I like it +5 Vote: I do not like it

Div.2 B and C gonna be crazy since they have the same points :)

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I hope Cartels get whoever cheats in this round

»
4 weeks ago, hide # |
← Rev. 2  
Vote: I like it +29 Vote: I do not like it

I'll try to sleep at 8.p.m. and wake up at 2.a.m to participate:)

Unfriendly time for Chinese students(:sob), maybe "based on" contests' starting time is usually the same as the local's, I guess?

UPD: I suddenly realized that my homework's deadline is Oct 11 23:59 p.m, not Oct 12 23:59 p.m, so no sleep tonight, yeah!

  • »
    »
    4 weeks ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it +13 Vote: I do not like it

    It is a mirror of the actual national highschool level competition, otherwise people could cheat and affect the rating of everyone. It will be at 12 pm at Mexico's time. Consider that usual Div time is 8am at Mexico's time.

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Ohhhh thanks I have -2 hours left to sleep.

»
4 weeks ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

estepupil

»
4 weeks ago, hide # |
 
Vote: I like it +27 Vote: I do not like it

I wish my delta would be green as the announcement blog.

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Another unrated contest for me :sob:

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I don't wanna make a complete search, is there any real Pupil there?

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

is it rated?

»
4 weeks ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

I expect an AK from pupilemus

»
4 weeks ago, hide # |
 
Vote: I like it +20 Vote: I do not like it

2000 E 👀 👀 👀

Hope to keep up my streak of really good contests good luck guys girls others and prefer not to says

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

UFFFFFFFF

»
4 weeks ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

As a pupil, i think is going to be an amazing round

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As a Writer it would be the best feeling that everyone solving our problems

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I'm 2067 but can't sign up for the div 2, it says my rating has to be between 0-1899 but aren't people 0-2099 allowed to do div 2s?

»
4 weeks ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

Cool score distribution, but I may not be able participate cuz of timezone (UTC+5, contest starts at 23:35) :(

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

good luckk :3

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As a pupil, targetttttting 3 or 4 ACs :)

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

as a specialist i wish to not become pupil again...

»
4 weeks ago, hide # |
 
Vote: I like it -9 Vote: I do not like it

Cheer to the committed pupils :)

Oh I need to participate this at 2:35 am :(

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope to reach pupil this contest to join them!

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Why does the contest have to be held four hours later?
It's really late, I really want to take this contest because it's about Olympiad algorithms, but I don't think I can.

»
4 weeks ago, hide # |
 
Vote: I like it +19 Vote: I do not like it

Ojala q podia participar en la ronda, voy a resolver las problemas manana. Buena suerte a todos q van a participar (damn my spanish is rusty). MANIFEST POSITIVE DELTAA

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Wish everyone a good contest!

»
4 weeks ago, hide # |
 
Vote: I like it -27 Vote: I do not like it

Hey is it a way to participate in div1 without having enough elo?. I did a div1+2 and carrot told me I had a performance of 2700 (top 47) (I am a trainer at my uni). It could be any exceptions? I'm new at codeforces contests, if anyone can help me could be great.

  • »
    »
    4 weeks ago, hide # ^ |
     
    Vote: I like it -10 Vote: I do not like it

    Hey there, employed.

    This guy is the trainer at my uni's competitive programming club and i want to attest that i highly doubt he was using AI during a recent round where he was banned.

    I think he's been banned for implementing too fast. To put this into perspective, the day before that contest happened, we did a SWERC-alike practice contest (3 people teams) at our uni.Bruh-Ket participated by himself and absolutely demolished the round at a brutal pace. And I was literally in the same room as him.

    On top of that I would like to add that he's a great guy with true passion for algorithms and data structures who makes an effort everyday to share his knowledge. I think it's great that cheating is pursued and obviously this type of mistakes will happen. However, I wonder wheter there is a way to review his case. Thanks :)

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by efishel (previous revision, new revision, compare).

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As a participant, I hope my result in the competition earns me good points.

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

What's the idea for Div 2 D ? I figured out you can consider an array from positions 2 to 2*n and the robot can move either +1 step or -2 steps

  • »
    »
    4 weeks ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    If n is divisible by 3, do 2*n-1, 2*n-3, ... 3 three times. Otherwise do 2*n, 2*n-2, ... 2 three times.

    Solved using brute force + tons of casework:)

    • »
      »
      »
      4 weeks ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      oh got it

    • »
      »
      »
      4 weeks ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      how do you brute force?

      • »
        »
        »
        »
        4 weeks ago, hide # ^ |
        ← Rev. 2  
        Vote: I like it 0 Vote: I do not like it

        Insane casework + testing

        Code for reference:

        brute for n=5
        brute for n=4

        The brute for n=4 might not be particulary correct just look at the one for n=5

        • »
          »
          »
          »
          »
          4 weeks ago, hide # ^ |
           
          Vote: I like it 0 Vote: I do not like it

          Bro here have this 10 liner.

          code
  • »
    »
    4 weeks ago, hide # ^ |
     
    Vote: I like it +1 Vote: I do not like it

    The diagonal modulus by 3 increases by 1 after every operation.

  • »
    »
    4 weeks ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    so +1 / -2 means that (position — time) modulo 3 remains the same.

    so lets try this pattern: 2n, 2n — 2, 2n — 4, ..., 2 and then repeat again two more times.

    so for $$$n = 2$$$, we see

    pos = 4 2 4 2 4 2
    time = 1 2 3 4 5 6
    diff = 0 0 1 1 2 2

    so like, the piece can be in any modulo 3 group, but it will get caught in this pattern. it's kind of a guess, I don't know how to actually prove this in math terms.

  • »
    »
    4 weeks ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    i didn't solve it, but at the last few minutes, i have some idea on how this is meant to be solved.

    you can think of it as some sort of dependency relation, where a diagonal is still a candidate in the next iteration if at least one diagonal in its dependent diagonals is a candidate that is not destroyed. you can also see that there's exactly $$$3$$$ diagonal with only one dependency ($$$2, 2n-1, 2n$$$) while the other has two, which means that you have to exploit this weakness with a strategy. The strategy goal is that, for each iteration, you have to remove a diagonal candidate (it's fine if a different new one is added though), but you also have to order the removal such that you can set up an iteration where you can remove at least two diagonal candidates at once. then basically rinse and repeat.

    i found that it works for $$$n = 4$$$ and $$$n = 5$$$, but i'm still not sure on how to generalize it.

  • »
    »
    4 weeks ago, hide # ^ |
     
    Vote: I like it +8 Vote: I do not like it

    Observe that in one move the robot can move modulo 3 +1. And now imagine all diagonals to be of 3 colors Red, Green and Blue. Reds = the ones with (r+c)%3 == 0 Green = (r+c)%3 == 1 Blue = (r+c)%3 == 2

    Now in these 3 families the robot will ALWAYS move in the pattern (say we started at index with mod 0) R -> G -> B -> R -> G ....

    So we basically want to match the rhythm But one critical thing to also observe is that we have to start top down (top right to bottom left) because observe that lets say robot is at a Red diagonal and we are lasering the diagonal which is the next (whose r + c is just greater than this) Red, then it is guaranteed that if our rhythms are matching then we will collide no matter what because in the next step it will go Green (if it decides top move up) and we will also go Green (moving down) and boom collision. If robot moves down then we will corner it eventually.

»
4 weeks ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Nice problems!

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

How do you do B? I tried a greedy approach where I maximize and minimize the sum before the number I am trying to maximize, but it failed. My submission: https://codeforces.me/contest/2274/submission/394196783

  • »
    »
    4 weeks ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    I kept the track of minimum and maximum prefix sums for each index. Then, used those to get the maximum at the current index.

    • »
      »
      »
      4 weeks ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      Bro I know what I did wrong. I didn't account for the first element in the list possibly being the maximum element. If I had added 1 more line of code it would have been AC. Oh well, next contest I'll do better with this type of stuff.

»
4 weeks ago, hide # |
 
Vote: I like it +54 Vote: I do not like it

Why the task C is appeared on the Div1 contest?

  • »
    »
    4 weeks ago, hide # ^ |
     
    Vote: I like it -17 Vote: I do not like it

    I believe that whenever there are separate Div1 and Div2 contests held simultaneously, the Div2 Problem C becomes the Div1 Problem A, and so on, until the Div2 problems run out within the Div1 set. I’m not sure if that’s exactly how it works, but it’s something I’ve noticed over time.

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by efishel (previous revision, new revision, compare).

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

can any one explain the idea of the c?

  • »
    »
    4 weeks ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    binary search the answer basically, since if $$$k$$$ is a valid answer (not necessarily minimum), then $$$k+1$$$ must also be a valid answer. as for how to check it's a valid answer, make $$$\left\lfloor\frac{k}{i}\right\rfloor$$$ bags that contains $$$i$$$ oranges for all $$$1 \le i \le k$$$ and see if you have any leftover oranges

  • »
    »
    4 weeks ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    First check whats the best cost.

    Suppose we take a cost K here are you options you can place K oranges in bag 1 K-1 oranges in bag 2 . . k/2 oranges in 2 bags and so on ..

    meaning if you choose to put x oranges in a bag you can repeat it K/x bags because the cost (x*(K/x)) <= K. ( Note if you start the bag size from large to small you will need less number of bags to fill all n oranges).

    We can see that if K is a possible answer it is obvious that K + 1 is also possible so we can binary search on K.

    Once we find the best smalles K possible use the same method to print the answer as well.

    Here is my submission : Solution

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

When will an editorial be available?

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

1900 -> 1600 you know what i'm saying

i hate B

  • »
    »
    4 weeks ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    It was tricky bud

    But once you spot that $$$S_i$$$ scales by $$${0, 1, 2}$$$, the greedy boundary logic

  • »
    »
    4 weeks ago, hide # ^ |
     
    Vote: I like it +1 Vote: I do not like it

    Also is it me or getting rating now is getting much harder than before. Like I remember when 1000 or 2000 in Div 2 used to give + in expert or just look at my graph.

»
4 weeks ago, hide # |
 
Vote: I like it +7 Vote: I do not like it

Found this contest easier compared to normal Div2. I don’t know why

»
4 weeks ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Great contest!

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

such a good contest!

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As a writer, I miss being a pupil

»
4 weeks ago, hide # |
 
Vote: I like it -10 Vote: I do not like it

As a real pupil, i want to be the tester of some cf contest..!

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I just learned the last step of Div.1 D is brute force, oh my god (:sob)

»
4 weeks ago, hide # |
 
Vote: I like it +19 Vote: I do not like it

Thanks for the contest!

I especially liked how div1D allowed (encouraged?) this way of solving: pretend that $$$x$$$ can only be up to, say, $$$m = 100$$$, brute force the first move, then try all possible hidden $$$x$$$ and choose the one that maximizes the total loss (it's not hard to see what to do after the first move more or less optimally, in particular how to spend about the theoretically minimal loss in the second move and achieve 0 loss in all upcoming rounds), print the optimal first move and generalize for $$$m = 10^4$$$. This way you don't get to experience this beautiful underlying construction, but it's a reliable strategy of using the computer that I don't see very often

  • »
    »
    4 weeks ago, hide # ^ |
     
    Vote: I like it +4 Vote: I do not like it

    I used that sort of strategy to solve div1B: do BFS over the states (masks of which diagonals the thing can be in) for low N and hope the pattern works out for higher N.

»
4 weeks ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

Hello Codeforces team,

I received a warning email regarding similar solutions for problem 2274B in Codeforces Round 1127. Both accounts mentioned in the email belong to me. I solved the problem myself, but I submitted the same solution from both accounts during the live contest because I really don't know that doing so could violate the contest rules. I apologize for this mistake. I did not intend to gain an unfair advantage, and I will use only one account for the future contests. Could you please review my situation and let me know will my contest result or accounts getting be penalized? Thank you for your time and understanding.

»
4 weeks ago, hide # |
← Rev. 3  
Vote: I like it 0 Vote: I do not like it

guess after a contest, most of the people mentioned in the blog escaped pupil

»
4 weeks ago, hide # |
← Rev. 2  
Vote: I like it -11 Vote: I do not like it

Hi Codeforces Team,

I’m reaching out about the plagiarism flag on my submission 394193822 for problem 2273C from Codeforces Round 1127. I wanted to clarify that both me and LuciferIsBack came up with the solution completely on our own without any communication during the contest.

The reason my code looks so similar to submission 394203051 is because we used a 2D Segment Tree template from our ICPC reference book on Overleaf, which itself is adapted from the implementation on cp-algorithms.

The problem asks whether we can make two matrices identical using row and column additions. The standard way to approach some of these matrix problems is by making another 2D difference array using A[i][j] — A[i-1][j] — A[i][j-1] + A[i-1][j-1]. Adding a constant to a row or column only affects at most 4 values in the difference array. By applying a similar approach to the 2D array A-B, we just need to check if all values inside a subrectangle in the difference array are 0.

The difference array idea is pretty common and both of us arrived at it independently.

I fully respect and understand the importance of fair competition. However, I believe this code similarity is due to us using the same template and a standard algorithmic technique, rather than any rule violation.

I’d really appreciate it if you could take another look at these submissions.

Thank you for your time and consideration.

»
4 weeks ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

efishel please upload the editorial ;)

»
4 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

efishel editorial plsss

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

WHERE ARE THE EDITORIALS?

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

hey will you guys publish the editorial anytime soon?

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hello, I received a similarity notification concerning my submission 394202359 for 2274E, which was matched with bluechips’s submission 394194840. Could you please review this match and clarify which parts of the submissions were considered significantly similar? My solution uses a 2D difference matrix to test adjacent 2×2 conditions and a 2D Fenwick tree to count nonzero entries. I understand that using the same algorithm alone does not explain every possible code similarity, so I would appreciate clarification about the specific overlap.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Mis compas los pupils XD (los del OMI Camp entenderán)

»
4 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Subject: Request to review disabled account (handle: kavyasanger) – skipped submissions

Hello Codeforces Team,

My account kavyasanger (email: [email protected]) has been disabled, and I would like to request a manual review.

In my recent contests, my submissions were marked as Skipped. I believe this was a mistake, for these reasons:

A flagged contest where I made no submission. In ED round 195, I did not submit any solution, yet that contest was also flagged on my account. I can’t see how a contest with no submissions could involve any violation. The problems I solved were simple. In the other flagged contests, the problems I solved were straightforward, low-rated ones. They use standard approaches, and I am fully capable of solving them on my own. Because the solutions are short and common, similar code from other participants is natural. I have not cheated. I did not share my code, and I did not use anyone else’s solutions. I write my solutions myself in C++, in a plain, simple style.

I have been an active participant for a long time and want to keep competing fairly. I’m happy to explain my approach to any of these problems, or to provide any other information you need.

Could you please review my account and, if the flags were a mistake, restore my account and my skipped submissions?

Thank you for your time.

Regards, Kavya Codeforces handle: kavyasanger Email: [email protected]