applepi216's blog

By applepi216, 4 days ago, In English

Hello Codeforces!

We (applepi216 and conqueror_of_tourist) are glad to invite you to Codeforces Round 1133 (Div. 1) and Codeforces Round 1133 (Div. 2), which will start at Nov/07/2026 17:35 (Moscow time).

The contests will run for 2.5 hours and have 6 tasks each. Both contests will be rated.

The round may contain an interactive problem, and we recommend recalling how interactive problems work before the round starts.

We want to thank these people, without whom this round would have been impossible:

and of course a special thank you to all of you for participating!

The scoring distribution will be released soon.

UPD1: The scoring distribution is released.

  • Div 2: $$$500 - 1000 - 1500 - 1750 - 2000 - 2500$$$
  • Div 1: $$$750 - 1000 - 1250 - 1750 - 2250 - 3000$$$

UPD2: Congratulations to the winners (possibly subject to change)! We hope you enjoyed the contest!

Div 1

  1. k1r1t0
  2. tourist
  3. jeroenodb
  4. Baddie_Lover
  5. boboniu

Div 2

  1. lifecert
  2. Octagons
  3. kicchu_fari_na
  4. mayike2026
  5. KhLinhBeoo

The editorial will be posted soon.

UPD3: The editorial is here.

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

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

As conqueror of mishai, even I cannot conquer how great this round will be

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

As a tester, this is a 2x tester comment combo

»
3 days ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

As a tester, I haven't tested any other rounds except this for the last 9 months

»
3 days ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

As a tester, it is rated

»
2 days ago, hide # |
 
Vote: I like it -10 Vote: I do not like it

I wonder if tourist will participate in this contest lol. If yes, then the author's name will lead to a dramatic scene.

»
38 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I wish everyone to reach the level they want.

»
28 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

love this contest as it is my first contest

»
27 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Open a small account and play Div.2,My large account is mo_mo_yu

»
24 hours ago, hide # |
 
Vote: I like it +7 Vote: I do not like it

applepi216 could you please publish the score distribution

»
21 hour(s) ago, hide # |
 
Vote: I like it +11 Vote: I do not like it

if i didnt solved till problem C then im gay ,

if i solved till D then im not lesbian anymore

if i didnt solved till F then im a femboy who loves wrusb

»
21 hour(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

hope to comeback to CM right before the ICPC National tomorrow ._.

»
19 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Honestly, it's a great contest with great problems. C, D, E all look fun, but I'm just having a small brain moment right now. Even A and B were intresting.

»
19 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

What's the Great Wall of China doing between C and D

»
18 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

C fried my brain .. aaaahhhh!!!!

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

    It was just BS on ans

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

      Brute force works aswell. If more than 2 elements exists with max value, no point reversing. if 2 such position exists, only better value that can exists will have reversal boundary at those two positions.else we can use prefix/suffix sum fixing other end to only position of max element.

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

      oh I thought it was not monotonic.. like I can't achieve all gaps possible .. so I guess we have to binary search like can I achieve smaller gap that this value .. is that what you did ??

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

C>>>>>>

»
18 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

$$$E$$$ is actually easy for me I don't know where my code was going wrong on that one testcase, some off by one error :( I could've solved it

»
18 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Did not expect to see B as an interactive problem

»
18 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

C destroyed my brain

»
18 hours ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

Great contest, thank you!

»
18 hours ago, hide # |
 
Vote: I like it +40 Vote: I do not like it

I refuse to believe D has 236 solves and E has 51 solves in div.1

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

    Hmmm, I agree that 236 and 51 is a bit high. but I really think this Div1 was more like a Div2, ABC are really standard, C surprised me with how easy it was as the trick of l/x rounded down has only sqrt(l) possibilities is really known, I found only DEF to be interesting and I think a lot of people had like 1 hour and 45 minutes to think about D which increased the number of solvers for both problems

    • »
      »
      »
      17 hours ago, hide # ^ |
       
      Vote: I like it +36 Vote: I do not like it

      ItayKarny Congratulations on achieving rank 11 in your second ever Division 1 contest!

      • »
        »
        »
        »
        16 hours ago, hide # ^ |
         
        Vote: I like it -16 Vote: I do not like it

        Thanks :)

        but this was pure luck as I got ABC intended solution fast and was manage to program with no bugs and I am still shocked that E passed I thought in contest it was n*2^25 but Claude has now proven me it's n*2^21 or something like that so I will take it :))))

        I think if I got a WA somewhere along the way I would probably not been able to fully solve E and got way worse place

    • »
      »
      »
      17 hours ago, hide # ^ |
       
      Vote: I like it +28 Vote: I do not like it

      Buddy your best placement before today on a Div. 1 is 200 and today you get top 11. And yesterday you took 12 tries to solve a div2C. People like you is exactly why there are 236 solves on D and 51 solves on E.

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

        Yes bugs are part of competitive programming???

        and when I am not in a competition I submit again for every little change cause there is no harm? and in contest I check things before

        I don't do that much CF and yes some contest are more your style and some not?

        I agree I probably don't deserve this rank and got lucky and probably will fall down in following div1 but just because the contest went bad for you doesn't mean everyone who passed you is a cheater.

        the difference between 200 and 11 is one question and better timing in programing which I just got a good contest where my codes ran with practically no bugs except in E

        you can stay grumpy about this one not going that well or just realize there is a lot of people that dont do that much CF but still compete for example me who did SWERC last year and this one, I was in the international training camp in Poland for the ICPC world finals and I am in the Israeli national team of cp

        Hope to crash you again in the next round :)

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

          ItayKarny it's ok, I believe you can get more ranks like this if you keep trying hard, and maybe get some coaching from AbdelmagedNour. He was exactly in your position few months ago..

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

            I see that he is coaching the Egypt IOI team?

            hopefully we will meet in this year IOI (if I get picked)

        • »
          »
          »
          »
          »
          16 hours ago, hide # ^ |
           
          Vote: I like it +11 Vote: I do not like it

          Don't worry, you don't have to "hope" to crash me next round. I can admit that frontier AI models are stronger at CP than me.

          • »
            »
            »
            »
            »
            »
            16 hours ago, hide # ^ |
             
            Vote: I like it -15 Vote: I do not like it

            Think whatever you need so you can sleep at night little bro

            your thought process is literally, hmm he did better than me, he is lower ranked -> must be cheating maybe try and think that some of us are grinding for the IOI and actually getting better and are not stuck on the same rank since 2024

            crazy that codeforces gives IM to someone like that, maybe if you can hold this rank I should even be a GM

          • »
            »
            »
            »
            »
            »
            16 hours ago, hide # ^ |
             
            Vote: I like it -7 Vote: I do not like it

            Just looked at your code to D, maybe if you would have written something that is humanly readable you would be able to make it pass and not be so grumpy. 2 years of CF to write code like this

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

        BTW you call cheaters on every round, I get that it's your way to get on the contribution leaderboard and it's kind of pathetic

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

Absolutely wonderful and majestic round (except for E) as contestant, I enjoyed every single problem a lot and also found an overkill sparse table solution for c :3

»
18 hours ago, hide # |
 
Vote: I like it +23 Vote: I do not like it

C < B < A

»
18 hours ago, hide # |
 
Vote: I like it +34 Vote: I do not like it

For me it was quite adamant that difficulty wise C<B<A

»
17 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

A<B<D<<<<<C

»
17 hours ago, hide # |
 
Vote: I like it +14 Vote: I do not like it

problem C :

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

    deadass spent 45 mins on a broken segment tree that does not even pass the brute force the final solution is just binary search on the result, the sunk-cost fallacy really getting my back T_T

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

    Me on every div2 (please help)

»
17 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Added one extra '=' in my code for div 2 C and cost me 40 minutes trying to debug:(

Solved D quick tho:)

»
17 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Too hard to implement for A,B,D :(

»
17 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

c binary search ?

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

    Yap,

    lets binary search over the answer, the point now that you have all the indexs i where the gap is bigger than mid which is the current value you are checking, this positions force you to split them using the range, so if there are more than 2 you cannot

    if there is 2 you must just check that range

    if there is 1, you sweep over all possible ends with prefix and suffix maxes over gaps, once when it's the beginning and once as the end

    if 0 than it's just works

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

    You can do that without binary search too, 397749402(very bad code tho)

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

      hmmm you claim that you can do the same thing only over the maximum gap in the original array?

      yap I agree very nice!

      the code doesnt look bad at all I would maybe use a lambda function but it looks fine

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

        Yeah, doing something like work(a), reverse(a), work(a) would make the code way better

»
17 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I did not realize for D that the last 2 elements in your subset were always bad for so long and did a overcomplicated dp.

»
17 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Wow, I'm so stupid that for 1C I thought $$$t \le 5 \times 10^5$$$, same constraint with $$$n$$$, where $$$O(t \sqrt l)$$$ is unacceptable, which made it take me an hour and a half to try binary search that is wrong.

Gonna drop to M or even CM :(

»
17 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

D is so easier than C,which must process binary data(I nearly already simulation on it)

»
17 hours ago, hide # |
 
Vote: I like it +61 Vote: I do not like it

1A 1B 1C are meaningless problems

»
17 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

k1r1t0 orz

»
17 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Great problems. Who did use Binary search for problem E. I love BS.

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

    Out of curiosity, how did you binary search for it?

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

      if you decide to make a[n] to x, then a[i] must be smaller than floor((l-1)/x). let alpha(u, v) be the number of operations making v is smaller than u. our task is naturally to minimize F(x) = alpha(x, a[n]) + \sum_(i=1)^(n-1)(floor((l-1)/x), a[i]). each terms of F is convex function. so we can find the optimal point x using BS, which is the first point that F(x) <= F(x + 1).

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

nice round

»
6 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

2.E is much easier than 2.D although didn't give contest but E clicks instantly that no more than 1 can be more than root(l) simply taking min of root(l),2nd largest value and bringing them down one by one (as rootl<=10**(5)) and checking updates needed using prefix sums and binary search works !!!!.