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

Привет, Codeforces!

В 12.05.2023 17:35 (Московское время) состоится Educational Codeforces Round 148 (Rated for Div. 2).

Продолжается серия образовательных раундов в рамках инициативы Harbour.Space University! Подробности о сотрудничестве Harbour.Space University и Codeforces можно прочитать в посте.

Этот раунд будет рейтинговым для участников с рейтингом менее 2100. Соревнование будет проводиться по немного расширенным правилам ICPC. Штраф за каждую неверную посылку до посылки, являющейся полным решением, равен 10 минутам. После окончания раунда будет период времени длительностью в 12 часов, в течение которого вы можете попробовать взломать абсолютно любое решение (в том числе свое). Причем исходный код будет предоставлен не только для чтения, но и для копирования.

Вам будет предложено 6 или 7 задач на 2 часа. Мы надеемся, что вам они покажутся интересными.

Задачи вместе со мной придумывали и готовили Адилбек adedalic Далабаев, Иван BledDest Андросов и Максим Neon Мещеряков. Также большое спасибо Михаилу MikeMirzayanov Мирзаянову за системы Polygon и Codeforces.

Удачи в раунде! Успешных решений!

Также от наших друзей и партнёров из Harbour.Space есть сообщение для вас:

Harbour.Space

Ваш путь к успеху начинается в Harbour.Space Bangkok

Привет, Codeforces!

Мы рады предложить 10 полных стипендии для изучения Computer Science и Data Science в Harbour.Space в кампусе Бангкока!

Приглашаем подать заявление в наш университет в Бангкоке, Таиланд, где мы предлагаем полную стипендию для квалифицированных участников.

В нашем университете яркое и инклюзивное сообщество, где у вас будет возможность учиться и сотрудничать с некоторыми из самых ярких умов в своей области, такими как единственный и неповторимый Майк MikeMirzayanov Мирзаянов. Кроме того, наш ультрасовременный университет предназначен для поддержки ваших успехов в учебе и в сфере личного роста.

Если вы хотите получить высшее образование, получить аккредитацию и расширить свой кругозор, эта возможность для вас! Как члены сообщества Codeforces, мы признаем ваш талант и стремление к решению задач. Вы станете отличным кандидатом для нашей программы.

Требования:

Обучение: 3 часа в день

За год обучения вы завершите 15 модулей (длительность каждого 3 недели). Ежедневная учебная нагрузка составляет 3 часа, плюс домашнее задание, которое нужно выполнить в свободное время.

Требования университета

  • CV
  • Аттестат об окончании старшей школы/диплом бакалавра
  • Знание английского языка
  • Medalist in any Programming competition is a plus!

Не забудьте подать заявку до 30го июня, 2023, чтобы иметь шанс получить стипендию и снизить плату за подачу заявления.

Подать заявку →

Мы с нетерпением ждем вас в нашем университете.

Всего наилучшего, The Harbour.Space Team

UPD: Разбор опубликован

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

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

Ready to get +DELTA (◠‿◠)

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

    I have seen you commenting things like "Fingers Crossed for +delta (◠‿◠)" on almost every blog but the last time you really participated in a contest is 6 months ago. Is contribution really the whole thing you came to Codeforces for?

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

      At least, I am willing to participate but because of some reasons I am not able to do so. So you better concentrate on your contests rather than checking mine.

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

awoo's round.

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

As a participant, give me a contribution.

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

As a cyan tester,I recommend you to see all problems.

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

I am new in codeforces lol hope

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

If someone Medalist in any programming competition that's why Harbour Space Team reduce some tuition fees for him?

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

Hope for the _Best_

See in person
»
11 месяцев назад, # |
  Проголосовать: нравится -26 Проголосовать: не нравится

Thank you very much adedalic, BledDest and Neon for the contest and MikeMirzayanov for the Codeforce and Polygon platform! I appreciate your work!

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

contribute ++

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

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

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

Hoping for a nice contest

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

It is my first codeforces contest, please say good luck to me.

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

I'm ready to get educated.

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

I hope everyone achieves great success.

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

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

crazy standing XD,but Why did more people pass E than D

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

    Ay the end — this was not true. Although i saw E getting more sollutions and went for it instead.

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

SPEEDFORCES ABC

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

bad round :dislike:

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

Editorial for problem C:- Link

How to solve D?

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

I really enjoyed this round. The dynamic programming idea behind E is so fun!!!

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

ABCforces

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

Shiit, needed 1 more second to submitttt

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

is E convolution?

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

    After dealing with all the math it ends up being something like the O(N*R) dp for calculating nCr on steroids.

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

      i tried to understand your code, i understood why we are using pref[k][i] = pref[k-1][i-1]+pref[k][i-1], but i have a silly doubt why the solution getting stored at 1 index more than the original index(eg: pref[1][k] at pref[2][k])?

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

        Yeah, I messed up something with the indexing and saw that as an easy fix. During a competition I don't really care about being exact in my indexing/naming.

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

    Apparently it can be solved using that within the time limit (comment by physics0523), but this is (probably) not the intended solution. There exists a much simpler and (imo) more beautiful solution using properties of the binomial coefficients and dp (and the fact that k is small).

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

    Dynamic programming. If you remember the recursive formula for the f(x, y) = f(x — 1, y — 1) + f(x — 1, y), then the solution is quiet obvious Let dp[i][j] be the solution for the problem find $$$b_j$$$ if k = i, then dp[i][j] = dp[i -1][j — 1] + dp[i][j — 1] Then its just simple optimisations.

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

    How long the code is! Nyaan must have written the template a long time ago ...

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

I got thought of the B and C, but I can never pass them... pity! hoping for your next contest!

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

Can someone explain how in problem B 6 2 15 22 12 10 13 11 got an output of 46 max I could calculate was 40

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

I think there should be an explanation to the sample test in task E

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

Solved A-E. But it seems that the number of accepted solutions of F is far less than it should be.

A: Let n be the length of string s, then we only need to check first floor(n/2) chars of s. If they are all the same, we can't get any another palindrome. Otherwise we can choose 2 different chars from them and swap them (and chars on the symmetric positions on the right half) to get another palindrome.

B: Sort the array and calculate the prefix-sum. Assume we use the 1-st operation for t times, we will remove 2t elements from the front and t elements from the back of the array. We can try all possible options of t from 0 to k to get the answer.

C: First we can remove all adjacent elements with equal value, and the contrast value will remain the same. Then we only need to remain local maximum and minimum elements of the array (including the first and the last), since if a < b < c or a > b > c we have |a-b|+|b-c|=|a-c|.

D: If k<=n, we can add values from 1 to k on different elements of the array. But if k>n, some values from 1 to k will be subtracted from the array. To make the numbers subtracted be as small as possible, the increments of each operation will be like this: 1, -2, 3, -4, 5, -6, ..., k-2, k-1, k (there are n or n-1 positive values on the back of this sequence, depending on the parity of k-n), then we need to subtract 1 from any values of the array for ceil((k-n)/2) times, and add inc=(k-2*ceil((k-n)/2)) values (from k-inc+1 to k) to different values of the array. To simulate this process, we need to sort the array, and add k+1-i to a[i] for 1<=i<=inc, and find the minimum of the array (we can do this fastly by pre-calculating prefix-minimum of a[i]-i and suffix-minimum of a[i]), then do the subtract operations on some maximum values of the array.

E: The prefix-sum of a[i]:

a[1], a[1]+a[2], a[1]+a[2]+a[3]...

The prefix-sum of the array above:

a[1], 2*a[1]+a[2], 3*a[1]+2*a[2]+a[3]... (which is b[i] when k=1)

The prefix-sum of the array above:

a[1], 3*a[1]+a[2], 6*a[1]+3*a[2]+a[3]... (which is b[i+1] when k=2)

The prefix-sum of the array above:

a[1], 4*a[1]+a[2], 10*a[1]+4*a[2]+a[3]... (which is b[i+2] when k=3)

By this pattern we can solve the problem in O(n*k) by calculating the prefix-sum for k+1 times.

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

wtf is D

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

I think problem E is interesting, even if I didn't solve D or E. Can anyone explain the idea of problem D? Thanks!

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

    First of all, if k <= n the solution is easy, so everything I will say is for k > n.

    If you perform an even number of operations on an element you are guaranteed to decrease some value from it, since for each number you add you subtract a bigger number right after, so if you are trying to increase a value (and therefore made an odd number of operations) it's really only the last number you add that is the "deciding factor".

    Knowing that, you should try to have the smallest number of your array, let's call it a(0), be added by K and a(1) by K-1, a(2) by K-2, ..., a(n) by K-n.

    If (K-n) is an even number you can do it, because for each of the operations before getting to k-n you can just do an even number of operations on each element you change and you are going to end with all elements being ready for an addition.

    Also, performing an addition and right after a subtraction, is going to result in decreasing the element by one, so you just have to add each (K-i) to each a(i) and then remove (K-n)/2, in total, from the elements of the resulting array, distributing it the best way to get the biggest minimum value.

    If (K-n) is odd you won't be able to increase every element of the array, because to do that you need an odd number of operations on each element, but at least one element will necessarily have an even number of operations on it, so the best you can do is make this element the biggest one, a(n), and not add anything to it (instead of decreasing it) then you can add each value from k-n+1 to k to each element from a(0) to a(n-1) and you are gonna have an even number of operations left. Then again, you will remove (K-n+1)/2 from the resulting array in the best way possible.

    If you want to solve D2 you do the same thing, but with some tricks to make it all faster, I can describe them if you want.

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

Can anyone share their solution for C? My approach was to find increasing/decreasing segements of the array and remove all elements of segment exacept endpoints, either my approach is wrong or i failed to implement it properly. Please someone tell how to solve.

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

Spent last 1 hour 54 minutes doing recursive dp . TLE with memo array and MLE with memo map . Some different idea involved in B ?

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

    just sliding window.

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

    Same hahaha!

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

      Cheers for wasting 2hrs optimizing recursion lol , Someday our recursion will be useful hopefully

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

        I tried it the first time with map + recursion and got TLE. Then, saw the constraints and realized it probably has a greedy solution in O(n). After that made some observations and got AC.

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

          i looked at greedy first , to find whether sum of two minimum was lesser than maximum . It was funny that it failed because of being non greedy for the moment and i could not make my mind to try something other than dp

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

    My main idea was to check for all combinations of including the first and last elements. I used prefix sum so that I don't have to calculate the sum for ranges every time. Check Here

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

Class 11 combinatorics revise karlo frandss

(Hint: Use (iv) to create a recurrence for b(n, k))

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

Nice contest! Incase you are stuck on Problem A, Problem B, Problem C. then you can check this video editorial link

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

I think arbitrary $$$MOD(1 \leq MOD \leq 10^9)$$$ would have been a better choice for problem E to cut convolution solution.

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

Given that Edu rounds weighs all problems equally, it doesn't feel right for there to be a 2-part problem in Edu round unless the two parts are extremely different in difficulty. In the context of today's contest problem D is essentially weighed double that of problems E/F, which clearly should not be the case.

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

10 minutes after contest, >20 hacks on D :)

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

Can someone plss explain solution of D

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

If anyone facing difficulty understanding D1, Please check Tourist's solution. It is very elegant and easy to understand.

solution link

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

We can use convolution to solve problem E.

\begin{aligned} b_i &= \sum_{j = 0}^i \binom{i — j + 1}{k} a_j \\ &= \sum_{j = 0}^i \frac{(i — j + 1)!}{k!(i — j + 1 — k)!} a_j \\ \Longrightarrow \sum_{n \geq 0} b_n x^n &= \frac{1}{k!} \sum_{n \geq 0} \sum_{j = 0}^n \frac{(n — j + 1)!}{(n — j + 1 — k)!} x^{n — j} a_j x^j \end{aligned}

We can take $$$f = \sum_{n \geq 0} a_n x^n$$$ and $$$g = \sum_{n \geq 0} \frac{(n + 1)!}{(n + 1 - k)!} x^n$$$ and $$$\frac{1}{k!}(f * g)$$$ is our desired polynomial. Since $$$n$$$ is huge $$$(n \leq 10^7)$$$, we might want to use fast convolution.

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

What's the hack for D?

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

    Anything with $$$n = 1$$$ that results in a negative answer, for example

    Input:
    1 1
    1
    4
    
    Output:
    -1
    
    • »
      »
      »
      11 месяцев назад, # ^ |
        Проголосовать: нравится +6 Проголосовать: не нравится

      Isn't -1 the expected output for this testcase?

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

        Yes it is, I guess you didn't understand my comment. The original commenter asked what test was used to hack probably 100+ submissions on D and I gave an example. The test isn't a directed hack to their solution (I don't know if their solution got hacked or not), it's just the test that I used to hack multiple solutions. The output I mentioned is the correct output, most incorrect solutions give 0 as the answer.

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

      nvm

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

      Thanks.

      But I still have no idea what was wrong with my case. Maybe, I have some silly mistake (((

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

        UPD:

        O! I've found test case:

        4 7

        1 1 1 1

        1 2 3 4 5 6 7

        Really stupid misprint in my solution

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

Whoever hacked my submission, I hope you have a bad day.

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

Solution of A problem New Pallindrome with logic

https://www.devcp.in/2023/05/ECR-148A.html

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

Solution of A New Pallindrome with logic and explanation

https://www.devcp.in/2023/05/ECR-148A.html

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

my submission for B

can someone tell me in which tc does this code fail.

Problem B.

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

    Your approach itself is wrong. You can't greedily choose whether to delete two min elements or one max element, because you don't know about values in entire array so it may be possible that you don't get the optimal answer finally, hence you can't take that decision just based on 2 mins and one max. This brings us to the solution of checking all possible ways to do the operations, but here dp won't be needed as some dependencies are there, like: 1.You will delete 1st two mins always before next two mins 2. You will delete first max always before 2nd max 3. You will always delete k elements

    This brings us to a sliding window protocol solution. At first delete last k elements and find the sum. Then at each iteration, delete two mins and add one max back to the sum and compare with max sum.

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

Was it intentional to not keep keep negative answers in test cases of D?

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

https://codeforces.com/contest/1832/submission/205606471

can someone tell me the problem with my code for c

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

    What if $$$lst[0]$$$ is $$$0$$$ ?

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

Why doesn't greedy method work for B?

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

I first misunderstood the statement, I thought that the order of operations did not matter( you could do +5 before +3 so basically could do operation j after i and i > j). Is there any way to solve this problem? I thought about it for about an hour but could not come up with anything.

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

    You can solve it using prefix sums and going through all ways.

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

      Could you elaborate? (to be specific, I thought that you could add -1, n , -2 and n — 1 to the same number in the array)

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

Almost all fu**ing educational rounds educate me not to give up in contest not cp

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

The difficulty gap between C and D problems in last 5-6 Div2 Educational rounds is too large imo. It's much more enjoyable to take part in an ordinary Div2 rounds.

Can't say I'll participate in these Educationals anymore.

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

how far is the Purple id ;)

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

Why it is unrated though my rating is still under 2100?

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

Editorial please

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

is system testing is proceded?

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

how cound D1 and D2 hacked this much ????

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

    I passed D2, but I got a TLE in D1, which is really frustrating. It really affects my experience.

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

Super strong pretests

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

Very weak pretests for D1 & D2 :( It's not just the negative answers, my submission FST'ed on a tc whose answer is +ve.

PS: I by mistake divided by 2 instead of n at someplace. After changing it, it's AC for D1&2. Frustrating.

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

From almost getting D2 to FSTing on D1, sigh!!

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

rating when

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

    I also want to know

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

    It always takes ages after Educational rounds. Might wanna check in like 6 hours or so, unfortunately :(

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

      8 hours now,exactly

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

        Ye it's 8 hours since hacking ended, but we had to wait like 6 hours after that to do the system testing and now we'll wait at least 6 more hours for rating. I agree that it's ridiculously slow — it's almost like someone is manually calculating rating changes in Win95 excel spreadsheet.

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

I've gotten Wa on 44 in D2 because of the corner case n=1.

It's really a nice problem, but I think it'll be better if the corner cases are included in examples or pretests. It's a part of problem for sure, but isn't it a little cruel for us participants?

Actually, in this round, not only me, but also many other participants are truly educated. As for me, I'll check if there exists a corner case before submitting. From this perspective,it's educational enough as an educational round, I think.

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

    For me, I will check the complexity of my code before the end of the competition.

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

    Well corner cases are different for everyone. When I solved D2 (after the contest ended) n=1 wasn't a problem for me. I don't think it is that cruel having this case, as it is quite logical. What IS cruel is NOT including corner cases in the test cases, for example the possibility of the answers to the queries to be negative numbers, which caused so many hacks in D1 and D2. So in my opinion, it is better to have them no matter how annoying they might be for individuals. It is more educational to come up with what is wrong with your solution during the round rather than after, when you are frustrated because of the hack.

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

ok, I pull up!!!

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

I solved E in $$$O(n * k^2)$$$ with polynomials. But I saw that a lot of guys solved it with a much simpler idea in $$$O(n * k)$$$. How to do that?

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

    We use the recursion :-

    $$${n \choose r} = {n - 1\choose r-1} + {n - 1\choose r}$$$

    Given:-

    $$$b_n = {n \choose k }a_1 + \dots + {1 \choose k}a_n $$$

    Let us write:-

    $$$b_n = B(n, k)$$$

    Now, observe that (use the {n \choose r} recursion to get this):-

    $$$B(n, r) = B(n-1, r) + B(n-1, r-1) + {1 \choose r}a_1$$$

    This can be solved using DP in O(nk). However, the final solution required some memory optimizations to get accepted.

    My Solution -> 205614318.

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

Solution of B Maximum sum solution with logic and explanation

https://www.devcp.in/2023/05/ecr-148b-maximum-sum-solution-in-cpp.html

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

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

    At this point I am convinced that they're trolling with rating updates on purpose. I think it takes NASA less time to launch a rocket then it takes for Mike and his crew to update ratings.

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

      As Mike said, they can update ratings at any moment. However, they don't do that because they try to find cheaters and remove them

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

    Same, but me waiting for the editorial*

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

When will the editorial be released ??

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

How to solve D?

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

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

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

As a person who needs contribution, please give me some.

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

I gained +74 delta! Good round.

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

Hello

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

@MikeMirzayanov I'm confused for rejudge system. in last round,my submission status is ac,but become ce after rejudge. at the same time,i submited using the same code,but it passed again

code in the game https://codeforces.com/contest/1832/my same code after rejude https://codeforces.com/contest/1832/submission/205814566

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

This contest was just amazing. Waoo :)

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

Candidate master!

Hello, Div.1! (Though it may send me back to expert.)

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

great round!

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

I saw few potential cheaters in this round and they are not skipped, is plag check done?

MikeMirzayanov

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

Ok

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

Why are the problems unavailable for this match? And the other ones as well..

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

Hello Codeforces,I just want to know why its always me who rating is been reduced due to same solutions and so on i just checked the submission of given id and i am sure that solution isnt the same please roll back my rating i been having tough time on codeforces this recent contest ..i request.

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

Got a plagiarism warning for problem A: solution 205553146 for the problem 1832A significantly coincides with solutions sriharsha_2000/205553146, akmalp/205556740.

I use a local environment. This is a coincidence and I can see many other submissions with similar approach (using set).

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

It took me some time to figure out the dp solution to problem E, and it was fun. I made a video editorial if anyone needs help, you can find it here