Блог пользователя Mindeveloped

Автор Mindeveloped, история, 7 месяцев назад, По-английски

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
  • Проголосовать: нравится
  • +278
  • Проголосовать: не нравится

»
7 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится -6 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится -13 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +26 Проголосовать: не нравится

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

  • »
    »
    6 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится +18 Проголосовать: не нравится

    As an author, I made some of the problems.

    • »
      »
      »
      6 месяцев назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      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 месяцев назад, скрыть # ^ |
         
        Проголосовать: нравится +6 Проголосовать: не нравится

        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 месяцев назад, скрыть # ^ |
           
          Проголосовать: нравится 0 Проголосовать: не нравится

          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 месяцев назад, скрыть # ^ |
             
            Проголосовать: нравится -6 Проголосовать: не нравится

            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 месяцев назад, скрыть # |
 
Проголосовать: нравится +24 Проголосовать: не нравится

Mini_PEKKA Pancakes...

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

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

  • »
    »
    6 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится +18 Проголосовать: не нравится

    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 месяцев назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      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 месяцев назад, скрыть # ^ |
         
        Проголосовать: нравится 0 Проголосовать: не нравится

        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 месяцев назад, скрыть # ^ |
           
          Проголосовать: нравится 0 Проголосовать: не нравится

          $$$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 месяцев назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      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 месяцев назад, скрыть # |
 
Проголосовать: нравится -37 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

looking forward for it

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Score distribution?

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

As a tester, I am a fan of cdqz.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I hope I cross 1700 : )

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hope to become expert

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Hope to become specialist, gl

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Giving a contest after 3 weeks,hope for the best

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

As an author, I wish all participants good luck.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

Btw today is Pi Day

»
6 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

Hope I can become Master in this round

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

i hope to be specialist in this round

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Looking forward to being goombah stompped yet again ;-;

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Happy Pi Day!

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

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

edit: i'm cooked

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

I hope I will become speacialist this time ❤

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Hope to reach 1500 in this round

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

D2 и E, когда ты на них потратил по 45 минут

»
6 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    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 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    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 месяцев назад, скрыть # ^ |
    ← Rev. 2  
    Проголосовать: нравится +17 Проголосовать: не нравится

    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 месяцев назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Fun C for me :)

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

worst c ever

»
6 месяцев назад, скрыть # |
← Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится -14 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +26 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

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

My solution for D2
»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится -59 Проголосовать: не нравится

ez ak

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

where the editorial??

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Did anyone solve B without brute force?

  • »
    »
    6 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    I solved it with priority_queue and queue

  • »
    »
    6 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится +7 Проголосовать: не нравится

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

  • »
    »
    6 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится +6 Проголосовать: не нравится

    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 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
← Rev. 4  
Проголосовать: нравится +3 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Pi Day spent well

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

D2 is hard

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится -15 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Where is editorial?

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Is question C a standard problem?

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

  • »
    »
    6 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится +3 Проголосовать: не нравится

    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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

nice round

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Mindeveloped Editorial link is not present in the post.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 месяцев назад, скрыть # |
← Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

I think I need more practice....

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

[deleted]

»
6 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится -12 Проголосовать: не нравится

deleted

»
5 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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