BledDest's blog

By BledDest, 2 weeks ago, translation, In English

Neapolis University Pafos

Hello Codeforces!

The series of Educational Rounds continues thanks to the support of Neapolis University Pafos.

Educational Codeforces Round 196 (Rated for Div. 2) will start on Nov/04/2026 17:35 (Moscow time).

This round will be rated for the participants with rating lower than 2100. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest, you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally.

You will be given 7 problems and 2 hours to solve them. I hope everyone participating finds interesting problems for them to solve.

I would like to express my gratitude to MikeMirzayanov for creating Codeforces and Polygon — without these two platforms, Educational Rounds would be impossible.

Also, big shoutout to the round testers: ashmelev, shnirelman, awoo, FelixArg. Thank you for your feedback!

Our friends at Neapolis University Pafos have message for you:

Computer Science and AI BSc program at Neapolis University Pafos invites high school students to the Youth Coding Challenge on November 29, 2026, the entrance contest for the Competitive Programming track at ACTS 2027.1.

As one of the camp’s organizing partners, we look forward to welcoming you to Paphos, Cyprus, on March 15–25, 2027, for lectures, training contests, and problem discussions with experts including Pavel Mavrin and Niyaz Nigmatullin.

Selection is based on contest results and previous achievements.

Learn more and register by November 27.

See you on the round! Good luck during the contest!

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

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

What topics are generally asked in educational rounds

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

is problem rating distribution for educational rounds not announced beforehand?

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

Update: the contest will contain 7 problems.

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

Looking for advice

would you participate? from one hand I only do codeforces to practice from the other hand registering for a div2 when I am 2085 is a guaranteed to go down especially when there is a div1 in 3 days where going to 2100+ is practically guaranteed

Just that with all the cheaters and with the fact this is only 2 hours and not IOI — ICPC times I am leaning a bit toward unranked registration but it's kind of cowardly. what do you think?

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

    i cannot offer any advice but i'm curious why anyone would be guaranteed to lose points in a div2 but win points in div1.

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

    Don't try to play the rating. Your goal should be to get better at cp, not to get a bigger number on your profile. Read this: https://en.wikipedia.org/wiki/Goodhart's_law .

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

      is there a hyperlink in Read this??

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

      Yeah you are right, it's just to get better for the IOI + SWERC and I don't have any problem going down in rating in a Div1 it's just feels wrong to do a div2 when I am like 20th in the ranked list because there are cheaters and it would suck to go down a lot of points for that.

      but I think from the bigger picture it's really does not matter and you are right

      I couldnt open read this btw can you send new link?

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

      Well what can I say, I got what I deserved

      would have been place 40 if I did ranked and got +70, I am dying laughing :)

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

Noooo why 10 min delay

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

Why it is delayed?

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

Delayforces

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

Why delayed?

Don't waste my time to sleep

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

Thank you so much for the delay

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

Delay no more

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

why delay 10 minutes ^o^

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

yoo I was doomscrolling and forgot to get into the contest, W delay

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

Honestly, it was a pretty cooked rating distribution:

A: 900, B: 1000, C: 1300, D: 2000.

A == B < C <<<<< D, E, F, G.

Or did I miss some easy observation that makes the trivial solution to D not O(n^3) simulation.

Edit: For me, C felt easier because it was just greedy.

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

    I genuinely found D so much easier than C but then again I hate any bitwise problems

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

      LOL that's what I think about and seriously, C and D should be swapped, but both are not really a hard problem. Just need some observation.

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

      I don't know, the observation for D seemed to be quite difficult compared to C which was just greedy.

      You cannot be telling me that binary lifting and lca to count gray vertices is easier.

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

        Math student new to coding so it clicked better in my mind, I genuinely just need to work on bitwise.

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

    I think F<G<<<C<<<<E

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

    You can always get n-1 black vertices with k=n+1: 1 with n, 2 with n-1 and so on. If n is even, this is all vertices.

    If n is odd, since we can always get n-1 black vertices, we are always going to be pairing up n-1 vertices with each other, which means the only choices of k that we need to care about are k=n+1 (leaving the middle number unpaired), k=n+2 (leaving 1 unpaired) and k=n (leaving n unpaired). Then for each of these cases just check if the unpaired node would be coloured gray.

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

    Maybe stop larping

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

nice problems, but too tight TL

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

I can't be the only one who just assumed that $$$\sum{n} \leq 5000$$$ in E, and spent half an hour trying to optimise my $$$O(t \cdot 5000^2)$$$ solution T_T

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

    ?

    the solution is in O(5000^2 + sum of n over tescases)

    see my submission you can export all the 5000*5000 out to global

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

      read the comment again and apologise when you realise the mistakes in your comprehension

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

        You are right, I knew somewhat ditching all the English lessons in school would hit me :)

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

5 seconds away from solving G ;_;

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

This was a competition testing how fast you can code

I think I spent the most time thinking on C :)

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

$$$C$$$ was harder than everything else.

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

C took quite a while for me to debug, but I got it!

Now I'm thinking about D

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

    If you haven't found the answer, a hint here

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

I don't know whether I'm stupid or not, but I genuinely believe that C is much, much harder than D and E. Yet somehow, C got significantly more ACs. I'm honestly very confused.

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

    because it's C, most people read in order and never jump

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

    for C, is it the right idea to count 1s at each bitwise place and then check which places will be 1/0 based on parity of the count (odd = 1, even = 0)

    and then greedily compare it with 2*m and then for every bitwise place try to construct it?

    I just couldn't figure out how to implement the last part

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

      You have the right idea on counting parity.

      To implement the last part, if the parity isn't correct (even == 0) then you can just decide to NOT shift a power of 2 (since that has only 1 bit set). and keep doing this from largest bit to smallest bit

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

      Here is my solution, which took me an hour of thinking and brute-forcing to arrive at this observation. .-.

      By doubling the i-th element, its value becomes 2i, which changes k to k XOR (i XOR 2i).

      Now, we can observe that i XOR 2*i consists of exactly two set bits.

      For convenience, we can choose elements of the form 2^k, since doubling such an element simply shifts its set bit one position to the left, resulting in two adjacent set bits in the XOR.

      With this observation, we can process the bits from the highest to the lowest and use the operation described above to construct the desired k.

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

      you can look at my solution, I implemented the same approach but with 2*or (111..110) instead of 2^m-1 (1111..1). It was a pain to work out but it works because you move from highest bit to lowest bit and recursively choose only one number from each (10000.. to 1111..) range with top bit set to 1, and then double it, so now it won't impact higher bits we have already traversed. here

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

    I just iterated in reverse and kept a track of xorsum if I xor it with i or with 2*i and kept whichever resulted in a greater xorsum I'm kind of able to prove it but too lazy to find out if the proof's correct

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

$$$0$$$ IQ solution for problem C: you can just toggle a random number until you get a big enough xor.

See 397353027

Unless someone can hack it :D

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

My solutions for A through D:

A:

  • If all numbers are positive, delete all except 0 and 1. Same strategy for negative.
  • If the numbers span across 0, then we can cancel 2 numbers with the same absolute, which leaves us with only positive or only negative, which we then refer to the above strategy.

B:

  • The final array must start with smallest value X, and the rest can be multiples of X. This guarantees that any 2 indices offset by X have the same binary string value.

C:

  • We want the final XOR to have all bits be 1 (except the smallest bit doesn't matter)
  • By default assume we multiply everything by 2
  • ^ if we do the above and there are any XOR bits set to 0, then find the corresponding power of 2 (which has only 1 bit set) and DON’T multiply that by 2
  • ^ iterate from largest bit to smallest bit

D:

  • If n is even, then the answer is just n (because every vertex will be black)
  • If n is odd, then we should test out n, n+1, n+2, since these will make all nodes black EXCEPT 1 node. We just need to check if that 1 node is gray. We do this by checking each edge on that 1 node. Collect the vertices reachable by that single edge. If that set contains the pair (k — i, i) then it won't be colored grey. Otherwise, it will.
»
13 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

D was much easier than C. Not my day tho :(

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

D is really just https://cses.fi/problemset/task/1136. really fun round tho

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

    BledDest is always goated

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

    That CSES problem is more generic; you can solve problem D with that technique, but problem D also allows a simpler ad hoc solution that uses a fairly straightforward O(n) algorithm.

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

How do I know if I am ranked or unranked?

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

I am currently finishing the editorial, it will be posted in about 2-3 hours. Sorry for the delay.

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

The number of solutions was way higher than the difficulty of the problems. Honestly, this is really disappointing.

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

Am I the only feeling that time constraint on D is too low ?

I was lacking time so I went straight to recursion (in python), and I got TLE (even after using bootstrap)

I know recursion is slow in python, but see, I increased the time constraint by moving it to a private contest, and the runtime was 2.8s.

Please tell me if I should ask for rejudging :)

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

What is the intended complexity for problem G?

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

Is C always solvable by doubling only 1 or 2 numbers? I just doubled N and if the xor wasn't high enough, I iterated from 1 to N-1 and tried doubling one of those.

Seems like that worked?

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

    It's true

    Spoiler
    • »
      »
      »
      12 days ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it
      O(1) implementation
»
13 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

To me C is more challenging than D and E. My greedy didn't use exponents of 2 but passed the data,welcome hacking

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

Wait what?

For problem G, the $$$O(n2^n + qn\log t)$$$ solution works out to only about 2e8 operations, yet with a 7-second time limit, it got TLE!?

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

Why so many people (including me) got FST on G? Is the pretest too weak?

I think 7s is enough so I used O(n2^n+qn(logt+n)) instead of O(qn) which I think is slightly hard to implement...QAQ

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

Why didnt my rating increase?

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

Dear Codeforces Team,

I received a similarity notification regarding my submission 397390335 for problem 2283F. I would like to provide some context regarding my solution and implementation.

Regarding my approach:

My solution uses the observation that, due to the interval structure of the DAG, an edge is redundant if an alternative path of length two exists between the same vertices.

I used the smallest outgoing neighbor of each vertex to identify necessary edges. I then used Successor DSU to calculate these values and an offline Fenwick tree approach to count the necessary edges efficiently. Regarding the code similarity:

I have my own Fenwick tree and DSU templates, which I have used in previous Codeforces submissions. These are standard competitive programming techniques, and I can provide links to my earlier submissions as evidence.

I also examined some of the other submissions mentioned in the notification. Although the overall algorithmic approach is the same, I noticed differences in implementation details, variable names, and the organization of the code.

I would appreciate it if the team could review my submission and consider the context, including my earlier submissions containing my DSU and Fenwick tree templates.

Thank you for your time and consideration.

Regards, Aziz Ahmed Codeforces: azizrocky1951

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

    Dear Codeforces Moderators,

    I would like to clarify the situation regarding the similarity detected between my submissions.

    I accidentally submitted the same solution from my secondary account after forgetting to log out of it. There was no intention to gain an unfair advantage or violate contest rules.

    I understand that this still constitutes a violation, take full responsibility for my mistake, and sincerely apologize for the oversight.

    I assure you that this will not happen again. I kindly request you to consider the circumstances and review the penalty imposed on my account.

    Thank you for your understanding.

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

    Dear Codeforces Team,

    I again received a similarity notification regarding my submission 397371896 for problem 2283D. I would like to provide some context regarding my solution and implementation.

    I dont even know them , and regarding the question it was a simple dfs for some cases , and the dfs template i used iterative using stack and they also used the same stack , but the implementation and the choice of variables is different so kindly check before sending warning.

    I would appreciate it if the team could review my submission and consider the context,

    Thank you for your time and consideration.

    Regards, Aziz Ahmed Codeforces: azizrocky1951

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

I recently received a similarity warning regarding my submission 397391178 for problem 2283D in Educational Codeforces Round 196. I would like to clarify that I independently developed and wrote this solution. I used VS Code on my local machine throughout the contest and did not copy another participant's implementation or collaborate with anyone on the problem. My contest submissions were made progressively: I submitted problem A after approximately 23 minutes, problem B after approximately 30 minutes, and problem D after approximately one hour. This is the first time I have received such a warning. I was genuinely surprised to see it, as I have participated in many contests and take competitive programming rules seriously. I understand the importance of maintaining fair competition on Codeforces. However, since I believe this similarity occurred independently, I respectfully request a manual review of the flagged submission and my contest status. I am happy to explain my approach and provide any available evidence of my development process. Thank you for your time and consideration.

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

Dear Codeforces Team,

I am writing to respectfully appeal the plagiarism detection concerning my submission 397371872 for Problem 2283D in Educational Codeforces Round 196.

This is not a complex problem and my solution is based on the following considertaions: First, I found that when n is even, the answer is n+1. Otherwise, I only need to check n, n+1, and n+2.

For each candidate k, I remove a special vertex x and use DFS to label the connected components.

Then, I check whether there are two vertices i and j such that i+j=k and they belong to different components.

If such a pair exists, k is a valid answer. I output the first valid k. I respectfully request a manual review of both submissions and a reconsideration of my contest disqualification.

I am willing to explain my algorithm, walk through my implementation in detail, and provide any available evidence supporting the independent development of my solution.

Thank you for your time and consideration.

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

Dear Codeforces Administration and Anti-cheat Team,

I am writing to respectfully appeal the decision regarding my submissions in the recent Educational Codeforces Round 196 (Rated for Div. 2). My submissions were recently marked as skipped due to a "rules violation."

I want to state clearly and firmly that I competed honestly and strictly adhered to all Codeforces rules. I did not copy code from any other participant, share my solutions, or use any unauthorized tools or AI assistants during the contest. All the solutions I submitted were entirely written by myself based on my own logic and problem-solving process.

Since the system notification did not specify the exact cause or provide any matching details regarding source code duplication, I kindly ask you to review my case and my code manually. I believe this might be a false positive or a misunderstanding by the automated checking system.

Thank you very much for your time, patience, and dedication to keeping the platform fair. I look forward to your clarification.

Best regards,

Dannial

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

Hi Codeforces team, I have received a notification on my submission 397389211 for problem 2283E in this contest. The flag is a mistake. My solution splits the string into maximal runs and employs dp to counts splits in the block lengths of size 2 or 3, and counts partitions of the remaining 0s and 1s.

Thankyou.

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

Hello codeforces Admin

My submissions in Contest 2283(educational round 196 division 2) were Skipped because of a rules violation.

I would like to request a manual review of my submissions. I solved the problems independently and did not intentionally copy or share solutions with anyone.

Could you please clarify which submission triggered the violation and what caused it? If this was a false positive, I kindly request you to reconsider the decision.

Thank you for your time.

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

    Dear Codeforces Moderators,

    I would like to clarify the situation regarding the similarity detected between my submissions.

    I accidentally submitted the same solution from my secondary account after forgetting to log out of it. There was no intention to gain an unfair advantage or violate contest rules.

    I understand that this still constitutes a violation, take full responsibility for my mistake, and sincerely apologize for the oversight.

    I assure you that this will not happen again. I kindly request you to consider the circumstances and review the penalty imposed on my account.

    Thank you for your understanding.