SpyrosAliv's blog

By SpyrosAliv, 13 months ago, In English
Καλησπέρα, Codeforces!

I am very excited to invite you to participate in Codeforces Round 1063 (Div. 2), which will take place on 10.11.2025 18:05 (Московское время). Please note the unusual starting time (30 minutes after the standard starting time).

You will be given 5 problems and 2 hours to solve them. At least one problem will be interactive, so please make sure to read the guide for interactive problems before the contest. This round will be rated for all participants with rating below 2100. The problems were authored by me, and prepared by Proof_by_QED and me. We are also excited to announce that:

This will be the first rated round to feature a communication problem.

Make sure that you are familiar with the problem format of communication problems. Recently, Testing Round 20 (Unrated, Communication Problems) was held in order to introduce this new type of problems. Please read the blog on communcation problems and familiarize yourself with these problems. Note that it is the first time we are experimenting with communication problems in a rated round, so please keep this in mind if you choose to participate.

Additional Note: In this round, hacks will be disabled on problems A,B,C and we will have pretests=systests. Hacks will be enabled on D,E as usual.

This round would not be possible without the help of the following people:

Score distribution: $$$500 - 1000 - 1250 - (1500 - 1250) - 2750$$$.

Editorial

Winners:

Div.1+2:

Div.2:

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

| Write comment?
»
13 months ago, hide # |
 
Vote: I like it +16 Vote: I do not like it

as a tester, dont miss out on the first round with a communication problem

»
13 months ago, hide # |
 
Vote: I like it +11 Vote: I do not like it

communication

»
13 months ago, hide # |
 
Vote: I like it +28 Vote: I do not like it

as a tester, i communicated

»
13 months ago, hide # |
 
Vote: I like it +35 Vote: I do not like it

how to communicate? I do cp...

»
13 months ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

Only 5 problems? wow.

»
13 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

As a tester, I struggled with communication

»
13 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

As a tester this is a fairly fun round, actually.

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

As a tester, I communicated with __baozii__ during testing.

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

excited for the new kind of problem, hope I can communicate well !!!

btw, my guess is D1 and D2 are communication problems with different amounts of data you can communicate :D

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As a participant, I'm mostly excited about the communication problem.

I feel that coding theory now being a core part of compprog will help with the "problems are too standard now" complaint I've seen again and again; excited to see how Div.2 participants handle what will be uncharted territory for many.

»
13 months ago, hide # |
← Rev. 2  
Vote: I like it +6 Vote: I do not like it

Can you communicate with problem writers and other people for this problem then?

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

as a random guy, i feel really excited :DD

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

As a participant, I recommend participating in this round because the problems by SpyrosAliv are really cool!

»
13 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

gotta love getting destroyed by communication problems

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope I could arrive at 1700.

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Gyrosi round

»
13 months ago, hide # |
 
Vote: I like it +7 Vote: I do not like it

As a tester, I'm not sure how to communicate effectively.

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

it's interesting to try a new type of problem for codeforces!

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Disable hacks on first few problems will also make it harder for those who intend to drop rating harshly. Maybe we will never see new negative rating accounts then? XD

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope I reach expert again!!!

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I can't wait for this match.

»
13 months ago, hide # |
 
Vote: I like it -11 Vote: I do not like it

All the best to every participants,

HOPE, I reach Expert today.

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

Problem B – “Supremacy”!

cooked

»
13 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

got stuck for finding pairs of l and r in b :(

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

    but were you like prove / check that we can do in 5 steps before finding l and r

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

      nah i was also checking if we were all=ble to cover all ones in less than eq to 5 ops

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

        yeah .. ok

        I was thinking that sometimes authors play tricks in problem B ..

        so maybe there is a solution to do it in like 2-3 moves every time... but I was not able to prove anything like that

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

          I thought 4 moves would be enough, but it gave me a wrong answer on test 1. Then I realized one more operation should be added between p₁ and pₙ.

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

            awesome and congrats for +ve delta

            can you please share basic idea of what you doing in C with binary search .. I upsolved it using editorial's 2 pointer but would love to know more ideas

            like how u quickly check reachability ?

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

              Once you move down to the second row, you can’t go back up.For most problems with all pairs l<=r we can fix one endpoint — here, I fix L. For a fixed L the value of R is monotonic , if L-R is reachable then L-(R+1) is also reachable.So, I perform a binary search on R to find the minimum valid R for each L.To check if a given R is valid I run another binary search that determines how far we can go — the maximum right position from the upper grid and the maximum left position from the lower grid using this mid value.

»
13 months ago, hide # |
← Rev. 2  
Vote: I like it +1 Vote: I do not like it

11k submission ==> 3k submission we can a long way

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

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

What is WA test 6 at D1?

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

    I was also having the same issue looks like we have used more queries if (!(cnt <= max(300, (n / 2) + 2))) while (true); when I do this it gave me tle.

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

kitchenForces because I got cooked by B ....

spent too much time on B .. no more time for other problems..

good bye expert rank ...


and I would like to no thanks authors for including communication problem LMAO !!

Spoiler
»
13 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

B are just tripping man

»
13 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Ok buddy

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

How to find l and r in b ?

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

    hint: try to make the max 1's in the string that you can regardless of the input. then check the condition.

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

    solution always exists when in x ,x[1]!=1,x[n]!=1,x[pos where p[i] is n]!=1 and x[pos where p[i] is 1]!=1, as for soln find pos of 1 and n in the permutation, let it be a and b. now you can guarantee a sol'n using only these two position. think how?

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

    You can always use 5 operations to create the string s (if it is possible to create s).

    1. 1 — (index of element 1)

    2. 1 — (index of element n)

    3. n — (index of element 1)

    4. n — (index of element n)

    5. min((index of element 1), (index of element n)) — max((index of element 1), (index of element n))

    This always ensures that all the elements other than 1, n, and elements which are at corner are marked as 1.

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

      no way !!!!!!!! .. so cool.

      I started thinking in this direction but dropped it .... aaahh !!!!!

      I think authors assumed that people will be able to see this solution that is why this problem is B

»
13 months ago, hide # |
 
Vote: I like it +15 Vote: I do not like it

B — the worst problem

»
13 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

Nooooo just solved $$$B$$$ 1 min after contest ended :(

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

make the verdict better/more informative for interactive problems, you could mention Number of queries limit exceeded instead of Wrong answer on pretest X

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Downvote for B...

»
13 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

As a D2 solver, I have no idea what D1 intended is even; just skipped directly to D2

»
13 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

After almost 3 months continuous rating drop, finally I had a well-performed round. Though I can't say I have acutally improved my programming ability, but this is definitely one of the happiest moments for the past few months.

»
13 months ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

I'm not sad or angry at all, because I know that a setter puts in a lot of hard work to create a contest. Sometimes, it even takes 2–2.5 years.

»
13 months ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

The problems are completely out of order of difficulty, and the checker for Problem B was also wrong. I highly recommend this contest be unrated.

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

    Sorry for B being harder than usual

    However, checker being wrong was caught fast and affected less than 5 people.

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

      B literally shook my confidence

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

      The correlation between the ranks this round and the initial ratings is probably the lowest it's been in recent memory. It absolutely fails to reflect the participants' true skill.

      Unrated is really better, maybe?

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

      I've always loved participating in your contests but I'm extremely sorry to say that this was one of the worst contests I've ever participated in :(

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

        I'm sorry about that, I would encourage you to read the editorial. In my opinion the ideas used to solve B is nice, and the only fault really was not putting a problem between A and B. Don't hate a problem just because it was hard for you.

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

          Maybe problem B had a bit of randomness in distinguishing participants? At least judging from the standings, quite a few people solved C but not B. From the editorial, B is indeed simpler. I hold a neutral view toward such problems appearing in a difficulty-ordered contest, but it's clear that this contest had no sufficient reason to be unrated.

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

    Wangzai I love you!!!!!!!!!

»
13 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

B is much harder than C.

And E's solution is so Ad-hoc.

»
13 months ago, hide # |
 
Vote: I like it -9 Vote: I do not like it

please unrate...it is so difficult

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

this contest makes "having alt-accounts" logical

»
13 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Are problem B tests correct ?

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

    I believe so, do you have any reason to believe that it isn't?

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

      Can you tell me the approach to B. Mine was — I tried this way but it doesn't work. Like I already find the max and min in the array and then from 2<=i<=n-1 if arr[i] falls between min and max then I set a[i]=1. But it doesn't work.

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

        The editorial is posted, you can refer there for solution and example code. If your approach is correct and you still are getting wrong answer, you likely implemented something wrong.

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

          Yeah I got that But everyone seems to done the same approach but mine was to create the max 1's string possible but doesn't;t work out I just want to know what is wrong with.

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

    I think they are also not correct. I wonder how this solution passes " [thisone] "(https://codeforces.me/contest/2163/submission/348303770).

    on this test 1 10 7 8 9 10 3 4 5 6 1 2 0000000000

    in the ranges it also gives l = 1, r = 9, yet the problem said that for every i such that l < i < r, min(pl,pr) < pi <max(pl,pr). And note that in the test , 10 which is the maximum is included in the range 1 9

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

      Read the problem statement again. If x[i] = 0 then s[i] is allowed to be either 0 or 1. So if the given binary string is all 0, any set of at most 5 valid operations is correct.

»
13 months ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

348349302

It gets TLE even though it clearly shouldn’t. I wasted 20–30 minutes just because I thought it was a bug in the code, and it was actually a WA.

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

    Yep, sorry about that. You were probably reading from a closed stream because of a WA. Perhaps we should have participants read in 1 or -1 (depending on if the answer is correct) before proceeding to the next case.

»
13 months ago, hide # |
← Rev. 2  
Vote: I like it +1 Vote: I do not like it

One of the best contests in a while imo (might be biased due to solving E)

»
13 months ago, hide # |
 
Vote: I like it +27 Vote: I do not like it

Screencast with commentary

Seriously couldn't solve E in 30 minutes. Incredible problem, well done!

  • »
    »
    13 months ago, hide # ^ |
     
    Vote: I like it +25 Vote: I do not like it

    I think problem E is unsuitable to be honest, the problem statement is kind of nonsensical and just having to transmit 1 bit with some contrived conditions on what you are allowed to send, while the solution has basically nothing to do with the connectivity.

    • »
      »
      »
      13 months ago, hide # ^ |
       
      Vote: I like it +18 Vote: I do not like it

      Well, yes, I don't really like the solution. But the fact that it is possible is amazing, and I think the problem statement is beautiful. This actually feels like a different kind of problem, all my experience in cp didn't help at all. It would be frustrating in a rated contest (and it is a bit frustrating even now), but I appreciate the novelty.

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

        For me it is one of the problems which are cool because the solution is dumb (like when I first heard of linear preprocess and constant query RMQ/LCA).

»
13 months ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

for D1, I misread $$$max(300, n/2 + 2)$$$ as $$$min(300, n/2 + 2)$$$, and I actually solved it with that wrong constraint, lol.

»
13 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

B was actually awesome!

It's surprising how so many people (including me) found it hard to come up with such a simple idea during contest

»
13 months ago, hide # |
 
Vote: I like it +14 Vote: I do not like it
2163D1 - Diadrash (Easy Version) Weak D1 Testcases?

My solution ends up making about n/2 + log(n) queries in the worst case, but it still got accepted. I actually came up with this idea during the contest but spent a lot of time trying to find a better approach because I thought it might exceed the max query limit. After the system testing, I got AC with the same idea.

Submission Link
Failing Testcase (requires 5012 queries)

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

I became pupil by solving A and C : )

»
13 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

"Even though the problem statement was a bit unclear, I still really liked problem B. It actually took me over an hour to solve it, haha."

»
13 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

Thank you for the interesting contest, the tasks were really interesting!

»
13 months ago, hide # |
← Rev. 8  
Vote: I like it 0 Vote: I do not like it

Subject: Request for Review of Similarity Warning –348315939 Codeforces Round 1063 (Div. 2) Dear Codeforces Team, I recently received a warning regarding similarity between my submission and those of other participant. I would like to clarify that I wrote my solution entirely by myself. I sincerely respect the Codeforces rules and would never intentionally violate them. The B question is constructed in such a way that there is a easy few lines of code solution and comparing small codes is the same as putting a plagiarism check for printing "hello world".I can provide anything you might need to validate myself.I kindly request you to review this warning once again and consider removing it from my account. This affects my profile integrity, and I assure you that I always participate honestly and fairly. Thank you for your time, understanding, and for maintaining a fair competitive environment.

»
13 months ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

Hello. I just received a plagiarism warning for my submission [348361441] for problem 2163C. I want to clarify that this is my own original code, written entirely by myself. I have never shared my code with anyone, and I don’t even know the other user mentioned (Ash_26). I am from Iran, 16 years old, and a student, while that user is from India and a university student, so there is absolutely no possible connection between us. I always participate fairly and independently. I even wrote a blog post about anti-cheating on Codeforces because I truly care about honesty in competitions. Please check again — this is a false positive. It’s really disappointing to receive a strike after working hard to reach Pupil. I kindly ask you to recheck the detection results manually. Thank you very much for your time and understanding.

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

    I am his teacher. He was in the school computer lab during the contest and I personally confirm that he wrote all his code himself without copying from any source. SpyrosAliv

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

orz

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

Wow communication problem i like it >_<

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

Tks