Mindeveloped's blog

By Mindeveloped, history, 7 months ago, In English

Hello, Codeforces!

abc864197532 and I are pleased to invite you to Codeforces Round 1086 (Div. 2) on Mar/14/2026 17:35 (Moscow time)!

You will be given $$$5$$$ problems to solve in $$$2$$$ hours. Some of these problems are divided into subtasks. The scoring distribution is $$$500-1000-1250-(1250+1250)-3000$$$.

The problems of this round were prepared by tybbs, Mini_PEKKA and me. We would like to thank the following people for making this round possible.

Good luck & Have fun!

UPD: The editorial has been published. Congratulations to the winners!

Div .1 and Div. 2:

  1. ksun48
  2. Nachia
  3. A_G
  4. YuukiS
  5. ttamx
  6. BurnedChicken
  7. StarSilk
  8. 244mhq
  9. kotatsugame
  10. 415411

Div. 2 Only:

  1. debangsu_
  2. masy2011
  3. vlp
  4. Conqueror5
  5. lzh999
  6. alex.krivoschecov
  7. vld.ktk
  8. ExtraNumber
  9. XorGhost
  10. 11Gaurav1
  • Vote: I like it
  • +278
  • Vote: I do not like it

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

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

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

I hope to become pupil after this round. Let it be cheater free.

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

    Have you practiced problem solving on other platforms before because from what I see you solved 2200 rated question in your first contest, that's kind of fishy

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

Haven't seen a div.2 of 5 problems.

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

5 problems in 2 hours, I have bad feeling, but I will participate anyway :) I wish I could do well in this format :pray:

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

Mindeveloped round ?? the undisputed best shit poster in the business really big fan of you, please reply to me

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

    As an author, I made some of the problems.

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

      Hi brother

      I want you to ask kindly about the codeforces problems

      I have been doing in codeforces and did 1000+ prblms and you just did ~600 but how are you solving more problems in div2 or div1 like i am curious to know is there anything i didnt know about in the competitive community or something else you have just found because i have came here after seeing your account Mindeveloped .....

      Hope you will reply to me as it will helps me alot

      thank you

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

        First of all, it's not the quantity it's the quality.

        If I solve 10 problems whose rank is 2500+ it's incomparable to even 1000 question of rank 1000.

        And another big thing is reading new stuff, you cannot invent nor find everything yourself (at least not in a short time period). using blogs of other people, sites like USACO and reading solutions to problem you couldn't solve is the big thing.

        You learn from failing and reading a solution prepared by someone smarter, all in the hopes you can become the smarter one in the end.

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

          thank you ItayKarny i want to know also i am able to solve some 1800 problems but not some 1600 rated. is it knowledge gap or something i am doing wrong ?

          Really thank you for your reply to my previous message

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

            Okay that makes sense.

            There are different subjects in competitive programming, for instance you might be good in dp but less good in graph, your overall rating is like their average with how often this things occur.

            you might be 1800 rated in dp but only 1200 in graphs. plus notice that solving an 1800 problem is today not really means that you are 1800, I think today it's more like if you are rated x you should solve x + 200/300

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

Mini_PEKKA Pancakes...

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

As a tester, I think McDonald's new burger in Mainland China is just so-so.

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

    I don't know if it's the same one, but the new one here in America is also really disappointing. It's pretty much a normal burger, nothing really new about it, but it costs $$$12$$$ dollars. $$$12$$$ dollars for a burger. I don't know who they think they are selling to.

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

      I would easily pick Chick-fil-A over McDonald’s in the US. No clue why McDonald’s in China tastes decent and only costs like 4 or 5 dollars, while in the US it tastes way worse and is somehow around 10 dollars if not picking the cheapest meal plan.

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

        In Mainland China, the cheapest McDonald’s burger plus a pineapple pie is sold as a “1+1” combo, and it only costs about 2 USD. The burger is admittedly pretty small, but for people with a smaller appetite, it’s enough. Considering the income gap between ordinary people in China and the US, that price feels like a pretty normal cost for one meal to me—though to be fair, the 1+1 combo isn’t enough to fill me up.

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

          $$$2$$$ dollars for that would actually not be bad here. I would prefer two actual items instead of one of the pies they give out (which are good but small), but I am assuming that the price there is much lower than it would be here since China is poor. All of their prices have just gone up a crazy amount in the past $$$10$$$ years or so, like outpacing inflation by a lot. I remember when they used to have the dollar menu, but now a cheeseburger will run you like $$$3$$$ dollars. And that's just for the cheeseburgers. Bigger items like the chicken sandwiches are approaching $$$6$$$ dollars. Like it shouldn't be normal to go to McDonalds with a group of people and spend $$$50$$$ dollars. It's really a disgrace what has happened.

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

      Because nowadays people in US want to eat only burgers, so they probably put up the price, to remind people that we should not forget about other foods as well, like milk, eggs, fruits and other healthy things there exist. Life don't have to be if only burgers.

»
6 months ago, hide # |
 
Vote: I like it -37 Vote: I do not like it

Mindeveloped

idk, I don't know who to tag here, but I need to ask a question. As you can see I have not participated in any contests, so I want to ask: based on my profile, should this contest be easy or hard? Also can anyone tell me how to get ratings? Like I'm unrated, and I need a rating, and hope I can solve all the problems fast in this contest.

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

    Why does your username say "cheater"?

    To answer your question: Perceived hardness depend on your problem solving ability and knowledge, and familiarity with these types of problems, regardless if you know the basic syntax of atleast one language you should be able to solve the first problem. You gain rating by participating in live contests.

    Don't cheat, if you are confused on what is cheating and what is not, here's the rules for AI

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

Can someone advice me on how to get rid of this newbie i am kinda stuck here in this zone and it's getting frustrating after increasing the efforts in recent weeks.Sometime i am able to solve div 2 A and B and sometime not by making those complex myself.

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

I think the contest will be difficult,because it only has 5 problems in 2 hours.

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

Thanks to the authors and testers for the contest! >_<

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

looking forward for it

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

Score distribution?

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

As a tester, I am a fan of cdqz.

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

I hope I cross 1700 : )

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

Hope to become expert

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

Hope to become specialist, gl

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

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

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

Giving a contest after 3 weeks,hope for the best

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

As an author, I wish all participants good luck.

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

Btw today is Pi Day

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

Hope I can become Master in this round

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

It's gonna be a Speedforces contest isn't it :)

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

i hope to be specialist in this round

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

Looking forward to being goombah stompped yet again ;-;

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

Happy Pi Day!

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

As a tester, wish all participants have fun and good luck!

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

As a participant, I hope I can solve at least one problem in this contest. Wish me luck, guys!

edit: i'm cooked

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

Can someone hold other races start at different times?Different time zones have big differences,so I need to take part in this race at midnight.

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

I hope I will become speacialist this time ❤

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

Hope to reach 1500 in this round

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

As a Clash Royale player, I am sure that Bob played hog cycle 2.6 in the 4th test

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

imo this was a bit shy of a div2. D2 and E were good obv but yea

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

How to find for the "real" edges from the tree from the reachability DAG faster than the $$$O(n ^ 3)$$$ Floyd Warshall approach?

I came up with some dp-like ideas of longest paths in a DAG but nothing which works for chains containing nodes with indegree > 1 and outdegree > 1.

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

    I tried to use bitset and it should work in $$$O(\frac{n^3}{\omega})$$$, but I made a mistake and wrote 500 and I got RE, so idk if it would be fast enough

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

    Sort vertices by the number of achievable vertices starting from it in increasing order, let this sorted array be V. Maintain a DSU if added edges were bidirectional. Iterate over vertex v in V from left to right, iterate over vertex u in V from right to left. If u is achievable from v and v and u are in different components in DSU add an edge v->u.

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

    Here's what I did:

    Build a DAG which contains edges $$$i \rightarrow j$$$ for all $$$r_{i, j} = 1$$$. Let $$$t$$$ be the topologically sorted list of nodes w.r.t. this DAG.

    Then, we do the following:

    edges = {}
    for i from n - 1 to 0:
        u = t[i]
        outgoing_nodes = {}
        for j from i + 1 to n - 1:
            v = t[j]
            if r[u][v]:         # u must be able to reach v if there's an edge from u to v
                good = true
                for w in outgoing_nodes:
                    if r[w][v]:     # we must not have u -> w -> v
                        good = false
                if good:
                    outgoing_nodes.push_back(v)
        for v in outgoing_nodes:
            add {u, v} to edges
    

    Now, one might naively expect this to run in cubic time because of the inner loop, but we can show that it only takes quadratic time. Why? Because if there exists a valid tree, then the sum of sizes of outgoing_nodes across all $$$u$$$ must equal $$$n - 1$$$.

    When no valid tree exists, we can simply break out of the outer loop if the size of the edge set ever exceeds $$$n - 1$$$, and we preserve quadratic time complexity.

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

Really good round. Good, balanced, nice problems. Thanks for the round Mindeveloped abc864197532 and all testers.

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

I think D2 need a bit of constant optimization. But all in all, it is a great contest.

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

Fun C for me :)

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

For D2,I got TLE on 18 and mad,but I found master wabca got TLE on 25 before accepted :(

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

worst c ever

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

For C this the approach which I thought of : We obv have to take the last element, and if we skip one then we only affect the scores resulting from the choices after that

Initially I take the total points by taking all the choices. Then I iterate from the second last element and check if by not taking the current element the total score afterwards increases or not, considering the score from the earlier choices is not affected at this point.

I am storing the cumulative stamina and pref sum scores initially while taking all choices

I consider the updated score by multiplying the points ahead with the (cur cumulative stamina) / (prev idx cumulative) stamina , as it will be a common factor for all the taken choices ahead. This value should be equal to 1 / (1 — p[i] / 100)

Don't understand where I'm going wrong : https://codeforces.me/contest/2208/submission/366691023

»
6 months ago, hide # |
 
Vote: I like it -14 Vote: I do not like it

I didn't like the contest, expected better from Mindeveloped

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

The problem D2 is interesting, but the time limit is so tight that even correct O(n²) solutions get TLE due to constant factors. It would be better if the constraints allowed reasonably implemented solutions to pass.

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

    Sorry about the inconvenience caused, but actually the stardard solution is pretty fast and it was difficult to not let O(n^3/w) pass.

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

anyone else got WA in C due to std::fixed or is it just me ;_;?

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

what was the $$$O(n^3)$$$ solution for problem $$$D1$$$?

My solution for D2
  • »
    »
    6 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    I created graph from input matrix, and iterataded in the topological order, then for each node I just naively tried to delete each incoming edge to it

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

    Enumerate $$$a,b,mid$$$, and if $$$a \rightarrow b$$$ is available but $$$b \rightarrow a$$$ isn't, and there doesn't exist any $$$mid$$$ which $$$a \rightarrow mid \rightarrow b$$$ is available, then there is a edge from $$$a$$$ to $$$b$$$. Finally, check whether the graph is a tree.

»
6 months ago, hide # |
 
Vote: I like it -59 Vote: I do not like it

ez ak

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

where the editorial??

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

hey guys I submitted my solution for A and it initially showed pretests passed, but later when I checked my submissions the verdict had changed to Skipped. Because of that I had to resubmit the same code after like 20 mins from the first submission..... does anybody know what i should do about it?

Submission ID:https://codeforces.me/contest/2208/submission/366640037

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

Today my solution for A was stuck in queue for 45 mins. This is happening to me 2nd time in a live contest. Many people who submitted multiple solutions after me got judged, but mine was left out. I request the admins to look into this issue. Also I request people who faced a similar issue to comment below too.

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

Did anyone solve B without brute force?

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

    I solved it with priority_queue and queue

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

    I did it in o(n log n), just calculated cost for a single round trip, and answer will be (m/cost).

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

    I did, first remove the minimum costs until the win-condition becomes from the first $$$k$$$ cards, then add the win-condition card, and remove these costs from $$$m$$$ (if $$$m$$$ becomes less than 0, then the answer is 0)

    then, the game will repeat the same as long as the summation of costs doesn't exceed $$$m$$$, take the minimum costs until win-condition card (now in the back) becomes from the first $$$k$$$ cards, add the cost of the win-condition card to this, the answer will be $$$1 + \lfloor \dfrac{m}{sum} \rfloor$$$ (sum here is the sum of that will be repeated each time)

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

    I solved it by taking $$$(p-k)$$$ and $$$(n-k)$$$ minimum elements which requires just two sorts.

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

Problem A is way too problematic! I stuck on the wrong threshold of (n-1)^2+1 for 45 minutes!

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

Please Please do a small check on D1, so many cheaters who are reading the problem and coding 200 lines of code with comments in 7 minutes tybbs Mini_PEKKA Mindeveloped

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

Pi Day spent well

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

D2 is hard

»
6 months ago, hide # |
 
Vote: I like it -15 Vote: I do not like it

Serious question: Will this contest be unrated? Today's problem B has already appeared before according to this blog: https://codeforces.me/blog/entry/152061.

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

    unlikely, it wasn't intentional and there's precedent for the rounds not being unrated when something like this happens.

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

Where is editorial?

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

This was the most tense contest i had ever taken part in. I submitted D1 with 50s remaining and it passed system testing only after the contest ended.

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

I think problem D2 is missing some test cases.

My submission (366696596) passed, but it takes $$$\mathcal{O}(n^3)$$$ time on inputs that consist of a small number of layers (at least 3) with a large number of vertices in each layer, such that all vertices on a lower layer are reachable from each higher layer.

An example input can be generated with the following Python script:

print(1)
N = 8000
X = N // 3
print(N)
for i in range(N):
    print(''.join("01"[i == j or i//X < j//X] for j in range(N)))

It's easy to fix (366730442) but it feels like it should have been caught by the system tests.

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

Is question C a standard problem?

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

My seemingly $$$O(n$$$$$$3$$$$$$)$$$ Solution works for D2. Idk why. Can it be hacked?

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

    I don't think the code is $$$O(n^3)$$$.

    I'm assuming that you are thinking the code has a cubic complexity in these line of codes:

        for (auto i : ord) {
            vector<char> forbid(n);
            int cc = 1;
            for (auto j : ord) {
                if (i == j || forbid[j] || a[j][i] == '0') continue;
                cc += indeg[j];
                for (int k : ing[j]) {
                    forbid[k] = true;
                }
                ans.emplace_back(j, i);
            }
            debug(cc, indeg[i], ans);
            if (cc != indeg[i]) {
                cout << "No\n";
                return;
            }
        }
    

    In the code, we have $$$cc = 1$$$ and $$$cc = cc + indeg[j]$$$ for each loop $$$i$$$. Due to that, after each $$$i$$$ runs successfully, we have $$$indeg[i] = 1 + indeg[j]$$$ for every $$$j$$$ that was chosen by the order. We also have the number of elements in $$$ing[j]$$$ equal to $$$indeg[j]$$$. Since $$$indeg[i] \le n - 1$$$, that makes the complexity of each loop $$$i$$$ linear. To sum up, the complexity is just $$$O(n^2)$$$.

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

I didn't solve D1((((((((((((((((((

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

nice round

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

Mindeveloped Editorial link is not present in the post.

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

My friend qwq_Lsy found his solution for D1 and D2 Wa on protest 2. I have communicated with him for a long time and have no idea on why he was wrong. Can somebody help me? Thanks.

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

For the first time in my life I see that div.2 has 5 problems

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

I think I need more practice....

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

I received the plagiarism warning. I unintentionally shared my code with a friend during the contest. Now, I realize, I violate the contest rules. This mistake i made during my contest, and it won’t happen again.

I apologies for this and will make sure to follow the contest rules strictly in the future.

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

I unintentionally used a code of my friend and it was too late for me to undo it. Which I understand is a big mistake of mine. And I am gonna make sure that I don’t do something like that in the future.

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

Dear Codeforces team, for the contest 1086(div 2) I got flagged for matching solutions to D and E with a single person I'd like to clarify that the other account is me with a different gmail.. I am sorry for this major overlook on my side

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

[deleted]

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

deleted

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

why my solution to D2 with O(n^2) got TLE on test 23? https://codeforces.me/contest/2208/submission/371466729