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

Автор crimsonred, 3 года назад, По-английски

Hello, Codeforces!

Cybros, the competitive programming club of LNMIIT Jaipur, is happy to invite you to participate in Codeforces Round 840 (Div. 2) and Enigma 2022 - Cybros LNMIIT which will be held on Dec/19/2022 17:35 (Moscow time).

You will be given 6 problems and 2 hours to solve them. The round will be rated for participants with rating strictly less than 2100. Division 1 participants can also participate unofficially in the round.

The problems were prepared by me, DreadArceus, ...nvm, warks, .utk., and og_. We would like to thank:

Good luck and have fun!

UPD1: Score distribution is 500 — 1000 — 1500 — 2000 — 2000 — 3000

UPD2: Congratulations to the winners!
Overall:
1. tourist
2. Um_nik
3. gyh20
4. neal
5. noimi

Div. 2:
1. apei
2. yyyz04
3. bobbilyking
4. rainboy
5. RNS_JK

UPD3: The editorial has been published.

About Enigma

Enigma is a part of Plinth 2023, LNMIIT Jaipur's tech fest. If you are an Indian school/college student, we will also hold an onsite round of Enigma from 27 to 29 January, 2023. You can register for the onsite round by filling the google form on our Instagram page.

As a part of Plinth, we will also conduct IUPC (Inter University Programming Contest), which is an ICPC-like contest for teams of three people. This contest is good practice for the real ICPC rounds. Both Enigma onsite and IUPC will have cash prizes and goodies.

  • Проголосовать: нравится
  • -283
  • Проголосовать: не нравится

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

ᓚᘏᗢ

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

As a setter, I request contribution since crimsonred butchered my vacation for it (but totally worth it as the contest is going to be awesome)!

All the best to everyone participating. Have fun!

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

yay

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

As a tester, I am about to start testing! Wish me luck!

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

Have fun guys :)

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

As a tester, I enjoyed the round and hope the same for you. All the best !!

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

As a setter ,i want contribution.

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

As a tester, I tasted the problems and can testify that they are delicious!

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

As a tester, the problem set is very good 🤩 you all should participate

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

As a tester, I found the problems unique and interesting!

Good luck to everyone participating!

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

.cat_fear.

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

As a tester, the problems are great and I recommend you to try all the problems.

Wish you all positive delta.

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

As a tester, I found the problems interesting and would recommend reading all the problems.

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

As a testor i have tested and after testing i have concluded that the first contest i have tested which is also tested by other skilled testors and all testors unanimously said it was fun to test it.....Best of Luck and I hope you get positive delta

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

As a tester I find writing a comment absolutely necessary, so "a comment". all the best to everyone participating and have fun!!

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

As a setter, I recommend you to read all the problems.

Have fun!

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

As a non tester, I found the problems interesting and I would encourage everyone to participate in the round!

P.S. — May Miku Bless you all with a +ve rating. \(≧∇≦)/

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

Good luck to everyone participating, Have FUN !!

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

As a would-be contestant (hopefully), there is a surprising lack of comments from other would-be contestants.

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

As a participant, Can I get upvote?

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

omg green round

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

Salute to Codeforces for organizing 5 contest in a row !!. Thanks for such a lovely Christmas gift.

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

As a tester, I expect this comment to receive many downvotes.

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

All Indians round with every setter's rating < 1900 and all testers also Indians???

I am not expecting it to be very good round.

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

It's an amazing experience for participating in 5 contests in 1 week. Hoping for a good round. All the best for the setters and testers :)

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

Best of Luck everyone.(~.~)

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

very good

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

omg indian round

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

As a participant I hope for high rating increase 🤩 and will love solving the problems

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

it's cool !! it's is very good !! Thanks for Contest

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

crimsonred what will be the criteria for getting shortlisted for onsite round

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

As a tester, don't quit earning more score until the last second to win an onsite round.

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

Hoping for +Delta.

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

Score or penalty? Good luck everyone!

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

lol

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

please tell me this round will not speedforces, i will be very happy.

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

Hope to perform better

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

Upvote this comment for good luck!

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

I hope to become a specialist today...

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

Good luck everyone :)

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

As an experiment, I turned on the standings setting to show only trusted participants. Like we do in Div3.

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

We have a 3 minute AC on D, this has to be a record right?

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

owoovo orz

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

Your problems are interesting, but too difficult.

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

Why the huge difficulty gap between B and C?

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

    Isn't C rather simple? Just a simple observation.

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

      Problems like this are very subjective. If you miss the observation you're fucked, but if you see it good for you. From the solves distribution I would assume that the "simple observation" wasn't obvious to most people.

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

        To some extent yes, but there is also a method to get these observations. Like here, you first see that no element can go more than max($$$a_i$$$). Now, you ask if you can make all elements equal to max($$$a_i$$$). To do that, you realise that you need to make certain elements 0 and then those between 0 and max($$$a_i$$$) will become equal to max($$$a_i$$$). Hence, you try and make the first and last elements 0. I might have called it an observation, but actually that only comes about when you follow a process, which I felt in this case was not very difficult, hence called it a simple observation. I didn't have enough time to solve D because I messed up B for long. But, I don't feel it was too difficult either.

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

You can tell this contest is bad by the fact that I got expert performance by solving only 2 problems.

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

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

uh why did the authors put 3 div2D in a contest "o.o

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

Speedforces :(

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

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

Genos died as i gave up on solving B

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

At some moment it looked like this

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

Nice contest! Problems required careful casework. Although the edge case in problem D was super annoying.

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

Very good problems, but not a good round.

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

    What should we do, to be better next time?

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

      Seems like you underestimated the difficulty of the problems. Take a quick look at the number of solves, the gap between B and C is extremely high. I know C is an ad-hoc problem, so the number of solves may vary, but the gap shouldn't be this big.

      For me, this round would be perfect if we added 1 more problem between B and C, or lowered the difficulty of C.

      After all, I really enjoyed solving the problems, but I think not everyone liked it.

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

I'm kinda mad honestly...

I made a stupid mistake in B (I had the order of some operations the wrong way around) and thus got -50 for an incorrect submission. It took me around 7 minutes to fix it (an extra -28 from time loss), and that total -78 dropped my ranking by almost 500.

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

Thank you for your trash problems,trash examples and trash statements.It's the worst round I have ever participated in. I have never been so angry about a codeforces round,but today I think I wasted 2 hours,and and got an experience worse than EATING SHIT.

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

How to solve Problem C ?

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

WHATEVER I HAD GAINED IN LAST 3 CONTEST == LOST IN THIS ONE ... lol

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

the most efficient way to solve Problem B was to call saitama for help

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

nice problems, thanks

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

30 minutes debugging on problem D, until i noticed the maximum element cant be on the first, or last place by definition... a little hidden constraint

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

I appreciate your effort in the contest (actually many questions are interesting), but I think the difficulty of the contest overall is not suitable for Div2.

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

how to do B ? I used priority queue.

https://mirror.codeforces.com/contest/1763/submission/186007315 my submission

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

how to solve B what's the idea

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

Misread B to assume k decreases by the power of the minimum health (alive) monster and wasted 30 minutes fixing my correct solution.

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

Amazing round, I loved the ways the questions made me think! Was a really fun way to end the recent streak of contests :)

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

what a bad contest, wish I didn't waste my time

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

how to solve a? b is more easier than a

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

Did anyone else get failed pretest 11 for problem E? I used a dp where the main idea was to look for triangular numbers less than p (of the form $$$\frac{t(t+1)}{2})$$$ which can be represented minimally with $$$t+1$$$ nodes.

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

D is not too hard but coding it's solution need to be VERRRRRRY CAREFUL

I could have solved it but it's out of time

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

    Also solution of C is incredibly trivial for n>=4

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

    Also, some discussion for B:

    The change of attack k depends only on min{pi| monster i is alive}, so at this moment monsters who has higher power p can be regarded as not exist. Therefore we can sort monsters by their power, and imagine we are beating them one by one, but whenever a new monster appear, we reduce it's health by (the amount of damage we have dealt before). Result of each battle can be calculated by quadratic inequality, but even if we simulate it step by step(for each step k-=min{pi| monster i is alive}, (the amount of damage we have dealt before)+=k), the time limit is enough, because for every step k decreased by at least 1, and when k<=0 we can end the simulation and see whether all monsters are defeated. Thus overall time complexity is O(n+k).

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

Hard but amazing! Thank you to hold this round!

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

Huge difficulty gap between B and C :( But problems are of real quality :) Enjoyed the problems and the contest overall :) Could not solve C but solved E somehow. HuiHuiHui

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

Worst CF Round Ever. Worst Difficulty Transition. Misleading Statements And Worst Samples.

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

why downvote? I agree that the problems are more difficult than usual, but they were enjoyable to solve (and to upsolve).

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

CAN ANYONE TELL WHY MY SUBMIISSION IS WRONG FOR PROBLEM B https://mirror.codeforces.com/contest/1763/submission/185981968

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

I won't trust testers in comments anymore

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

Difficulty of questions are too unbalanced

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

18o3 kya tester bnega re tu

»
3 года назад, скрыть # |
Rev. 4  
Проголосовать: нравится -13 Проголосовать: не нравится

This comment has been deleted.

Just don't want to get more down votes:(

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

bruteforces :/

»
3 года назад, скрыть # |
 
Проголосовать: нравится +36 Проголосовать: не нравится
»
3 года назад, скрыть # |
Rev. 3  
Проголосовать: нравится +46 Проголосовать: не нравится

I didn't find any reason to downvote this contest. The problems are not toooooo difficult, but they are interesting. You have at least something to think about for the whole two hours.

I believe that solving 3/4 of the problems in an hour and then giving up is not more beneficial than solving no problems but making you think for two hours.

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

To be fair

I can understand why authors judged C to be C

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

Can Anyone Explain to me the simpler approach to B?

I know segment tree and Sqrt decomposition are not the intended ones.

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

SPEEDFORCES ⬆️

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

Execution time on C was misleading :)

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

Despite opinions, I liked round overall, maybe if you ask for future advice, I would recommend less annoying casework, but this is pretty much all.

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

    Which casework did you find annoying?

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

      Problem C n==3 case, took me A LOT of time to figure out all possible cases (yes, I know brute force could be done too, but that's overkill imo)

      Problem D, I didn't try to solve it, but have seen some comments about casework for D

      Problem E was great, have nothing to complain. Only thing, have seen somewhere above a comment about "artificial complication" of problem with second value to print. Can agree with this one, because once you realize solution (and fact that it must be not Greedy, but DP), second value you get along with first value, so seemed pretty useless for problem, though, still not such a big problem, I can't complain :)

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

        For C, you could reduce the case work using this.

        For D, if($$$x \lt y$$$), you could just reverse the permutation and you'll get $$$x \gt y$$$. That reduces it to just the 2 cases — that aren't repetitive as such.

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

          I did this, but also it was the case with applying op's like [0,1] [1,2] [1,2] [0,2], so that the answer would be 3*(abs(a[0]-a[1]) or 3*(abs(a[1]-a[2])

          For D, once again, I didn't solve it, I just referenced to opinions from comments (though, ok, those aren't trusted source xd)

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

The second number that was asked for in E is highly artificial; getting the first is clearly the bulk of the problem, I feel like the 2nd number was there to increase artificial difficulty (annoyance), e.g. to introduce more terms such as the "unidirectional" when the entire problem could just have been "Find minimal number of nodes such that there is exactly $$$p$$$ reachable pairs".

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

Round Was Amazing

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

Worst contest experience of my life

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

Is it just me or was B much harder than C. Required me to write segment tree so that I can forget about subtracting previous damage. Otherwise it's just painful to write. On the other hand C can be solved for all n but 3 easily. With n = 3 there isn't much you can do, and the bruteforce is easy-to-write.

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

lol

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

For B I wasted 30 mins thinking I can't simulate this as health of monster <= 10^9. Later I realized k goes to zero in at most 10^5 attacks

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

It's after the fact, but I can't see anything in B that would've made me think I needed to reorder events (and allow for saved/cached debuff effects to hit after death??) and yet that's the route I went to make my dumb (TLE) sim better match sample descriptions. WA, reread, headdesk, damn.

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

Solved just A-C with time penalty 1.5+ hour and I'm ranked Top300?

For other div2 contest I would be ranked 1000+

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

Why is Kotlin 1.7 slower than 1.6? My submission for B

Kotlin 1.7 TLE (1s) https://mirror.codeforces.com/contest/1763/submission/185971554

Kotlin 1.6 (AC 546ms) https://mirror.codeforces.com/contest/1763/submission/186014735

Submissions are exactly the same

»
3 года назад, скрыть # |
Rev. 7  
Проголосовать: нравится +76 Проголосовать: не нравится

There is a somewhat closed-form solution to D. Without loss of generality, assume $$$x \lt y$$$ (otherwise reverse).

Essentially, it's formulated as $$$2^{n-y-1}\binom{x-1}{i-1}\left[\binom{y-x-1}{y-j-x+i}+\binom{y-x-1}{n-j-x+i}\right]$$$, but you need to subtract $$$1$$$ if $$$i=x$$$ and $$$j=y$$$.

Brief explanation:

  • You need to distribute elements that are lower than $$$x$$$ between before i and after j in $$${x - 1 \choose i - 1}$$$ ways;
  • You need to distribute elements greater than $$$y$$$ in bitonic way in $$$2^{n-y-1}$$$ ways;
  • You need to place all elements that are greater than $$$y$$$ either between i and j or after j;
  • Depending on that, you know how to distribute $$$y-x-1$$$ elements between $$$x$$$ and $$$y$$$;
  • Subtract $$$1$$$ if $$$x=i$$$ and $$$y=j$$$, because it would also count strictly increasing permutation;

See 186016207.

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

What was the idea for D? I figured out the case where x = n or y = n,and then I thought I should iterate over all positions different from 1,n,x,y and see in how many cases can the peak is there. I figured out the case where the peak is smaller than i or greater than j,but not for when it was in between. Help for this case,please?

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

    https://mirror.codeforces.com/contest/1763/submission/186015049. My fundamental observation is that bitonic permutation can be made by placing each number sequentially either as the leftmost or the rightmost element of an ever-decreasing segment

    Then I did DP with 3 dimensions

    • i — all numbers placed until i
    • j — position of left edge of segment (right edge position can be determined by i)
    • k — is this number placed on the left or the right of this segment?

    Finally watch out for monotonic edge cases.

    There was probably an O(n) solution with combinatorics somehow but I used the "programmer's method" as opposed to nCr's

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

Round was amazing !!! Missed E by a silly mistake of mine but the problems were good.

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

So, in problem B, the initial attack $$$k$$$ is up to $$$10^5$$$, whereas both $$$h_i$$$ and (perhaps more surprisingly $$$p_i$$$) are up to $$$10^9$$$. Are the setters deliberately trying to throw off people who misread statements?

Not to mention that probably a lot of the unsolves of problem D were people that were missing that monotonic arrays are not bitonic here for some reason...

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

For question B, why do we sort by [power, health] and not [health, power]? Would'nt it be better to try and greedily remove the monster with the lowest health first?

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

anyone else who thought brute force would have given TLE for B? so kept trying other methods ?

»
3 года назад, скрыть # |
Rev. 5  
Проголосовать: нравится +9 Проголосовать: не нравится

My opinion on Problem B: I think it is not a good idea to hide the constraint for k as it was hidden in the problem statement (Some may disagree. It is fine.) . That is the absurd way for making the problem hard (statement parsing wise) especially for problem at index B. For example, it makes more sense to say that sum of k over all test cases won't exceed 1e5. Or keep k as 1e9 and move the problem to higher spot, rather than participant figure out t * k < 1e7. For problem B, I generally look at problem only once and move to the editor. This is exaggerated more by the fact that constraints on n was shown clearly and constraints on k was hidden in a notorious fashion.

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

    Why do you say that the constraint on k was hidden?

    • »
      »
      »
      3 года назад, скрыть # ^ |
      Rev. 2  
      Проголосовать: нравится 0 Проголосовать: не нравится

      It became more of statement parsing after seeing the constraints on n and k. Many contestants ended up misreading and implemented BS on k which was harder to debug and pass. Also highlighting, if you switch the constraints statement on n and k, it won't make the difference complexity wise. Why they had different type of statement for these two variable? They could keep it same. right?

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

    I too solved the problem for k <= 1e9 using binary search and then after the contest my friends told me that simple a brute force would have worked because k was <= 1e5 not 1e9! Ruined the whole contest for me!

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

C is that type of problems, when you either noticed one simple thing or you didn't. It's really fun (when you have enough time) and beautiful, but also it's pretty random. I like this type of problems, but I'm not sure that they can be well balanced

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

This round was challenging as well as tricky!!

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

I hate to do this, but would really appreciate if someone could point out my mistake in B — 186014174

Losing my mind here

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

Why constraint of problem D is too small? I solved it in O(n) complexity. submission link

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

As a tester, it's very hard to predict the difficulty of C and E because of the not complex final solutions(I felt the gap between AB is larger than BC and D took more time than E when I was testing).
I want to say 500 — 1000 — 1500 — 2000 — 2000 — 3000 is the safest score value as a result, but if you are frustrating the gap between B and C, sorry for it.

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

They have vibes of JEE Advanced paper while making this contest (subjective & Hard).

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

Huh. Why is this downvoted so heavily?

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

problem B gives TLE in PyPy-3 but the same code is Accepted in Python-3. why ???

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

Ratings updated preliminary, it will be recalculated after removing the cheaters.

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

For problem B. Incinerate, what's wrong with my logic

  1. I am picking a monster with the max health and reducing its health with each attack. Since the rest of the monsters have lesser health, their health will reduce automatically.

  2. In the problem it is mentioned that first Genos deals k damage and after the damage, the damage is reduced by the power of the weakest. So I traverse through the complete power of the monsters and reduce the health of the strongest monster.

  3. if in the end the health>0, then I print "NO" else "Yes"

t = int(input())
for _ in range(t):
    n,k = map(int, input().split())
    lst = list(map(int, input().split()))
    lst1 = list(map(int, input().split()))
    lst1.sort()
    arr=[k]
    val=max(lst)
    if min(lst1)>k and val>min(lst1):
        print('NO')
    else:
        for i in lst1:
            if arr[-1]>=i:
                arr.append(arr[-1]-i)
        x=val
        #print(arr)
        for i in arr:
            val-=i
        #print(val,arr,lst1)
        if val>0:
            print('NO')
        else:
            print('YES')        
»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +17 Проголосовать: не нравится

Problem E1763E - Node Pairs is just a Coin Change dp.

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

Could you check out my wrong answer for problem B, test set 2, token 27 https://mirror.codeforces.com/contest/1763/submission/185996790

Thanks

  • »
    »
    3 года назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится 0 Проголосовать: не нравится

    k+=(k-p) means your total damage is almost doubled every time, which contradicts that you attack is decreased. You should replace it with attack-=p, k+=attack where attack=k initially.

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

      It seems but it’s not like that. K+=k-p , assume first time you attack with K and K decrease by Pmin, p here. So it means for second smallest p you are decreasing k + k-p, right? I think my logic is correct. It passed too many test cases, i guess there is some special cases i did not see.

      11 5 2 1 K 6 means second monster killed at round 1 and first monster at round 2 , so for the first monster i used k 6 and again k 5 means in total k + k-p, 11 !

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

        Assuming all monsters have power p:

        1st attack: deal k damage. Then attack decreased to k-p

        2st attack: deal k-p damage. Then attack decreased to k-2p. Now total damage is 2k-p.

        3rd attack: deal k-2p damage. Total damage is 3k-3p.

        But in your code by executing k+=k-p, k becomes 2k-p, then becomes (2k-p)+(2k-2p)=4k-3p, there's no place for 3k-3p.

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

Для человека, который переводил заявления с английского на русский: перевод идеальный, спасибо за старания! Никогда не видел таких лаконичных смс!

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

    Если это сарказм — я бы с радостью послушал, что можно сделать лучше, чтобы не допускать ошибок впредь. В любом случае — спасибо!

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

      Лол. Ну типа на нейтив спикере можно было и без машинного перевода обойтись. Спалился фразой "Давайте назовем", на нормальном русском let не переводят.

    • »
      »
      »
      3 года назад, скрыть # ^ |
      Rev. 2  
      Проголосовать: нравится +18 Проголосовать: не нравится
      1. Не использовать машинный перевод.
      2. Если очень хочется использовать машинный перевод — вычитывать его результаты раз в десять дольше и тщательнее, чем результаты человеческого перевода.

      И я даже не о несогласованности форм слов. Фразы "элементы сначала увеличиваются, а затем уменьшайте" или "дан неориентированных, связный граф", хотя и не соответствуют правилам русского языка, не влияют на понимание задачи. Очевидно, в какой форме на самом деле должно быть слово.

      Но что гораздо хуже — так это то, что из-за машинного перевода меняется смысл слов, и в этом контесте это не вычитывали (или вычитывали, но не до конца). Например, в задаче F — "между одной парой вершин проведено не более одного ребра". Серьёзно, перевести any в данном контексте как "одной"? Это в корне меняет смысл предложения. Конечно, это задача F, и большая часть людей, которые до неё доберутся, поймут, что тут вместо "одной" на самом деле "каждой" или "любой". Но всё равно — смысл у фразы стал совсем другой, и вот это уже сильно влияет на понимание условия.

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

        Я использовал машинный перевод, чтобы переводить условия на английский в своих раундах. Конечно, я исправлял неточности, которые получались, но в целом это гораздо удобнее, чем переводить с нуля.

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

          Глянул условия 741 — не похоже на машинный перевод. Значит, их очень хорошо проверили и вычитали.

          Для меня гораздо проще наоборот. Мне удобнее минут за 10-15 перевести самому, чем сэкономить время на перевод, но после этого пару часов выискивать, а где же ещё этот кремниевый мешок написал "график" вместо "граф". Возможно, всё ещё сильно зависит от конкретного переводчика, но ни один из тех, которые использовал я, не выдавал приемлемые результаты.

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

The most unbalanced and unprincipled round I've ever seen, change my mind...

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

Problem B was a really good greedy problem. Thanks a lot to the authors.

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

although i failed miserably in this contest but problem was not tough in my opinions and overall I liked the problems very much

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

A good contest with good problems :D Can't understand why people are downvoting badly like this!

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

The test samples of problem C are really weak!!

Spoiler
»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится -21 Проголосовать: не нравится

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

Pretty cool problems. C had a nifty observation, it's one of those hit-or-miss problems, but I liked it nevertheless. E was a bit standard in my opinion, though. Perhaps D and E could have been swapped (and D's constraints changed to allow only O(N) solution to make it suitable for E).

Looking forward to attending the tech fest in LNMIIT!

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

Not too bad. C is interesting indeed, I like this problem but as other comments said, it might be a little bit hard to put on the place of C. D might be a little bit traditional but it's difficulty is suitable. E is constructive but a little easy for it's place. F, I can't solve it, but it made me think a lot. Probably the main problem of this contest is the difficulty of CDE, which may cause many Specialist to Expert participants feel bad when they can't solve C or D. Anyway, wish you guys can have a better contest next time!

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

$$$E$$$ can be solved using Oesis.

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

Why setting the samples of C all corner cases?

These $$$n=2,3$$$ corner cases may be even ad hoc I think.

Anyway it may be harder than the average.

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

Div.2 winners are apei, yyyyz04, bobbilyking, NoPotato and rainboy.

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

Finally,I went to green.:)

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

C is not a good problem at this position for its observation. One may waste too much time if their intuition is incorrect.

D is a bit harder but E is much too easy.

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

The difficulty of the questions is too unbalanced.. but the question is good and needs allot of logic to get to the easy solution...

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

Where did my contest score go???

Does anyone have an idea why CF took back this contest rating??

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

were rating changes reverted?

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

can anyone please explain me why in B pretest 2 16 test 2 7
6 8
1 8
the correct ans is no and not yes, why??

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

    At first, 6->0 and 8->1. So the monster with health 6 will be dead and there is only 1 monster left with health 1 and power 8. Now this monster will reduce k=7 to 0. Hence genos cannot kill the last monster and the answer is NO.

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

I have meet the problem is that: I have already registered, but when I finished my code on problem A, and click the "submit code" link, it tells me something like "only registered users can submit code", so I submited my code at the time when the contest begins 10 minutes, because after that I can extra register. Is there everyone meet the same problem?

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

I think solution to problem B was kind of a brute force solution and does not have much logic. Time complexity for some cases could be O(T*k) which would be ~1e7 operations which many thought would give TLE and struggled for logic(including me).

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

Has the ratings rolled back??

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

I don't think the difficulty gap between problem C and B is that wide as many suggests to be. The only reason I couldn't solve it in contest time was because I freaked out and thought this would be too hard. Spent the rest of the contest trying to solve D (because combinatorics, and I thought I could do it in time) and ended up getting none of them right in time.

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

can anyone tell me how can I remove TLE for 186082353 for problem b

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

Are the ratings gonna be rolled back or what ?

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

Why ratings of the contest has been revoked :"( ?

»
3 года назад, скрыть # |
Rev. 3  
Проголосовать: нравится -33 Проголосовать: не нравится

f

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

I didn't get why this blog has so much downvotes?

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

When you realise all consecutive contests are over and you again missed your chance to gain any significant delta

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

Note: I didn't participate in the contest, just saw the problems later.

Why did this contest get so many downvotes, I don't see a reason for -300?

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

.

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

this is the kind of contest that is especially for beginners, right?

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

Can anyone explain how for N = 4.

the answer is 5, 6

cant the graph be like this:

which gives answer as 4, 0

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

When will the finalists be announced so that we can book tickets accordingly?