Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

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

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

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

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

ᓚᘏᗢ

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

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

yay

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

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

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

Have fun guys :)

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

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

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

As a setter ,i want contribution.

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

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

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

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

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

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

Good luck to everyone participating!

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

.cat_fear.

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

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

Wish you all positive delta.

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

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

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

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

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

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

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

Have fun!

»
22 месяца назад, # |
  Проголосовать: нравится +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. \(≧∇≦)/

»
22 месяца назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится
»
22 месяца назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится

Good luck to everyone participating, Have FUN !!

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

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

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

As a participant, Can I get upvote?

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

omg green round

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

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

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

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

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

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

    Yes, KAN turned indian.

    Why do you even care, it's not even rated for you?

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

    Really? How about CodeCraft by IIIT Hyderabad? Pretty nice problems with excellent editorial, along with video explanation too.

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

      Also last Indian round, was one of the most well received rounds by testers and participants. Irony is that, Even he has participated in the round. And also, It's clear that he is just talking trash about Indians without actually caring about problems or round quality.

      • »
        »
        »
        »
        22 месяца назад, # ^ |
          Проголосовать: нравится -35 Проголосовать: не нравится

        Most received? What can you prove that? I think it is a bad round

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

          It was a bit harder than usual rounds, but the problems were so enjoyable and interesting to solve for me and a lot of my friends and also testers (you can check their comments). I don't know how you judge a round or why would you call it a bad round!

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

    I found your prediction true, at least for me though.

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

    I suppose u got a point there about setters' ratings, but... is there really anything to do with nationality??? (Just asking qwq)

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

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

Best of Luck everyone.(~.~)

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

very good

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

omg indian round

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

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

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

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

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

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

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

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

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

Hoping for +Delta.

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

Score or penalty? Good luck everyone!

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

lol

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

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

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

Hope to perform better

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

Upvote this comment for good luck!

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

I hope to become a specialist today...

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

Good luck everyone :)

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

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

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

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

»
22 месяца назад, # |
Rev. 6   Проголосовать: нравится -10 Проголосовать: не нравится
»
22 месяца назад, # |
  Проголосовать: нравится +80 Проголосовать: не нравится

Your problems are interesting, but too difficult.

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

    Agreed, the time for the round should have been 2:30 hrs as D has painful implementation and maths.

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

      If U uses dp, you won't need maths :)

      Note tourist solved it in 3 mins.

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

Why the huge difficulty gap between B and C?

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

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

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

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

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

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

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

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

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

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

    We are sorry for that. In our opinion, C is not hard so much(

    • »
      »
      »
      22 месяца назад, # ^ |
      Rev. 2   Проголосовать: нравится +18 Проголосовать: не нравится

      i understand, C is just a simple observation, but what REALLY is annoying is the edge cases when n = 3, i wasted a whole contest doing that ;-;

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

        You can write a brute force for n = 3. Also, without it, the task will be too easy in my opinion.

        Sorry one more time. I hope you will enjoy next contests!

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

        Even E was more straightforward than C.
        The edge case of n = 3 and a[0] and a[2] < max(arr) was especially annoying.

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

      imo in C if sample test was better more people would have figured it out

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

        Placing a case with n > 3 in the samples would have made things too obvious.
        Instead of 600 solves, maybe we'd have had 6000.
        Both situations are bad.

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

Speedforces :(

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

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

Genos died as i gave up on solving B

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

At some moment it looked like this

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

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

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

Very good problems, but not a good round.

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

    What should we do, to be better next time?

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

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

        Thanks a lot! We will invite more testers next time, to check the difficulty of problems more carefully. This time they told, that it's ok :(

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

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

    The difficulty of problem $$$C$$$ is unfair for people who normally solve $$$C$$$ like experts, this made pupil = specialist = expert :(

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

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

    This round is as good as your name :P

  • »
    »
    22 месяца назад, # ^ |
      Проголосовать: нравится -16 Проголосовать: не нравится

    I could not solve many problems, but I think the problem statements were sufficiently explanatory. Which question did you find hard to understand?

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

      I misread the problem B for many times(Even refered to the example explanation).And the example explanation of problem E made me became more confused about the problem.May be that was because my poor English,but it is the first time I cannot read a statement correctly until the contest ends.

      BTW,Why problem D's examples seems to be strong,but in fact it approximately equals to 0?I found at least 3 bugs but it was still Wrong Answer.

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

        I think the examples were weak in all the questions, but I think that's fine if protests are strong.

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

    you not being able to solve B doesnt make this contest bad...

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

      Yes U r right,but at least in my eye the round is really bad in various of senses,weak examples,bad statements and even a classic algorithm problem F...

  • »
    »
    22 месяца назад, # ^ |
      Проголосовать: нравится -20 Проголосовать: не нравится

    LMFAO

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

    more than the contest I am intrigued about the circumstances that lead you to have an experience that involved EATING SHIT.

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

      When I thought I could solve 4 but only got 1;When I found lots of bugs and felt a bit annoyed about why it could pass the example;When I found it was still wrong after fixing;When my friend told me D could be easily solved in high complexity DP,and I came up with $$$O(n)$$$ solution immediately but didn't pass until the contest ends...

      Of course that was also because my low CP-level,but I still felt very sad the next day.I also felt sorry about my impulsive comment yesterday,as it was the first time I solved 1 problem on codeforces round since 2020,56 contests XD

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

        I am glad we were able to challenge you, I hope you upsolve all the problems and you'd smth to learn :) all the best!

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

    I think the contest is now unrated

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

How to solve Problem C ?

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

    For n>=4 you can always get max(a)*n as answer. For n < 4 brute force.

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

      can you tell how can we get max(a)*n always when n>4?

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

        select any two consequtive element (left end or right end).. you can make these two element equal to 0 if you make the opeation 2 times... then operation with the maximum elemet and 0 make all the element equal to maximum.

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

        The idea is to create zeros in the array, in order to transfer the max element there.

        Let's say that X is the max in our array. You can do the following construction:
        1) [a,X,b,c] -> run the operation twice on the last 2 elements. Notice that this will make them equal to zero.
        2) [a,X,0,0] -> run the operation on the segment from X to the end, this will make all the elements in the last 3 positions equal to X.
        3) [a,X,X,X] -> similarly to (1), run the operation on the first 2 indexes twice, this will make the first 2 elements 0.
        4) [0,0,X,X] -> similarly to (2), run the operation between the first indexes up to X, this will make all the elements equal to X.
        5) [X,X,X,X] -> ans = X*n. It can be proven that this construction will work on any array of sizes larger than 4.

        Also notice that this doesn't work on arrays of size < 4, because it is not guaranteed that there are 2 elements in the beginning or the end that can be modified to 0.

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

    think about what happend when n>= 4...

    hihi

    for 2 and 3 .. bruteforce

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

    You can separate in some cases. Let mx be the maximum element of the array, then:

    • If $$$n >= 4$$$, the answer is $$$mx * n$$$. Make some elements $$$0$$$ and then apply the operation with $$$mx$$$.

    • If $$$n = 2$$$, just print $$$max (a[1] + a[2], 2 * abs (a[2] - a[1]))$$$.

    • If $$$n - 3$$$ I don't know a simple formula, but you can brute the operations by hand and get the maximum.

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

    Answer:

    $$$n\ge 4 \rightarrow n\times \max a_i$$$

    $$$n=3 \rightarrow \max [a_1+a_2+a_3,3\times a_1,3\times a_3,3\times (a_2-a_1),3\times (a_2-a_3)]$$$

    $$$n=2 \rightarrow \max [a_1+a_2,2\times|a_2-a_1|]$$$

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

      how can this test be $$$400$$$? Shouldn't it be $$$380$$$?

      1
      4
      1 1 100 10
      
      • »
        »
        »
        »
        22 месяца назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        1 1 100 10 -> ... -> 100 100 100 10 -> ... -> 100 100 100 100

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

        make $$$a_1=100$$$ by performing $$$(1,2)$$$ twice and then $$$(1,3)$$$, make $$$a_4=0$$$ by performing $$$(3,4)$$$ twice, and finally perform $$$(1,4)$$$

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

        I believe that we will get answer as 400.

        1. We apply the operation twice on index 0 and 1. the array is = 0 0 100 10
        2. We apply the operation on index 0 and 2 the array becomes = 100 100 100 10
        3. we apply the operation twice on index 2 and 3 the array becomes = 100 100 0 0
        4. finally we apply the operation on the index 1 and 3 the array becomes = 100 100 100 100

        and sum comes out to be 400

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

      I failed to find the formulae for n == 3 during the round, so I just bruteforced all sequences of up to 4 operations on the array

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

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

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

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

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

nice problems, thanks

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

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

    Yeah that was the annoying edge case! Even I was wondering what's wrong with my formula when I was getting WA on pretest 2!

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

    It seems the term "bitonic sequence" has some inconsistent usage (1383D - Rearrange). It would have been appreciated to have included a sample case that differentiated between these two definitions.

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

      +1, I didn’t even read the definition of bitonic because I’ve seen the same version, which considers monotonic sequences to be bitonic, so many times (similarly to how I don’t read the definition of “permutation” every time it appears in a problem statement). Ultimately, I had no idea why my solution was wrong, decided I must be too tired to be programming, and quit the contest :)

      Maybe the definition used in the problem statement is more common than I thought, but given that there’s a prevalent alternative definition, I think a note (possibly bolded) stating that monotnoic sequences are not bitonic would have improved the problem.

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

    i missed ac because of this :')

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

    I made the same mistake. And I thought I am not able to fix this small bug during the contest, because actually I thought the monotonic sequence also meet the definition in the statement.

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

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

    It is more like they missed some problem between B and C

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

      I do not know. Even putting C as D will still be considered difficult.

      • »
        »
        »
        »
        22 месяца назад, # ^ |
        Rev. 2   Проголосовать: нравится +18 Проголосовать: не нравится

        I am not sure. C felt really impossible at first to me as well. However, after solving I am scratching my head over how everyone all at once found it difficult. The only observation is operating on same subarray twice makes it all 0. I feel like many problems routinely have much harder observations.

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

          I tried it for some time then decided to leave it for D, that is when I got lost in the edge cases. But I agree with you C with the right observations can be easily solved.

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

          After seeing the solution to C, I realized how stupid I actually am. I managed to realize that if we can get a zero somewhere, we can operate on the subarray [max_value, 0] and make all of those equal to max_value, but I somehow missed that operating twice on ANY subarray will make them all zero...

          I just gave up at some point, probably the worst desicion I've made in a contest this far.

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

          I think if the constraints were 0 <= a_i <= 10^9, the problem would have had way more solves :P.

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

      C is an easy problem, if you make the right observation (solution is n*maxElement for all n>3). Took me some time as well. Not the biggest fan of these tasks either.

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

        Interesting! I will have another look at the problems after the system judging but yeah solving them in the contest was quite challenging.

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

    Actually, after looking at C again, I think it is not that bad. Maybe I should have given it more time and concentration.

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

how to do B ? I used priority queue.

https://codeforces.net/contest/1763/submission/186007315 my submission

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

how to solve B what's the idea

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

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

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

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

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

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

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

how to solve a? b is more easier than a

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

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

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

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

    Hint
  • »
    »
    22 месяца назад, # ^ |
      Проголосовать: нравится 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).

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

Hard but amazing! Thank you to hold this round!

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

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

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

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

    Tell us what can we do to be better next time, please?

    • »
      »
      »
      22 месяца назад, # ^ |
      Rev. 2   Проголосовать: нравится +19 Проголосовать: не нравится

      The sample test cases for C is great, it eluded me from the intended solution.

      The sample test cases for D should have been affected by the $$$2 \leq k \leq n-1$$$ constraint.

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

        Thanks a lot! We will take into account your comments and do codeforces better!

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

          Your eager to improve is quite respectable. Thanks for fast System Tests + Rating Change at least!

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

        But if the intended solution is simple, it should not be hinted by examples directly

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

    Misleading statements? Which statement did u find misleading? Worst Samples? Really? You want samples to cover up edge cases and stuff too? Samples should not be strong and just be enough to "understand" the meaning of problem statement imho. Although I agree difficulty was weird for many.

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

    In fact, I liked the samples for C. They explained the problem well enough without giving any hints to the algorithm.

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

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

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

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

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

I won't trust testers in comments anymore

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

Difficulty of questions are too unbalanced

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

18o3 kya tester bnega re tu

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

This comment has been deleted.

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

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

bruteforces :/

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

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

    that's a stupid take. why would any one enjoy thinking for two hours to solving 3/4 problems in an hour, and giving up?

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

      He clearly said beneficial, not enjoyable. And he is also right; thinking for two hours means you've been challenged, solving quickly then stopping achieves nothing in helping you forward.

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

    I thought I could solve at least 4 but finally I got 1!

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

To be fair

I can understand why authors judged C to be C

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

    Same experience. Could not solve it during the contest. But once I figured out the key observation, felt ashamed of myself :_:

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

Can Anyone Explain to me the simpler approach to B?

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

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

    k <= 1e5, so we can iterate over monsters sorted by power, decreasing k and increasing damage every time where damage is less than monster's health

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

      If we are iteratively decreasing k, then won't the time complexity be O(T * K) where T is the number of test cases.

      Let's take this test case:

      200000
      1 100000
      1000000000
      1
      The above test case repeated a lot of times
      

      Won't this give a TLE?

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

    Sort according to Health

    Then Minimum Prefix Array from Behind

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

SPEEDFORCES ⬆️

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

Execution time on C was misleading :)

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

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

    Which casework did you find annoying?

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

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

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

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

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

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

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

Round Was Amazing

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

Worst contest experience of my life

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

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

    In B

    Sort according to Health

    Take a minimum prefix array from behind

    O(n) solution

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

    I solved B at 00:15, didn't even think about using segtree And solved C only at 01:25

  • »
    »
    22 месяца назад, # ^ |
    Rev. 2   Проголосовать: нравится +14 Проголосовать: не нравится

    Btw, it is probably obvious but if you're considering using segtree in a Div2B problem then you're not after the intended solution

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

      I used it only as a secondary tool, I tried solving it without segtree, didn't manage to however.

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

    For n = 3 as well you could simplify the casework. When the max element is not in the middle, you could get 3*max. Otherwise, notice that operation (1,3) wont benefit. Hence, either you perform (1,2) or (2,3) or do nothing. If you perform either of the 2 operations, then you now have the max element at the edge and you could now solve it.

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

lol

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

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

    Even with k up to 10^9 it can be proven that the number of attacks will always be less then 2 * sqrt(max(health))

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

      Oh Yeah!

      Sum of numbers from 1 to number of attacks goes to max health within time limit. Don't know what I'm thinking during contest :(

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

    Lmao I didn't even consider any TLE or constraints.

»
22 месяца назад, # |
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.

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

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

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

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

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

Submissions are exactly the same

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

There is a somewhat closed-form solution to D. Without loss of generality, assume $$$x < 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.

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

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

    https://codeforces.net/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

    • »
      »
      »
      22 месяца назад, # ^ |
      Rev. 4   Проголосовать: нравится 0 Проголосовать: не нравится

      We don't need so many dimensions in the DP. We only need to maintain the starting index of the bitonic sequence as we extend it, leading to a DP with more straightforward transitions: 186035350.

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

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

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

»
22 месяца назад, # |
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?

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

    On every attack, $$$k$$$ health is removed from every monster, not just a single one. We sort the monsters by [power, health] in order to know the the least power of an alive monster, since that is what determines the decrease of $$$k$$$.

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

    Yeah, sorting [health, power] seemed more intuitive to me as well.185977402

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

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

»
22 месяца назад, # |
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.

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

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

    • »
      »
      »
      22 месяца назад, # ^ |
      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?

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

»
22 месяца назад, # |
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

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

This round was challenging as well as tricky!!

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

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

Losing my mind here

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

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

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

    There are test cases, and n=100 allows calculating C(n,k) in O(n)

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

    They set $$$n = 100$$$ to allow the $$$O(n^2)$$$ DP solution.

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

    $$$O(N^2)$$$ is much cleaner and simpler to implement.
    You can check out tourist's submission

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

    Sometimes small constraint misleads to think about "the complexity of this problem must be at least O(n^3) or something"

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

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

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

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

Huh. Why is this downvoted so heavily?

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

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

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

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

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

    I found the contest in the unrated list in my account

    Is it just while cheaters are removed or it became unrated ?

»
22 месяца назад, # |
  Проголосовать: нравится 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')        
  • »
    »
    22 месяца назад, # ^ |
    Rev. 2   Проголосовать: нравится +1 Проголосовать: не нравится

    Not even wrong. Your answer didn't used health (expect the max health). But it's obvious that every monster's health does matter.

»
22 месяца назад, # |
Rev. 2   Проголосовать: нравится +17 Проголосовать: не нравится

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

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

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

Thanks

  • »
    »
    22 месяца назад, # ^ |
    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.

    • »
      »
      »
      22 месяца назад, # ^ |
      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 !

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Я использую deepl.com

            В целом его приходится вычитывать, конечно, но он делает не так много ошибок.

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

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

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

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

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

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

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

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

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

The test samples of problem C are really weak!!

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

    Test samples cannot be weak. Test samples are not supposed to protect against anything other than misunderstanding of the problem

»
22 месяца назад, # |
Rev. 2   Проголосовать: нравится -21 Проголосовать: не нравится

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

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

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

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

»
22 месяца назад, # |
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.

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

    It was intentional as writing a case for $$$n > 3$$$ would give away the solution.

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

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

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

Finally,I went to green.:)

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

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

    Maybe the difficulty distribution is ABDDDE.

    For me myself D may be too traditional and easy for this position.

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

    After seeing the solution, I thought that C would have more solves. I didn't get the observation, but I thought after seeing it that more people would've gotten it since it didn't seem too difficult. It just seems hit or miss whether you get the observation.

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

    Yeah, I overkilled it and wrote 150+ lines with WA! :(

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

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

Where did my contest score go???

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

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

were rating changes reverted?

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

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

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

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

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

    In my experience, 1e7 operations are pretty safe as far as TLE is concerned.

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

    The trick is that K can only decrease by 10^5 times. Since the minimum power is 1 and k is 10^5, therefore you would have to loop at most k + n times at worst case. Therefore you don't nearly need 1e7 operations.

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

Has the ratings rolled back??

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

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

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

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

Are the ratings gonna be rolled back or what ?

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

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

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

f

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

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

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

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

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

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

.

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

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

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

    This one particularly is not. If you are completely new to competitive programming, then yoy should try div4, div3. If you are just new to codeforces, then it's better to solve div3, div2

»
21 месяц назад, # |
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

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

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