maomao90's blog

By maomao90, history, 2 years ago, In English

Hello Codeforces,

We are very glad to invite you to participate in Hello 2024, which will start on Jan/06/2024 17:35 (Moscow time). You will be given 8 problems and 2.5 hours to solve them. One of the problems will be divided into two subtasks. The round will be rated for everyone. There will be at most 2024 interactive problems, so please read the guide for interactive problems before the contest.

All the problems are written and prepared by me.

Spoiler

We would like to give our sincere thanks to:

The score distribution is $$$250 - 500 - 1000 - 1500 - 2250 - (1500 + 1500) - 4000 - 5000$$$.

Hope everyone will enjoy the round!

Congratulations to the winners!

  1. ecnerwala
  2. ksun48
  3. VivaciousAubergine
  4. gamegame
  5. cnnfls_csy
  6. maroonrk
  7. tourist
  8. Geothermal
  9. kmjp
  10. yosupo

Congratulations to the first solves as well!

UPD: Editorial

Announcement of Hello 2024
  • Vote: I like it
  • +2422
  • Vote: I do not like it

| Write comment?
»
2 years ago, hide # |
 
Vote: I like it +157 Vote: I do not like it

As a tester I went from expert to specialist during the making of this round

»
2 years ago, hide # |
 
Vote: I like it +75 Vote: I do not like it

as a tester, I can happily tell you that this round is surely one of the rounds of all time.

»
2 years ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

Hope to have fun in $$$1^{st}$$$ contest of $$$2024$$$.

»
2 years ago, hide # |
 
Vote: I like it +365 Vote: I do not like it

as a tester

Screenshot-2024-01-02-191045

»
2 years ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

waiting for this contest...

»
2 years ago, hide # |
 
Vote: I like it -24 Vote: I do not like it

My last wish for Goodbye turned out true, so purely trying my luck, hope to become IM!

»
2 years ago, hide # |
 
Vote: I like it +198 Vote: I do not like it

Hormat 🫡 maomao90 🐱 for contributing to civil defence 👮 and protecting 🙏 us from people like iLoveIOI 🥶

»
2 years ago, hide # |
 
Vote: I like it -17 Vote: I do not like it

This is my first "Hello Year" contest.

I promise to solve at least 3 problems!

»
2 years ago, hide # |
 
Vote: I like it +35 Vote: I do not like it

As a tester, I can guarantee that this will be the best round of the first week of 2024

»
2 years ago, hide # |
 
Vote: I like it +267 Vote: I do not like it

I was forced to test.

»
2 years ago, hide # |
 
Vote: I like it +172 Vote: I do not like it

As a tester, there is a non-negative number of problems in the problemset, and at least one person will win the contest.

»
2 years ago, hide # |
 
Vote: I like it +97 Vote: I do not like it

As a iLoveIOI, peepeepoopoo

»
2 years ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

Hope this contest will be good, unlike last contest :)

»
2 years ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

Scoring distribution?

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

Deleted

»
2 years ago, hide # |
Rev. 2  
Vote: I like it +18 Vote: I do not like it

Hopefully there won't be any more googleable or oeisable problems in this round

»
2 years ago, hide # |
 
Vote: I like it +33 Vote: I do not like it

Please, don't be mathforces this time

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +44 Vote: I do not like it

    But math is fun...

    • »
      »
      »
      2 years ago, hide # ^ |
       
      Vote: I like it -64 Vote: I do not like it

      Using algorithms is more interesting than doing math

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

        Sry to tell you but the fact is you can't be a good algorithmic programmer without being good at math

        • »
          »
          »
          »
          »
          2 years ago, hide # ^ |
           
          Vote: I like it +78 Vote: I do not like it

          Best problems are when math, algorithms, data structure and implementation are in balance. When it's overly biased like OEIS lookup of single number input it's not fun.

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

          talkig of maths, I want to ask about the last contest"bye bye 2023", problem B.

          In the case whereb%a=0, why did we assume that the lowest divisor of b is equale to the lowest divisor of x ?

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

            When b % a = 0, you'd know that b = a p, where p is the smallest prime in x. Why? Let's assume that p was not the smallest prime in x, then a (b/p) would not be the second largest divisor as you'd be able to choose a smaller prime. Anyway, b is only missing this one prime, so x = b p. p = b / a, so x = b * b / a.

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

        Algorithms are math

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

        But math is also a algorithm,right?

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

    Math is Life

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

    Tfw yet another genfuc question shows up in Div1.

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

Interactive problems are awesome!!!

»
2 years ago, hide # |
 
Vote: I like it +7 Vote: I do not like it

3amy Amrharb <3

»
2 years ago, hide # |
 
Vote: I like it +43 Vote: I do not like it

Guys remember to not upvote the blog before the contest.

»
2 years ago, hide # |
Rev. 4  
Vote: I like it +26 Vote: I do not like it

Hope Hello 2024 != Good Bye 2023

»
2 years ago, hide # |
 
Vote: I like it +66 Vote: I do not like it

Hoping this contest brings the coordination back on TrAK

»
2 years ago, hide # |
 
Vote: I like it +42 Vote: I do not like it

I ran some code and managed to optimise the upper bound on the number of interactive problems to $$$7$$$ from $$$2024$$$.

I'll write a formal proof of my algorithm later and edit that into this post.

»
2 years ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

I hope this round is better than before.

»
2 years ago, hide # |
 
Vote: I like it +53 Vote: I do not like it

Fun fact: 2024 is divisible by 11 and 23

»
2 years ago, hide # |
 
Vote: I like it +52 Vote: I do not like it
Spoiler

Sounds more promising than Goodbye 2023.

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

I hope to kick off 2024 by becoming Pupil after this round.

»
2 years ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

Let's have fun in the first contest of 2024! Wishing everyone a positive delta!

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +31 Vote: I do not like it

    It's annoying how every blog announcement has like 5 of these "positive delta" wishes, even though it is impossible for everyone to get a positive delta

    Ahem, back to troll content: Good luck eveyrone! Hope you all get +200 delta in contest and reach new rank in contest!!1!!1 Hope i can reach my dream rating of 800

»
2 years ago, hide # |
 
Vote: I like it +14 Vote: I do not like it

the last contest was "good bye rate" ... this contest going to be "hello rate" what do you think ?

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

goodbye 2100, hello 2000

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

We hope this will be better than the previous one

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

18o3 orz

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

Hello 2024

»
2 years ago, hide # |
 
Vote: I like it -65 Vote: I do not like it

Clashing with LeetCode Biweekly. Skipping this one.

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

There will be at most 2024 interactive problems — what does it mean?

»
2 years ago, hide # |
Rev. 3  
Vote: I like it 0 Vote: I do not like it

Hopefully, I was able to solve first 4 problems!

»
2 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

as a noob ,I hope I can solve problem 1 within 1 minute and not get hacked

»
2 years ago, hide # |
 
Vote: I like it -15 Vote: I do not like it

As a tester problems are good...but I'm not a tester

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

How humorous! I am looking forword to participating in this round!

»
2 years ago, hide # |
 
Vote: I like it +7 Vote: I do not like it

Please provide scoring distribution

»
2 years ago, hide # |
 
Vote: I like it +24 Vote: I do not like it

I wish 2.5 hours were 2 hours 50 minutes

»
2 years ago, hide # |
 
Vote: I like it -61 Vote: I do not like it

I feel the contest will not be very good

»
2 years ago, hide # |
 
Vote: I like it -7 Vote: I do not like it

Can the Python be used while solving in here?

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

    You can solve with any language that can be used to solve a problem in the problemset (Including python).

    But I wouldn't recommend using it as it's much slower than c++, you may need to further optimize your solutions in order to pass the tests.

    If you are planning to use Python submit using PyPy instead of Python which is usually much faster.

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

    For very early problems definitely. In harder problems, especially with more complex implementation, you can run into TLE, but at that point learning to code in a suitable language isn't the hardest part.

»
2 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Hope it can make me excited instead of the frustrating "Good Bye 2023".

»
2 years ago, hide # |
 
Vote: I like it -28 Vote: I do not like it

74TrAkToR won't be the coordinator of this contest. Yay!

»
2 years ago, hide # |
 
Vote: I like it -11 Vote: I do not like it

»
2 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Guys, I am a complete beginner to programming. I have started learning basics of C++ from sololearn.com. If there is anyone who is hearing me, who is candidate master or master. Please can you help me? I want guidance for CP.

I want to dedicate 1 year for doing CP full time. I want to utilize this time to get maximum output.

Thank you.

»
2 years ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

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

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

i can not wait to start it!!!

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

I hope this contest has the opposite number of votes as Goodbye 2023.

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

I hope I can solve the first 3 problems

»
2 years ago, hide # |
 
Vote: I like it +26 Vote: I do not like it

will we see "happy new year" instead of "accepted" in this round?
MikeMirzayanov

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Hope this time I can finish at least 5 problems.

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

Hope to become CM this round!!!

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

I hope for a positive delta

»
2 years ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

»
2 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

I wish it's somehow better than Gb2023 lol

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +69 Vote: I do not like it

    That bar is so low you could use it to play limbo.

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it -13 Vote: I do not like it

    IMO first ever CF round would have been better that Gb2023. At least people might have learnt about maybe Dijktra or knapsack rather than just coding math operations without understanding significance.

»
2 years ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

Wish a good perf and an enjoyable round.

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

how does score of questions related to our rating

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Geothermal will win codeforces round Hello 2024

»
2 years ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

Will OEIS will be helpful in this round also? :P

»
2 years ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

ImbalanceForces

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

is time limit for C too tight ?

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

    if not, please share the approach after the completion of the round.

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

      Greedily considering this problem. We set the last number in sets $$$a$$$ and $$$b$$$ to $$$x$$$, $$$y$$$ (where $$$x$$$ and $$$y$$$ are the maximum values initially).

      Assuming we add the number $$$z$$$ to the set:

      1. $$$x \gt z, y \gt z$$$: Add $$$z$$$ to the set represented by the smaller number in $$$x$$$ and $$$y$$$.

      2. $$$x \gt z, y \lt z$$$: Add $$$z$$$ to the set represented by numbers greater than $$$z$$$ in $$$x$$$ and $$$y$$$.

      3. $$$x \lt z, y \lt z$$$: Add $$$z$$$ to the set represented by the smaller number in $$$x$$$ and $$$y$$$.

      Then we solved the problem within the complexity of $$$O(n)$$$.

      submission link

»
2 years ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

kringe round it was too bad!

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

unable to solve C,i better not be a retard

»
2 years ago, hide # |
 
Vote: I like it +33 Vote: I do not like it

Prove_with_ACforce

»
2 years ago, hide # |
 
Vote: I like it +119 Vote: I do not like it

I've participated in codeforces contests for 7 years, and I still can't solve Div2C. I don't know how much I've progressed in past 3-4 years. Maybe its time for me to quit this game now.

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

C was nice. I love it when I prove a solution during the contest

  • »
    »
    2 years ago, hide # ^ |
    Rev. 3  
    Vote: I like it 0 Vote: I do not like it

    it was about finding the ( Longest Non-Increasing Subsequence) right ?

    • »
      »
      »
      2 years ago, hide # ^ |
      Rev. 3  
      Vote: I like it 0 Vote: I do not like it

      No, just try to start with the end. Then, you can compare each new item with the last added item in each of the two subsequences

      The rest is casework

      • »
        »
        »
        »
        2 years ago, hide # ^ |
        Rev. 4  
        Vote: I like it 0 Vote: I do not like it

        ok thanks, but can it be solved if we found the longest non-increasing subsequence?

        the (Longest Non-Increasing Subsequence) penalty will be 0 and then we calculate the penalty of the remaining numbers in the set. do you think that this is a valid Solution?

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

          You mean the longest non-increasing subsequese which will give us penality 0, right?

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

            yes , I'm sorry

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

              No worries!

              The longest non-increasing subsequence will not work

              Consider this test case:

              10

              7 4 1 6 2 3 5 8 1 9

              If we take the first subsequence as the longest non-increasing subsequence it can be

              7 6 5 1

              The other will be

              4 1 2 3 8 9

              Which has penality of 4

              But consider this solution wich have penality of 3 only

              1 6 3 9 8

              7 4 2 5 1

              The first has penality of 2 and the second has penality of 3

              which is less than the (longest non-increasing) solution

              • »
                »
                »
                »
                »
                »
                »
                »
                2 years ago, hide # ^ |
                Rev. 10  
                Vote: I like it 0 Vote: I do not like it

                No it will be 7 6 5 1

                4 1 2 3 9 8 This will have penatly 3.

                u interchanged them.

                I know LDS wont work because you can take this sequence :

                27 28 29 100 99 98 97 96 20 19 18 30 27

                When by LDS

                100 99 98 97 20 19 18

                27 28 29 30 27

                The penalty :3

                The better would be 100 99 98 97 96 30 27

                27 28 29 20 19 18

                Penalty :2

»
2 years ago, hide # |
 
Vote: I like it +18 Vote: I do not like it

Goodbye, 2024.

»
2 years ago, hide # |
 
Vote: I like it +40 Vote: I do not like it

I tried so hard to solve C. I tried varies of approaches to deal with it, but still failed. But I didn't give up. I tried to drew a lot of examples, tried to use dp, binary search, ternary search, graph, extended euclidean, ford fulkerson algorithm, .... And finally, I realised that I still unable to solve C.

  • »
    »
    2 years ago, hide # ^ |
    Rev. 2  
    Vote: I like it +4 Vote: I do not like it

    Kind of the same... Sent 2.5 different solutions and tried maybe 5 approaches and all WA 2

    UPD: actually I had correct idea but just initialised arrays wrong... Now I am specialist for the first time since 2014...

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

    problem C reminded me of my skill issue

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

wow what IS d? new year, new pain

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

    I found out that if x is the biggest element must have a brother that's equal to x-1 (both leaves). From that i think you can delete those two elements from the array and substitute them with their father (that has value of x-1) and solve again. I tried this with some data structures (double linked list and priority queues, very ugly) but got WA on pretest 2. I spent like 1.5 h on this :(

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

      "I found out that if x is the biggest element must have a brother that's equal to x-1 (both leaves)."

      I guess, not "x is the biggest", but x is the deepest.

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

        if x is biggest, then it won't have children. Though this doesn't mean it will have a leaf brother, at least one maximum should have a brother that's a leaf. Maybe it becomes a problem if there's two possible brothers, i'm not sure if both choices lead to a tree or not

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

      I saw that too, but what if X has both neighbors equal to X-1? Which one do you merge it with? What if it has one or both neighbors equal to X? I didn't really see any breakthrough in this line of thought

      • »
        »
        »
        »
        2 years ago, hide # ^ |
         
        Vote: I like it +16 Vote: I do not like it

        WOW I fucking misread the statement. I thought we could freely color the edges 0 or 1, turns out one edge HAS to be 0, and one edge HAS to be 1 for each non-leaf. I'm going to kms

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

        If you do this until you can't:

        • Choose an inner node
        • merge it with its child with 0 edge

        The result will be a tree, not necessarily binary. The Dfs over leaves is now equivalent to dfs in tree, but with one tweak. We need to decide after which children (or it's possible at the beginning) we insert the inner node into dfs_order. Everything is possible, which means if (e.g.) choose the root, then there will some subtrees dfs_order concatenated on the left, and some subtrees dfs_order concatenated on the right. This can be checked with RMQ and recursion, but instead of deciding where to break the concatenated blocks in the root, we will decide them in the children. So at the end we need to check if the root is unique.

        240558002

        (oh i see you misread but maybe this will be helpful to someone else)

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

        In that case if you have [... x-1, x, x-1, ...], then you merge any neighbor to x and always get [... x-1, x-1, ...]. Anyways this is the editorial sol

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

      i did exact same thing and 5 minutes after the contest i realised, that there must stay only 1 element and it must be equal to 0, otherwise it's a "NO".

      240601323

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

is problem c dp?

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

is D DSU?

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

    Yea, I did a DSU based solution; however, something like linked lists might be easier to implement

»
2 years ago, hide # |
 
Vote: I like it +89 Vote: I do not like it
  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Wow, I came up with the same solution without realizing that the complexity becomes linear if done recursively.

»
2 years ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

Really nice problem D! A bit hard for its position though?

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

What's the idea for D?

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +11 Vote: I do not like it

    Firstly, there must be only one $$$0$$$ in a valid sequence. Next, give some examples on the draft paper. You will find that if $$$x (x \gt 0)$$$ appears in the sequence, then $$$x-1$$$ must have appeared.

    Let $$$x$$$ be at position $$$t$$$. Combined with the drawing, it can be found that $$$t$$$ must be within a interval $$$(l, r)$$$, satisfying the conditions of $$$\forall i \in (l, t) \cup (t, r), a_ i \gt =x$$$, and $$$a_l=x-1 \vee a_r=x-1$$$.

    I'm not very good at expressing its proof in words, sorry!

    Finally, we use dfs and binary search to solve this problem. Pass three parameters $$$l, r, x$$$ into the dfs function, representing the current interval $$$[l, r]$$$ and the value $$$x$$$. Record the position of each value in the array $$$t$$$, find the value $$$x-1$$$ in the interval $$$[l, r]$$$, split the entire interval into several small intervals, and recursively solve the problem.

    Happy New Year!

    Here are some examples as a reference:

    5
    6
    1 0 3 2 3 1
    6
    1 0 3 3 3 1
    5
    1 0 3 2 1
    5
    0 1 0 1 1
    7
    0 1 2 3 4 5 2
    
    Yes
    No
    Yes
    No
    Yes
    
    • »
      »
      »
      2 years ago, hide # ^ |
       
      Vote: I like it +3 Vote: I do not like it

      Additionally, if you use bfs instead of dfs, some optimizations can achieve $$$O(n)$$$ complexity!

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

The webpage lag 15 minutes after the start of the competition caused me a lot of trouble.

Anyway, the problems all look interesting, thanks!

»
2 years ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

problem d is interesting but so hard, didn't solve :(

»
2 years ago, hide # |
 
Vote: I like it +25 Vote: I do not like it

$$$\frac{Div. 3 \ + \ Div. 1}{2} \neq Div. 2$$$

»
2 years ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

great contest but did not manage to perform as expected !!

»
2 years ago, hide # |
Rev. 2  
Vote: I like it +1 Vote: I do not like it

How to practice for problems like C (guessable but not trivial greedy problems)?

»
2 years ago, hide # |
 
Vote: I like it +81 Vote: I do not like it

Accidentally submitted F2 to F1 & got -350 score...

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

Great contest! Thanks.

Hello 2024 != Good bye 2023

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Wow, it was such quickforces. My last accepted submission was on 0:11 .

My ideas to D:

  1. DFS. Assume we are on vertice. We remember what is above in stack. Either sum on path is $$$a_i$$$, so we calculated it, leave the leaf; or it is inner vertice, do exactly two dfs-s. If we are out, and array $$$a$$$ is no used fully, append one vertice above and start from it with only one dfs call. Incorrect.
  2. Greedy. Go from left to right. When we are on some position, we can do $$$-1$$$ on segment with this position as left border, and all different right positions. Use maximum right border every time. Incorrect model.
  3. Stress. Try to find pattern. Could not find.
  4. Split array on $$$0$$$-s to components. Size of each component is at least 2^max on compoment. What is next?
  5. Go from small values to big values. For all segment of values at least x its length has to be at least 2^length. Incorrect.
»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Even though I couldn't solve the problems, I liked the problems as they are short and nice.

»
2 years ago, hide # |
Rev. 2  
Vote: I like it +27 Vote: I do not like it

Accepted/Tried

How brutal the C test is. (The pretest btw)

»
2 years ago, hide # |
 
Vote: I like it +109 Vote: I do not like it

cloudflare is SHIT

»
2 years ago, hide # |
 
Vote: I like it +14 Vote: I do not like it

Now I know how difficult to welcome the new year is.

»
2 years ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

I wonder how many people proved solution of C.

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +21 Vote: I do not like it

    welcome to codeforces

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

    In my opinion, high-level coders will prove this because they can demonstrate it almost instantly.

    The proof of this problem is a typical one. Consider iterating from 1 to n. Suppose the current two subsequences end with a and b, assuming a <= b. Suppose the current number is x. Consider two cases:

    1. You put x after a number greater than or equal to it. In this case, if both a and b are greater than x, choose a. Otherwise, choose b.

    2. You put x after a smaller number. In this case, it will choose to put x after a.

    We consider that if we can make two choices in the current step, it must hold a < x <= b. If we choose 2, it becomes x, b, and penalty++. If we choose 1, it becomes x, a. We can imagine that the penalty is like a free ticket, which can change any number into INF at any time (including changing a into INF instantly), so 'a' with one less penalty is strictly better than 'b' with one more penalty.

    I don't know how others did this problem, but I only realized the answer to this problem after the proof.

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +8 Vote: I do not like it

    Proof by AC is the most powerful method

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +8 Vote: I do not like it

    Didn't really prove it, but my reasoning went kind of like this. There's no real reason to take a penalty if not strictly necessary. If i raise one of the two sequences when not required I might also have done this later for the same cost. Then I just thought about how to keep a good state and figured out the best greedy moves after some tries. Then i proved by AC.

    Proof is a big word, but having an idea what you're doing is good enough usually

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

More and more vegetables,what should I do?

»
2 years ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

First two problems were satisfying. Solutions are short and pretty

»
2 years ago, hide # |
 
Vote: I like it +11 Vote: I do not like it

Is F1 difference + segment tree?

»
2 years ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

E seems classic, but I can't solve it. How to solve E? QAQ ~

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

240509224 240515600

Identified and rectified a discrepancy in Problem A submissions; both versions passed the pretests and shared the same logic. However, there was a point reduction of 50 points. :"(

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

Someone Kindly share the solution of A using recursion. Thanks.

»
2 years ago, hide # |
 
Vote: I like it +51 Vote: I do not like it

C was the hardest problem of all time

»
2 years ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

Why do I perform well in shxt rounds and brick the good rounds, weird

spent 1h writing F for nothing

»
2 years ago, hide # |
 
Vote: I like it -11 Vote: I do not like it

For every non-leaf vertex, one of the edges to its children has weight 0 while the other edge has weight 1.

I forgot about this restriction while solving D, a sample in which this makes any difference would have helped so much :(

»
2 years ago, hide # |
 
Vote: I like it +16 Vote: I do not like it

2024 is already ruined for me after this contest. 2025 will be my year!

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

great problems, enjoyed a lot! kudos to the author(s)

»
2 years ago, hide # |
Rev. 2  
Vote: I like it +127 Vote: I do not like it

Feedback on the round:

A: Fine easy problem.

B: Good problem conceptually. I personally would have preferred for the entire sentence "Note that there are no constraints on the sum of n over all test cases." to be bolded, which would have made the fact that O(n^2) solutions are not intended to pass more obvious.

C: Good problem; I've seen the general greedy strategy used as part of other problems before, but it serves reasonably well as a standalone C.

D: Nice problem; simple idea and the implementation isn't too bad.

E: I don't think this problem is objectively bad, but stylistically it isn't my favorite. Most of time time I spent solving it involved working out details rather than coming up with the general idea. Also, a (somewhat harder) version appeared as ARC 146 E (thanks to AC server for pointing this out).

F: Good problem. I prefer DS problems like this one where the data structures part can be handled mostly by copying a standard template, but writing the merge function itself requires a little more thought. Amusingly, I didn't come up with the idea for F1 before solving F2 and I didn't think about the flow idea given in the editorial while solving F2.

G: Great problem. This problem particularly improved my contest experience because it's the kind of problem where even if you don't end up at a solution, you can at least make reasonable progress throughout the time you have left in the round. In my case, I think I was very close to a solution, but unfortunately I hadn't finished working out all the edge cases or implementing the XOR hashing idea.

H: Didn't seriously attempt.

Aside from the fact that problem E had been used before (which empirically didn't seem to affect the standings much, if at all, and would have been hard to Google anyway), the round seemed very successful--the problems were interesting and the contest was prepared well (there seemed to be very few FSTs, there were minimal server issues during the round, and systesting started/the editorial was posted quickly after the end of the round). Thanks to the author and the coordinator!

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

Thank you for the contest.

Ended with positive delta, now starting with positive.

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

2300, recorded.

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

Really great contest enjoyed it altough solved till C but got me to specialist Nice

special thanks to the testers and coordinators for creating such an amazing contest

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

Wish I could have solved D and F1.

»
2 years ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

Awesome problems

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

@maomao90 Thank you for the great contest!! Enjoyed it a lot. Lots of DSA involved. LinkedList, Priority Queue, DP, Segment tree, Flow, Min Cut, Segment tree.

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

problem C is too greed!

»
2 years ago, hide # |
Rev. 4  
Vote: I like it -9 Vote: I do not like it

Bad contest.... AB are quite good, but D's conclusion is too hard to think(the implementation is easy, though). Also, C's greedy is hard to prove. The other problems are not bad, but there's no time for me to solve them as ABCD cost me the whole time.

And, why editorial isn't available now?

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

Tree LGM -> Three LGM

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

I keep getting WA3 in F1 using a segment tree. Can anyone please advise, what might be the problem? code here Thanks :)

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

Why H is only 2000?

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Great round