eugenechka.boyko.2_0-0's blog

By eugenechka.boyko.2_0-0, 4 days ago, translation, In English

HHSgddgd, Codeforces!!

I am thrilled to invite you to participate in Codeforces Round 1132 (Div. 2), which will take place on Nov/06/2026 17:35 (Moscow time) and probably won't contain a single $$$\text{XOR}$$$ problem. You will be given 6 problems, two of which will be divided into subtasks, and 2 hours and 15 minutes to solve them.

All problems were authored and prepared by ot_dre, d0esn, amof and me.

ALERT ALERT The round may contain interactive and communication problems. We recommend familiarizing yourself with these formats beforehand.

I would also like to express my heartfelt gratitude to everyone who made this round possible:

The scoring distribution is: $$$(500 + 500) - 1000 - (1000 + 1250) - 2000 - 2500 - 2750$$$.

Congratulations to the winners!!

Div. 1

  1. maspy

  2. k1r1t0

  3. Forested

  4. AmirAli-Asgari

  5. risujiroh

Div. 2

  1. Marionette_

  2. kolpiik

  3. Wang-

  4. TripToAzerbaijan

  5. AngleHai

First AC

A1: Timosh: 397583323

A2: sevlll777: 397583860

B: _smart_stupid_: 397587917

C1: JerrySyr: 397588504

C2: satyn: 397592029

D: Saturnalorbit: 397599309

E: Mkswll: 397617904

F: maspy: 397615261

The editorial will be published soon.

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

First time to see Problem A divided into subtasks:)

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

    And a round with both interactive and communication problem

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

      In fact we have it before in Round 1071, since its F is a communication problem and its G is an interactive one.

  • »
    »
    3 days ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it +24 Vote: I do not like it
  • »
    »
    2 days ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    what it means by problem divided into subtasks??? i am newbie:)

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

      It means the problem is intentionally split into variants of itself, each with smaller (easier) constraints than the original. This allows for partial scoring , a contestant who can't solve the full problem can still earn points by solving the easier variants. It bridges the difficulty gap and makes scoring farier.

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

what is this score dist

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

No xor? :(

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

    He said probably. So maybe he's joking. I need to prepare for my first interactive and communication tasks (which i will never solve cuz of skill issue :skull:)!

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

As a tester, ubfeiaeiuabfeiabfieauifenhliuofajs

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

    As a participant, i think that our dear tester wanted to say, that he forced to test this round, otherwise he will never see pancakes again (:sob:).

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

    maybe this is a secret massage that we need to find out what it is :D

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

As a tester, I lowkey tested two weeks after getting sent the invitation :)

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

i guess we are in NXN(No XOR November) now

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

Interesting scoring distribution:)

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

As a tester, I ❤️ interactive and communication

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

As a

VIP

tester, I'm very important.

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

Sooooo 2 xor problems?

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

This is my first time seeing A1 and A2

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

Imagine A is an interactive problem ::skull

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

As a tester,

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

    a tester is not supposed to spoil anything! Why did u spoil that!

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

    I was expecting a rickroll lol

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

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

    That is not the most spoiled spoiler I have ever seen.

    This is the one
»
3 days ago, hide # |
 
Vote: I like it -8 Vote: I do not like it

Whats an communication problem ?

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

Bro made up some friends just to set up a cf round

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

Why does clicking on problem authors' profiles in this post lead to an anime video.Or is it just me?

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

NO XOR PROBLEMS YAYYYYYYYYYYYY!

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

Hope to escape 1000 rating trap.

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

good luck to everyone :) thanks to the authors for preparing this round :D

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

What's the GIF blud :sob:

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

A1: n<= 5 A2: n<= 50

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

As a Temu tester I'm sure that I'll get my rating to 0 now(yesterday I got -76).

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

wth is A subtask bro T_T

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

how can you POSSIBLY split div2 A into subtasks?!?

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

if i didnt solved till problem C then im gay, if i didnt solved till D then im lesbian

»
3 days ago, hide # |
← Rev. 2  
Vote: I like it +3 Vote: I do not like it

Will I be surrounded by interactive problems, communication problems and XOR problems

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

As an author, why am I not on the writer list in the contests tab :(

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

Contest without XOR problem is the GOAT contest.

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

Time Changed of this Contest?? It is showing it delayed to 15Min

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

great contest! eugenechka.boyko.2_0-0 orz, but :sob could only solve A1, but appreciate the problems!

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

WHY NO XOR PROBLEMS Still contest with communication and interactive is awesome btw

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

$$$B$$$ is stupid

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

    How does it work?

    I mean, how to handle numbers that occur multiple times?

    • »
      »
      »
      2 days ago, hide # ^ |
       
      Vote: I like it +6 Vote: I do not like it

      I noticed one thing, when the array is sorted, all elements will be >= their previous average. When the array is reverse sorted, none of them will be good.

      So then like, choose the $$$k$$$ last of them in a sorted array to be the good ones, and put the first $$$n - k$$$ of them at the back.

      But this WA'd, so I reversed the first $$$n - k$$$ of them and then put them at the back and it passed.

      But after doing this you still have to iterate and check if theres exactly $$$k$$$ good ones.

      It took me too long to get this + no idea about the proof, hence I really didn't like this problem.

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

        Ah, ok.

        So, if same values are there multiple times, they make a certain number of k-values impossible. :/

        Anybody explain why is that?

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

          if value repeats multiple times repats k time and if k == n then there would be answer otherwise not .

          like basically if pick value one since all value are same the nect number we pick would be same as one we average sum right , so is values repats n times then it make sense to use them

          is what i thought.

          don't know how would it work when there is mix of multiple same values and not same values

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

          Like I think this can be a proof

          The largest k numbers shall always be greater than or equal to the average when they are being considered, no matter what. So if the (k+1)th largest value is equal to the maximum value, then there are atleast k+1 values which will be greater than average, so this is the NO case. Just checking with maximum value is enough for this because, we need atleast two distinct values in the first (k+1) largest values.

          For every other arrangement, we can consider the first k largest values in increasing order, then consider the rest of the values in decreasing order (why? because if we take the increasing order for the rest of the elements, a smaller number goes in before a larger number, creating a possibility that the average will be equal to the larger number in the future).

          This construction guarantees the k largest values are all greater than equal to average, and the rest are lesser.

          I think this code will make it clearer: 397601716

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

        Same.. it just passed.. I observed the pattern but could not proof it for a larger cohort

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

    no lol

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

NOOOOOOOOO I didnt have time to submit D ahhhhhhhhhhhhhhhhhhhhhh

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

In D; graph can be completely different from the start. how can we really put any data in it?

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

    Yeah it is really hard to find an invariant in that one

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

    I Was thinking if we can limit the operations which can be done, because k>=2 so we can not touch paths of length 3 or less... but I couldn't solve it.

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

    invariant: 2 color the nodes, 2 coloring never changes over operations. for node u>=2 if u has same color as node 1 determines u'th char in s

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

      woww, that's clever! thank you

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

      but in case of a star, we cannot determine if the string is 11...1 or 00...0.

      I hope you to help me.

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

        as far as i understand its 000...0 because nodes has different color from 1. we set node 1 as a reference in the solution cuz string is n-1 length

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

          I've just solved this tricky D. absolutely tricky problem ever.

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

        I treated 11...1 as a special case, and gave a graph containing a triangle (a cycle of length 3) for that case. This works because a cycle of odd length will persist after the operations (the length of the cycle may change, but there'll always be an odd-length cycle).

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

Nice problemset

»
2 days ago, hide # |
 
Vote: I like it +11 Vote: I do not like it

D is so peak

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

Almost solved D but was 5 minutes too slow:(

Great problems!

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

Best D div 2 and best 2-steps problem ever seen. F was so good too but I spend too much time on C so that couldn't solve F in time -_-

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

wonderful contest

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

In C1, do the n + 10 operations really check? I didn't even care about it

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

solved till C2 but I was only sure for C1 that my solution is correct, others were like based on feeling that I am correct.

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

    I was sure that ans <= 3 for diff < 25 but was brute forcing for only primes in the range [1, 30] which I only realised after the contest |-|

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

      whoa.. don't tell me it has something to do with goldbach conjecture that every even number can be written as sum of two primes

      although I did something like dp for smaller gaps, for larger gaps there should be a prime in between where we can jump

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

        I dunno about the conjecture or whatever, but just the fact that even if n grows to 1e9, the proximity of consecutive primes is ln(n) which comes out to around ~ 23, so if the diff >= 25, you can easily make a jump to the largest prime <= b, I just brute forced that the gcd of any number x and the difference between any prime number greater than x and x is = 1, so just jump to that largest prime <= b, and then the diff becomes < a, and since a is a prime, the gcd of the diff and a = 1. For diff < 25, I kinda half guessed that it's always possible in 3 moves, and brute forcing only takes 25^3, which when multiplied with the number of test cases, should be well under the TL.

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

    Same look at mine, I have no idea why it works :397655764

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

      ok, that means it is always possible to do it in 3 moves

      can you please tell me, why you used the number 100 and not some other number ?

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

        Not sure why it works, but my thinking was that there are at list 25 primes (1 to 100), and multiplying all of them would exceed 1e9, so there should be 2 or 3 prime jump (+x) I can use without any problem.

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

        I just tried it by taking only two extra primes: 397658647

        Or C2 might also have poor test cases like C1.

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

In C1, why finding the nearest prime for each number does not work ?

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

How does A2 work?

for a1 i applied n*n/4 formula making sure to make right angle

for a2 i considered n as sum of power of 2^(ai) and applying same formula but didnt work?

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

    i did the same thing for A2, but it didn't work, for A1 this was my code:

    #include <bits/stdc++.h>
    using namespace std;
    
    #define fast_io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
    #define ll long long
    #define pb push_back
    #define vi vector<int>
    #define endl '\n'
    
    int main() {
        fast_io;
        int t; cin >> t; 
        while(t--){
            int n; cin >> n;
            if(n % 2 == 0) cout << (n/2)*(n/2) << endl;
            else{
                int x = ((n/2) - 1);
                cout << x * (n - x) + 2 << endl;
            }
        }
    }
    

    Can anyone share code for A2?

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

    because you should apply each operation to exactly one point. for example; in "1, 2" (so "2, 4"), you say that making 3*3 is optimal. But you can't divide 4 to 1+3 or etc.

    But the logic is similar to A1, you should make the points as nearest as possible. So you can divide array to 2 subsets with greedy.

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

    You can't split a single move into two moves.

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

Bertrand's postulate ftw

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

hi,can someone explain why this solution doesn't work 397603019

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

nice contests thx :)

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

that was my bad contest

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

Commenting after a long time. Hope to do better next time. :)

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

For C2, I know if A and B are far enough apart, you can either jump directly from A -> B or jump to A -> (largest prime < B) -> B.

But how do we know that for the case where A and B are close, you can always do it in <= 3 moves.

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

    I did DP for smaller gaps, but didn't prove that it has to be 3 steps.

    but later ( after contest ) one idea came to me.... that if gap is even it can be written as sum of two primes ( goldbach's conjecture is true for all numbers below 1e9 ) and if it is odd we can add 1 and then gap become even.. so max 3 moves.

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

      Good point, but it's not a complete proof because even if $$$b - a = p_1 + p_2$$$ that doesn't guarantee $$$gcd(a, p_1) = 1$$$ and $$$gcd(a + p_1, p_2) = 1$$$; it's possible that $$$a = p_1 × p_2$$$ for example, or that $$$a + p_1$$$ is a multiple of $$$p_2$$$.

      • »
        »
        »
        »
        47 hours ago, hide # ^ |
        ← Rev. 2  
        Vote: I like it +3 Vote: I do not like it

        Yea I'm interested to see the actual proof for this. I didn't get it in contest, but I just guessed that you probably don't need that many.

        Also, it's kinda dumb but I didn't think finding the greatest prime <= B would work since there's like (1e4 cases) * (~100 numbers you have to check) * (sqrt(n) = ~1e4) to see if something's prime. I didn't think that would've passed but it did comfortably.

        • »
          »
          »
          »
          »
          41 hour(s) ago, hide # ^ |
           
          Vote: I like it +3 Vote: I do not like it

          there is a better check and bound

          better check

          it works in <= (t = 1e4) * (lpg — 1 = 281) * (log (A = 1e9) = 30) * 2 = 1.686e8, which is better (and works in c++) than your 1e10 bound, where lpg is largest prime gap

          lpg finder code

          397676508

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

        oh wow !!.. thanks for mentioning it .. now I am glad I did DP

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

    You can also jump A -> smallest prime that doesnt divide B -> B, and you dont need that observation for <=3 moves you can just bruteforce because they are pretty close to each other when there is no prime like that between them

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

      How do you brute force it? It looks like it can be around a 100 difference, so unless you know that the number of moves needed is <= 3, you can't just try all combinations.

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

        i tried for <=15 because it says so in task, you can just track all number from a to b and then have 2D dp dp[i][number of moves], and then one loop goes theough number of moves and then you go through all the numbers between a and b and then try to go from every less number(you check if you can get to that number in one less move becuse dp already covered that and then if you can then check if you can go to i and update dp, check my submission it will be easier to understand.

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

        You can do BFS

»
2 days ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

More guesswork than patrick jane

»
2 days ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

c2 is absolute goysloppery wtf

»
47 hours ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

d was so cool but i have skill issue so no solve

»
44 hours ago, hide # |
 
Vote: I like it +20 Vote: I do not like it

I think C1 is not a good problem because it relies on the conclusion that there's a prime between [x,2x], but it is really hard to prove rigorously. It punishes people who try to work out the problem step by step and rewards people who like guessing.

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

for problem C2, let vector a = {i such that gcd(i,a)=1 and a <= i <= 2a} vector b = {i such that gcd(i,b)=1 and b-a <= i <= a}

should size(a X b) < 10^8?

my solution's time complexity is O(a X b) and it passed

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

I was seconds away from having the first solve on A2, would've been cool

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

I wanna discuss how to solve E with someone.

I had divided the given graph into connected components. Then, I found that we can shrink the searching area into 2 or 1 components within 2*ceil(log_2(k)) queries. So, the remaining is how to find exact edge among 1- or 2-component bipartite graph using at most 33 — 2 * ceil(log_2(k)) queries. where, 33 — 2 * ceil(log_2(k)) >= 11.

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

please publish editorial before next round starts.

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

Can you publish editorial? I need to know how to solve C2 and D

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

Editorial?