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

Автор enot110, история, 14 месяцев назад, По-русски

Привет!

Раунд проводится при поддержке киберспортивной команды cybercats. Команда была основана в октябре 2021 мной и subscriber.

Сейчас у нас состав по Dota 2, играет во втором дивизионе EEU DPC. Обязательно приходите поддержать нас на стримах и в комментариях!

В благодарность Codeforces и сообществу спортивного программирования мы решили провести этот раунд и разыграть 100 плюшевых киберкотиков!

Подарки получат первые 100 мест по результатам раунда.

Подписывайтесь на наши соцсети, чтобы следить за обновлениями:

   VK    telegram    youtube

Задачи подготовлены subscriber, isaf27, KAN, Catmoonlight, jdurie и BucketPotato.

В тестировании помогали enot110, izban, qwerty787788, MateoCV, ilyakrasnovv, blobugh, ak2006, Valters07, DiegoGarcia, Chaska, kzyKT, Dan4Life, FedeNQ, alysonNBS, petertromso и jojonicho.

UPD. Разбалловка 500 — 1000 — 1500 — (1500 — 750) — 2250 — 2500 — 3000 — 3500.

UPD. разбор тут

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

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

I have got negative delta in div1 or div1+div2 contests for 3 times (and dropped from master to CM twice), but I still decide to take part in next contest (and get another negative delta).

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

    Worst Contest I have Ever Seen!..

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

      Absolutely, only 7k people participated, the problems were too hard so that many did not even submit A

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

        I feel A and B were fine for their spot (considering it isn't a div-2, but a div-1 + div-2). C felt too hard for being C. D1 and D2 were cool problems and I really liked them, and I think they were a little easy for their position. Can't say anything about other problems since I didn't solve them.

        So which problems exactly do you feel were hard for their place? (apart from C, I agree with you on that one)

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

        cannot agree with you more.

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

      True

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

Div1 + Div2, but no Div2 tester.

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

You forgot to thank Mike MikeMirzayanov Mirzayanov for great systems Polygon and Codeforces

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

cypurr cats!

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

Hi Vlad, no Rocket League roster yet :p? Did you hit Diamond or higher :D?

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

    diamond 1, finally!

    no pro Rocket League roster yet, only the fan one :)

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

I might end up top1 in this contest

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

I think and hope the problems are easier than yesterday's #853

Spoiler

We also have 3 hours unlike yesterday where we had only 2 hours for that div1. Hope it's gonna be great and educative.

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

You know, I am something of a cybercat myself

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

Hello guys — I am new to codeforces. I just tried my first div 2 virtual contest and solved 2. Is it okay to participate in this one, or should I stick to div2/3/4 contests?

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

    Give all the contests except Div1. This contest has Div2 questions in the beginning so you can participate.

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

    Do participate in all contests. Even if ratings go down, it can be recovered in 2-3 good rounds.

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

To be really skilled at both gaming and cp. Orz

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

Wow, this is so cool 😄. Never thought professional gamers would sponsor a Codeforces Round. Pro at not only CP but gaming too!! I wish your team all the very best in all your future endeavours.

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

As a tester, I highly encourage you to read all the tasks!

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

I liked your old logo more :(

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

Hope this is my real CM promotion contest ):

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

This cat looks kinda sad

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

I guess the problem statements will not be short and clear and will include some story of the game they are promoting.

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

cute cat :)

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

How many problems can we expect in this round ?

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

I felt something like lol after testing.

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

The timing is not very friendly to Chinese participants, as they still have classes tomorrow.

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

    It should be obvious by now mate, Codeforces >>>>>>>>>> classes :)
    Best wishes for the round ! <3

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

Автокомментарий: текст был обновлен пользователем enot110 (предыдущая версия, новая версия, сравнить).

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

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

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

Pls no weak tests today.

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

so cute!

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

Wow, I saw this team in DPC standings, but had no clue someone known to me is in charge. Can you tell its story?

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

As a tester, i confirm the round is good :)

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

I hope after this round I will stop being a prisoner of the cyan

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

when there will be twitch streams ?

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

Can't take part today, but the problems look nice.

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

How to solve D1, D2?

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

    D1: You can do it using a simple O(nk) DP (define state dp[i][j] as the minimum time to do the ith task such that the other machine (the one which doesnt do the ith task) last did the jth task). Transitions will also be quite easy, you need to handle the case wherein (i-1)th task = ith task separately though.

    implementation: https://codeforces.com/contest/1799/submission/195167349

    D2: If you observe the transitions carefully you will notice that at each i, what happens is that we do a range sum update on some dp values from the dp[i — 1] table and set them to their corresponding values in dp[i] table, and a point update on one dp[i — 1] value and set it to its corresponding dp[i] value, so this can be done easily using a segment/fenwick tree.

    implementation (segtree): https://codeforces.com/contest/1799/submission/195178402

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

    I solved both D1 & D2 without segment tree or Fenwick. You can watch my video editorial if you are interested: https://youtu.be/oOyPQL16x1M

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

Yeeee, i created E of this round 2 years ago

https://www.codechef.com/FEB21C/problems/MEOW1234

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

I really liked the problems but the round was weird for me, I was able to solve D1 and D2 quite easily but I can't for the life of me figure out how to do C. Could anyone give me a hint?

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

    I tried my best and got WA on 4th pretest :'(

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

    I have a quite long solution for problem C although I don't know how to prove it yet: Firstly, create two pointers p1 ( set to 0 ) and p2 (set to n), then save all the strings to a map and then iterate through the map, then for each key in the map, if the frequency of that key is divisible by 2, then simply put the first appearance of the character in p1, the next one to p2, the next one to p1, etc until it ends. If the frequency of that key is odd, do the same process for the n-1 number and then break out of the map. At this time, there are 4 cases : 1. If the map is now completely empty, we can check for the constructed string and reverse version of it to output the larger one out. 2. if the map size is equal to 1, then put the last element in the map in the position string size/2 and printout the larger of the constructed string and its reverse version 3. If the map size is >= 3, then we can put the current element in position of p1 and the other element in the map inside the string in reversed order and output 4. If the map size is equal to 2, then we can put the remaining 1 element in the middle of the string and then put all the other inside it and output it .

    Code : https://codeforces.com/contest/1799/submission/195192191 ( sorry for the bad implementation )

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

    I agree, for me too C is harder than D. For me it just came down to considering three cases:

    1. Every frequency is even. Then the answer is just 'abccba'.

    2. Suppose that the smallest symbol whose frequency is odd is symbol 'f'. Then if all symbols greater than 'f 'are the same, then the answer is 'abcfffggfgggfffcba'.

    3. Otherwise, the answer is 'abcfffghijkffffcba'.

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

seems like it was div 1 only not div1+2

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

Dislike C and E lol

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

one of the best Div2B on codeforces

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

    Why? It’s straight forward to get a 2 which is true if you have more than 3 different elements. Otherwise just check if you can make a 2. Whats so good about it

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

Why problem C are usually harder than normal in div1+div2 rounds? I've consumed much time on it.

Ps: I've lost 50 points for forgot to change array size from 5000 to 300000 when submitting solution of D2, and lost 100 points for forgot to check whether ptr<0 when solving problem A. Why I perform badly on every div1+div2 rounds...

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

    When I started testing, C and D1 were not in the problemset and the order of other problems was A — B — F — E — D2 — G — H. Of course the standing page was funny, and current problemset is even much improvement. This is why I felt lol after testing.

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

    I agree that C was very troublesome to deal with (and I personally had multiple incorrect implementations of a correct idea). I think that kind of messy problem might appear in any kind of round and that it might just be smarter to skip it directly (tbh, after reading the statement, I could guess that I would most likely spend inf time on it).

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

Don't like ADEG, very boring problems.

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

In Problem D1, can we create a 3d dp array where the 1st one is for index, 2nd one is for the number of elements which are consecutively used by current CPU and 3rd one is for current CPU ?

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

How to solve hairy multiple case problems like C? I was on it for 2:00 hours of thinking different cases and got AC on 2:55

Was this problem kind of pain for everybody? or is it just me not thinking in a good way? Can div.1 contestants solve it easy and without pain thinking???

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

C and E are trash problem.

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

C is really tedious to solve. It’s almost like trial and error. The fact that it has so many submissions means there are tons of cheaters on this round

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

How to solve (prove) B?

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

    If there's exists some $$$i,j$$$ ($$$i \ne j) \quad a_i = 1 , a_j \ne 1$$$ then we cannot make all the elements equal. because for $$$a_i = 1$$$ you cannot change it. and if you attempt to make the other elements 1 then you are failed also because after making $$$n-1$$$ elements to 1 then you cannot make the last one same because it is now max of the array.

    But if you have an array of greater than 1 integers, then you can make all of elements 2 in at most $$$30n$$$ operation. the idea is whenever you found two distinct elements you can divide greater integer by smaller integer. so in this way you make array elements smaller and smaller till you make all elements equal to 2.

    Worst case scenario you have to divide 10^9 by 2. then it wouldn't take more than 30 operations (because $$$log(10^9)<30$$$)

  • »
    »
    14 месяцев назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится
    1. If you've got 1, array must contain 1s only: otherwise you can't make array maximum equal to 1.
    2. If there is no 1, let's divide non-minimal elements by minimal element. This will eventually make all numbers equal, as this algorithm does not create 1 and the array decreases on each step.
»
14 месяцев назад, # |
Rev. 2   Проголосовать: нравится +8 Проголосовать: не нравится

Seems like D1 timelimit was too tight, because my O(n * k) solution didn't pass 195188638

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

    No, it's just your solution have big hidden constant as you're using too much memory. Try to do it in $$$O(NK)$$$ time with linear memory.

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

      Well, time limit with constraints, where just creating an array, which stil fits in memory limit, has the same complexity as in author's solution but slows down the further solution, is a tight time limit

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

E is just a tedious implementation problem. I really enjoyed solving from A to D, but E just simply ruined all my mood.

Please send my thanks to whoever create such an atrocious problem E.

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

Is it only "Zero IQ" me who found C to be extremely hard? How to solve it :")

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

    Sol:

    Let's construct the optimal string in two parts (a left side and a right side which are respectively a prefix and suffix of the final string)

    In the first step we will keep the following invariant: left is the same string as right

    We consider the chars in lexicographical order

    While the current char occurs an even number of times it is clearly optimal to split it evenly on both sides (it is easy to get a contradiction as if you place more a to the left, then you would put some, say, b at the symmetrical position in the right side and you could get better by putting an a instead).

    Now we are either done, either facing a char C having odd count.

    As earlier, it is optimal to split the even part of the char equally on both sides (so if you have 5 a you will put aa on each side).

    (You can do a proof by contradiction exactly like earlier)

    There is now only one occurence of C

    Consider two cases

    1: you have one or less remaining chars greater than c

    2: you have more than one remaining chars greater than c

    Case 1:

    if C is the last char, you just put C as it's the only thing you can do

    else, it is basically analog to solving the case abbbb...bb and in this case the best answer is (by casework) to put a in the middle of the group of b

    Case 2:

    There are more chars so its similar to solving abbccdd... (you can compress adjacent equals chars to make them blocks)

    Here we can wlog assume that reading the string starting from the left side will give the lexicographical smallest string.

    Assume you don't place a right now, it will be suboptimal as you would add some b on the left and right side (if you add anything greater the string becomes >) and now if you add a on the left side, you can just swap a with the b to get something <= (same on the right side by symmetry).

    So you will add some c on both sides but what can make a better answer.

    So you should add a to the left. Now it is clearly optimal to sort the remaining chars.

    Indeed: we know that reading from the left side gives something strictly smaller than reading from the right side so we are now only interested in making the right as small as possible

    Code: 195196709

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

Constraints in D1 are toooo bad!

n*n*4 memory is not allowed while n*n*2 is allowed

and n*n*2 time is not allowed while n*n is allowed

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

    So do we need to tabulate the solution ?

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

    There's no need for 2D array in D1.

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

      Can you share how did you solved it ?

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

        Let dp[i] = the answer of the problem when consider on range [1, i]. dp[0]=0.

        First, let dp[i]=dp[i-1]+cold[a[i]] when a[i]!=a[i-1], or dp[i]=dp[i-1]+hot[a[i]] when a[i]==a[i-1]. That's the situation when we use same cpu for i-1 and i.

        Then let j<i-1, a[j]==a[i] and assume we use cpu1 for i and j, cpu2 for [i+1...j-1], we can get dp[i]=min(dp[i], dp[j+1] + cost(j+2, i-1) + hot[a[i]]) where cost(j+2, i-1) is the cost for range [j+2, i-1] if we use only one cpu (we can calculate them in O(n^2)), and for checking all valid j, we can solve D1 in O(n^2).

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

          Hey, your solution seems easy but i do not understand the cost() function. becuase i am confused with the first element of cost(). the first element of the $$$cost()$$$ function contributes $$$cold[j+1]$$$ or $$$hot[j+1]$$$?

          can you explain please.

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

            assume we use cpu 1 for j, cpu 2 for j+1, j+2, ... i-1, cpu 1 for i. So each k in [j+2, i-1] contribute hot[k] if a[k]==a[k-1].

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

              but i am asking for the cost of $$$j+1$$$. We are using cpu 2 for $$$j+1$$$? It will take some time to process the $$$j+1$$$ process. But will it take $$$cold[j+1]$$$ or $$$hot[j+1]$$$ ?

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

      Yeah, but if one person had n*n time solution, he got AC , but if someone has just extra factor of 2 , it got TLE , this does not seems fair!

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

        My solution for D1 ran for 46 ms, so even a 10* constant factor doesn't matter (if you're using c++).

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

          What is time complexity of your D1 solution

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

            O(n^2) of course

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

    I agree. Lost more than 450 points because of memory.........

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

    You can use the "hidden parameter" technique to only store the current layer of DP, reducing the memory consumption to O(n).

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

My solution for C (passed pretest but I can't prove it):

  1. Sort string s. Let ptr=0, L=0, R=n-1.

  2. If s[ptr]==s[ptr+1], we must put them on ans[L] and ans[R] in order to minimize t_max[L]. Repeat this while increasing ptr by 2, until we are done or we meet s[ptr]<s[ptr+1].

  3. In the second situation, we check if s[ptr+1]==max(s)==s[n-1]. If not, the answer (for the remained part of ans) is s[ptr+1...n-1] + s[ptr]. Otherwise, the remain part of s is something like "abb...bb", so the answer is 'b'*ceil(k/2) + 'a' + 'b'*floor(k/2), where k = count of remaining 'b'.

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

How to solve B? ;-;

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

Could we just stop making problem A too hard? Making problem A too hard will scare out most of the contestants, making number of participants too small and are quite unfair for all of real participants, making them very likely to drop rating.

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

    But it's completely trivial ._.

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

      Actually,you can let more pupil or specialist to test, and if any of them cannot finish this problem in 15 minutes, this problem should not appear as problem A.

      First, the description of problem A should be simple, can let all participants have idea what this problem is about. If they are confused, they just quit the contest.

      Also, the constraint of problem A should be very small to let brute force to pass. As I know from some of my friends, when they do a contest, they will see the constraint of problem A, if the constraint of problem A is more than 10^4, they just know this is a harsh contest and quit.

      In my opinion, Problem A should act as a "sign up" problem and should not have any difficulty.

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

        Plus plus, hxu10

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

        In my opinion, Problem A should act as a "sign up" problem and should not have any difficulty.

        So are you proposing to decrease amount of real problems in every contest by one?

        Heck, it's competitive programming after all, we are here to solve problems, not to write A+B in every single contest. IMHO, it's fine that today's A is not completely trivial, because that's A of combined round. It should be interesting (despite not hard) to solve for everybody. And there are different types of contests for newbies out here (div3 or even div4) where I don't care if A will be A+B or whatever.

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

          Also, I agree that there is a need for a way to "sign up" for a contest in order to avoid situation when people are reading problems and skipping the round. But let's just add corresponding button and not affect problems quality.

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

    If participants are scared by task A, I think they don't submit any solutions so their rating is not going to drop. However, as average rating is (almost?) constant, this means someone other with higher rating will have to fall, and that's sad)

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

    I am a newbie and I don't think it's hard it you think in the right direction, I immediately had the idea of using deque or set. I think the problem is not the difficulty but their inability to fight hard until they could solve the problem.

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

      Good for you for solving A so quick. However, many of the newbie are not lucky enough like you to think in the right direction. They are frighten by the problem description and just go away.

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

    I think today's A was really an easy A (compared to A requiring some number theory or some ideas, thus pushing beginners to guess the solution and submit random ideas).

    The only problem might be the statement which is a bit confusing if you read it too fast but I think that beginners don't try that hard to get AC in less than 10 minutes x)

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

    making them very likely to drop rating

    I don't think you'll lose any single point of rating because of 100 (or even 1000) grays who weren't able to comprehend A.

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

      If 100 user did not attend the contest, that is true. But 1000 user did not attend, that will be different.
      Actually, there are at least 4000 users who did not attend, let us see what is the difference.

      In round 854, 7800 rated users, if you are rank 1000, your performance is 1851.

      In TypeDB Forces 2023, 11000 rated users, if you are rank 1000, your performance 1958.

      That's totally a 108 performance difference. Usually, every 4 performance change will cause 1 rating change, which means that will cause 26 rating change.

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

        I'm sure this difference is caused by higher rated users who didn't attend (most likely from objective reasons) and not by hundreds (or even thousands) of grays who was scared by A. Because if we are talking about milestone of top 1000 which you mentioned in your comment — it's very unlikely that many grays in the bottom of standings will really uprise the rating of top-1000 as top-1000 scorers are rated much higher then gray (on average) and grays below them don't affect their expected place much.

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

Anyone enjoyed the number of sample tests?

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

    Absolutely! And even more their coverage. I was about to start writing wrong solution on C and closer look on pretests really saved my time.

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

    It's good that you add test cases. It will be better if you can make statements more clear.

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

A-G are all very boring and disgusting.

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

Why the aim of TL=1s? Seems tighter than usual and I hesitated to implement >100ms (like 1e8 steps) solution.

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

Nice to see strong pretests :P

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

could someone please tell the logic of b question

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

Greedyforces

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

Автокомментарий: текст был обновлен пользователем enot110 (предыдущая версия, новая версия, сравнить).

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

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

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

this round be like...

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

Why is F so easy?

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

Why are constraints in G so low? I have $$$O(n^2)$$$ solution and it can be optimized to $$$O(nlog^2n)$$$ with FFT

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

I accidentally solved F in O(n log n) despite N = 5000, though I feel that giving N = 2e5 would make a more interesting problem.

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

    I wanted to make subtask with bigger $$$n$$$ and I noticed such funny solution: in the $$$O(n^2)$$$ solution we can just make ternary search by one of parameters because the function is convex (don't know how to prove, just made a stress test).

    I think there are many approaches to make $$$o(n^2)$$$ solution, but we noticed that the problem is enough hard for some reason, so decided not to make the subtask.

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

F is solveable by simply using the same solution of https://codeforces.com/problemset/problem/739/E.

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

out of 21K participants only 7K are rated for them, just implement the atcoder system already

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

Why is this round Div.1? It is definitely not hard enough.

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

wow, very fast editorial, thanks

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

If only 2 more minutes were left, I could've solved C. Well glad that at least my idea was correct..

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

D1 :( :(

long long int dp[5001][5001][3]; gave MLE long long int dp[5001][5001][2]; got AC;

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

Why was this contest this difficult the B problem ripped me apart *_*

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

So low constraint in E led to me implementing a total atrocity of a 5-dimensional dp that works in general case (i.e. arbitrary set of initial cells). After coding it for ~45 minutes it was ~2 times too slow when implemented in $$$O(n^5)$$$, so I needed another ~45 minutes to optimize it to $$$O(n^4)$$$ and then it got WA, so I spent another 30 minutes to write from scratch another solution that works for 2 cities totalling 2 hours for E. I also misread D thinking we got nonconstant number of CPUs and did not finish G on time. My worst performance in a very long time xD (sry for wrong choice of words before the edit xd)

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

Problem D is a harder version of 1479B2 - Painting the Array II. I actually resorted to copying ecnerwala's solution to that problem (which generalizes easily) because I'm really bad with this type of problem.

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

    I remembered the greedy approach to this problem and used a similar idea where we are assigning the program to the CPU whose latest program is occurring farther in the future than the other. But it gives wrong answer. submission : 195166846

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

I hate C.
Spent 2 hours and found out it is so fxxking easy.

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

    can u give me a hint ?

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

      try to build a string with min lex so that the leftover pieces can form a reverse string with lower or equal lex. In this case you can make sure the string you build will be selected as answer, and still some implement ation details need to be worked with.
      Seriously, It was way past my sleeping time when I worked on this problem.what are your excuses, down voters?

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

We only recently had a ton of community discussion on how unfun it is for participants to express nonconstructive negative feedback only for this comments section to be flooded with it for not much of a reason ._.

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

Before systest: NO... I'm in 101st place and I had been resubmitted 951ms E... good bye my cat...
Now: Let's GO!!! I'm in 99th!!! Hello, my cat!!!
upd: Sorry I was just lucky, got uphack on E...

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

Can anyone tell why my code is failing for Problem D1 as I have declared long long everywhere still ans is coming wrong ?

It is giving correct ans in my IDE but failing when I am submitting Submission Link — https://codeforces.com/contest/1799/submission/195194098

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

Got stuck in A don't know why!!!!

Got the idea of B in 10 mins and implemented the same, but I didn't get the idea due to pressure that I have to change int to double for both the variables (numerator and denominator) to use ceil and wasn't getting answers as I was only doubling numerator.

Figured out and saw the contest ended:(((((. Submitted after the contest and it got AC! Such a bad day!!

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

I submitted the same code again and I got Accepted

195196340 Accepted submission

195171454 TLE submission

There is a way to rejudge the solution again? KAN, subscriber, isaf27, Catmoonlight, jdurie, BucketPotato, MikeMirzayanov

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

I once saw a website for predicting the difficulty of the problems.

Is it still there?

Link?

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

I have submitted the same code again and i got Accepted

If there is a way to rejudge the solution again?

195196340 Accepted submission

195171454 TLE submission

subscriber, isaf27, KAN, Catmoonlight, jdurie, BucketPotato, MikeMirzayanov

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

In Problem B I have a question Can we solve in this way if the number does not contain one then check whelther dividing the no by a[i] with a[j] the value of a[i] will result in two or not If the result is two then we can convert all the number by selecting the ind which get converted to two and the remaining index one by one except the ind index Please answer this Thank You

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

    No. What if there are only 2 numbers, a 3 and a 9? In this case, we divide 9 by 3 and then the array will have both elements with the same value.

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

Why F is easier than C?

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

Did anyone else solve C recursively?

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

Hi guys you can check video editorial for

Problem A , Problem B, Problem C, Problem D here — https://youtu.be/AGIrdT_cQuY

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

Can someone please point me where my solution is leaking memory for Problem B ? — Solution

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

As long as I have more than 2 hours to solve, its good :D

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

Maybe the easiest G of all time.it's much easier than E, even easier than C

And E is not such a interesting problem. you may get the solution in 10 mins and code for an hour.

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

Dear sir, MikeMirzayanov

I recently got message from system that my solution 195163597 is same as others, several names were there. But I did not copied from anyone. You can see I was getting MLE in my initial verdict, then TLE and WA. My initial logic was making all elements 2, which I was trying for atleast 45 min. After getting so many wrong verdict I removed all my code and started again.

I removed all my template in order to not get any TLE( as earlier I have suffered TLE because of my template ), and wrote the basic logic divide by minimum every time, which unfortunately came very late. The question logic is common for everyone. It does not mean that everyone have shared the code. Please correct your plag checker.

I know it was mistake but we who do not cheat and give a lot of time we get plag, just like other cheaters hurts. Please look into this.

Please correct it and improve your plag checker system, and thanks for such great platform for CP

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

How can I get my cat? haven't received any message yet :(

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

Dear MikeMirzayanov

I received a message from the system that my solution is similar to unordered_map's solution. But only the input part matches and the process of calculating the dp table is different.

Also, problem D1 is similar(the definition of the dp table is exactly the same) to the past problem in KOI(Korean Olympiad of Informatics), which is well-known in Korea. Both I and unordered_map have solved it. So, we were able to solve D1 without copying the code. It seems that it will be faster to implement it alone than to search for the solution code.

I think the system is detecting coincidences only in the LCS of two codes. Please correct this.

My submission : 195156487

Skipped submission : 195164678