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

Автор 300iq, 5 лет назад, перевод, По-русски

Привет, Codeforces!

Мы приглашаем вас поучаствовать в Good Bye 2021, который пройдет в 29.12.2021 18:35 (Московское время). У вас будет 2 часа на решение задач. Раунд рейтинговый для участников обоих дивизионов.

Задачи были подготовлены 300iq с помощью потрясающих координаторов KAN и 74TrAkToR.

Мы благодарим всех тестеров, без которых этот раунд бы не состоялся: gamegame, thenymphsofdelphi, ko_osaga, malachi_toney_goat, Ashishgup, izban, prabowo, 74TrAkToR, Devil, manish.17, taran_1407, minhcool, AlFlen, Utkarsh.25dec, NemanjaSo2005, wxhtzdy, ajit, mnaeraxr, Scrubpai, YashDwivedi, eatmore!

И, конечно, спасибо MikeMirzayanov за потрясающе платформы Codeforces и Polygon.

Этот раунд проходит при поддержке компании NEAR, которую основал бывший участник соревнований AlexSkidanov. В команде, разрабатывающей NEAR, работают многие известные участники сообщества, включая дважды чемпиона мира ICPC eatmore и победителя GCJ и TCO Egor.

В раунде предусмотрены призы для участников, которые займут первые 255 мест. Победитель раунда получит Ⓝ128, участники на втором и третьем месте по Ⓝ64, участники на следующих четырех позициях по Ⓝ32, и т...

NEAR — это современный протокол блокчейна. В прошлом месяце на NEAR запустился проект CrowdForces, который позволяет участникам первого дивизиона получать NEAR за создание простых головоломок. За регистрацию на CrowdForces вы сразу получите 1 NEAR. Подробности здесь: https://nearcrowd.com/crowdforces

Если вы не в первом дивизионе — не беда! Присоединяйтесь к открытому для всех хакатону Metabuild с призовым фондом в $1M. Подробности: https://metabuild.devpost.com/

Надеемся, что вам понравятся задачи! Удачи!

Поздравляем победителей!

  1. tourist
  2. ecnerwala
  3. ksun48
  4. Radewoosh
  5. Benq

UPD: Разбор

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

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

woah 300iq is back

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

What is Ⓝ...?

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

As I tester I can confirm that round has some interesting problems. I hope that you will enjoy them and the last round of 2021 (I think).

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

N64

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

I noticed that the hackathon is open to "Individuals who are at least the age of majority where they reside as of the time of entry." Does this mean that individuals who are minors cannot participate?

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

Is it rated?

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

Why only 2h :(

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

omg 300iq orz

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

Best present.

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

We would like to thank all the testers, who made this round possible. They will be added to this blog later.

Translation: testing will commence soon.

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

Unusual time alert missing!!!

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

What if NEAR bankrupts ? Are the winners going to win money ?

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

How many problems will be there in this round? 300iq

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

Happy new year ~ ovo

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

Such as a great year for me! Best of luck for everyone.

happy coding :)

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

Me during contests

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

3 contest in 3 days.For me its overwhelming !!

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

How many problems? and Why only 2 hours, Good Bye 2020 and Good Bye 2019 was 3 hours!

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

i heard Ⓝ1 worth about $13.5, so the total prize is Ⓝ1024 ~ $13800

that's a really big amout of money(to me)... i cannot imagine

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

Good Bye 2020
edit : why so many downvotes , i just pasted the link of last year's contest to help people searching , wanting to solve it

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

Weren't you guys making some kind of CP solving AI? What's up with this switch to blockchain?

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

All the best everyone :) Hope I reach pupil in this contest ! Wish me best of luck

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

How many problems will be there? 300iq

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

Last One

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

Can we know how many problem there will be yet?

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

I wish my rate became 2021 but I'm still living in 10th century

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

score distribution pls, i really wanna do some useless analytics five minutes before contest

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

Score distribution and problem count to be posted after the contest. Should add a new strategic element.

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

Is this round only for those who don't care about the number of problems and their score distribution?

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

The suspense to the score distribution is as much as the suspense as to how 2022 will turn out to be.

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

I have seen many Oops! today. Maybe it's good to participate from the mirrors:
m1 m2 m3

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

The comment is hidden because of too negative feedback, click here to view it

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

Looking forward to receiving 1 Near coin! Might be able to afford a lunch.

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

WA3 in problem C is a nightmare

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

2022 ? yesterday was 2019:"

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

i feel d is easier than b and c :/

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

    How to solve D?

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

      How to solve C ?

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

      If there exists any bad $$$r$$$ for a given $$$l$$$, there will always exist some bad $$$r$$$ that is at most $$$l + 2$$$ (or at least $$$l + 9$$$ since I didn't have the guts to submit with $$$l + 2$$$). As for how you prove this I have no clue, I couldn't generate a counter-case so I submitted lol (inb4 pretests are weak and I FST).

      The intuition mostly arises from any two adjacent values $$$\lt x$$$ being bad. If that isn't the case then they must alternate between $$$\lt x$$$ and $$$\geq x$$$, so if the whole range satisfies some prefix satisfies or something like that, I tried generating a two really small ends case but couldn't come up with anything that took more than $$$3$$$ so I just guessed it at that point.

      Now you have a number of ranges of the form $$$[l, r]$$$ that must be covered with at least one point, so just use the standard idea — sort them by $$$r$$$, skip them if $$$l \geq \text {last removed}$$$, otherwise remove it and set $$$\text {last removed} = r$$$ (last removable point to make as many ranges as possible skippable).

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

        Ohh pretty cool. If for any $$$l$$$, bad $$$r$$$ <= $$$l + 2$$$, then this can be solved using simple dp as we don't have to consider a lot of cases.

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

          DP isn't even necesary if that fact holds actually. If you can identify all such ranges, it becomes a problem of choosing the minimum number of points that cover all ranges. This can be solved by processing the ranges in increasing order of their right points and greedily removing a point only when we reach the end of an uncovered range.

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

        The proof is that every sequence can be split into chunks of 2 and 3, and the overall mean is a weighted average of these chunks.

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

        If there exists any bad r for a given l, there will always exist some bad r that is at most l+2 (or at least l+9 since I didn't have the guts to submit with l+2).

        I was able to solve this problem without the above observationl(actually, I was not able to come up with this idea at first lol). Observe that sum of a segment $$$[l,r]$$$ is negative iff $$$pfx[r] - x \times r \lt pfx[l-1] - x \times (l-1)$$$. Therefore, for every $$$j$$$ we need to find the largest $$$i( \lt j - 1)$$$ such that $$$arr[j] \lt arr[i]$$$, where $$$arr[k] = pfx[k] - x*k$$$. This can be done by modifying the standard method to find the nearest smallest element in the array $$$arr$$$.

        Submission : 141149652
        But this solution is an overkill if you have got the above observation.

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

      Subtract $$$x$$$ from everything, now it's asking for segments such that every subsegment has a non-negative sum. You can find it by checking the leftmost $$$l$$$ such that $$$[l,i]$$$ has a non-negative sum and then doing a simple DP.

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

      Greedy,

      an important observation i found is if all subarrays in triplet $$$(a1,a2,a3)$$$ satisfies the given condition, if $$$(a3,a4)$$$ satisfies the condition then $$$(a1,a2,a3,a4)$$$ will also satisfy the condition.

      so maintain a variable $$$last$$$ which holds the last unselected index(initially $$$last=0$$$)

      so start from $$$i=2$$$ and first check for subarray $$$[i-1,i]$$$ ,then $$$[i-2,i-1,i](if possible) $$$,if it doesnt satisfy the condition , unselect i ,and repeat this process.

      sorry for my bad english.

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

      Initially we have:

      a(l)+a(l+1)+…+a(r)≥x⋅(r−l+1) -> a(l)+a(l+1)+…+a(r) — x⋅(r−l+1)≥0

      We can reagente to (a(l)-x)+(a(l+1)-x)+…+(a(r)-x)≥0, so we can do a[i]-= x and only care if a(l)+a(l+1)+…+a(r)≥0.

      Now we can use prefix sum to write this as ps[r] -ps[l-1]≥0

      The idea now is for each i, you will not select i if some ps[r] — ps[j] < 0, with (the last index not selected) < j < r-1

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

Can someone link the recent opencup problem that was H but instead of counting maximize the size of the set? I forgot which opencup it was.

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

How to solve E?

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

    The resulting string s will be a prefix of t with the first character difference after less than the corresponding character in that position in t. We can just iterate this and use a segtree or something to maintain the minimum number of operations needed to transform to that prefix. Time is $$$O(n * 26 * logN)$$$.

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

    if there is any transformation of s in mimimum moves such that new string is smaller than t

    then that s will be converted to below transformation —

    (t[0]+t[1]+...+t[i-1]+c+X)

    where c < t[i]

    and X contains remaining characters of s.

    Iteratively, we can find moves required to transform s into all of the strings of above type and return minimum of all.

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

Solved only one problem, I want to die

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

How to solve C?

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

I tried finding the largest size of subsequence that is an AP sequence for C(then subtracting from N to get ans) but its TLE. Can anyone explain their solution?

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

WA on B was the most irritating

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

I haven't proven it yet, but for problem E was it enough to try to find the nearest character in s equal to the current one we are evaluating (iterating through the target string t)? To update the answer, then we just find a smaller character instead. The idea would be to do this with Segment tree / BIT,

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

Was not able to do the kindergarten math of C :/

And noticed after contest that it is also doable with doubles instead of fractions which is even simpler.

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

due to lags in the last 10 seconds, I didn't have time to send problem H (let's see if it works later...)

upd. no :)

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

Did anyone else think there were some server issues during the contest? It took me around 30 minutes to just get to read the problem statement of B, not even the lightweight sites were loading for me. Wanted to see if this was a server issue or a local one, because other sites were loading...

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

Today, i literally understood the meaning of laxicographically smaller.

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

Happy new year everyone <3

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

In whole contest the codeforces not worked properly,uneccesrily buffering . : (

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

One thing you should learn:

  • For every div.1+2, H is easier than F
»
5 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

Any one felt server is slow?While contest

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

What's the idea behind B?

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

    You just had to take the longest nonincreasing prefix of the string and mirror it.

    The only corner case is when the first two characters of the string are equal, in this case just take the first character and mirror it, as all possible generated strings are guaranteed to be lexicographically bigger that it.

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

      This problem B derailed my contest. Seeing the number of successful submissions made by the others, I had a feeling that I was just missing something obvious. In the end I got some sort of an overcomplicated mix of greedy and DP (keep increasing 'k' as long as the new string becomes lexicographically smaller than the previous one and use DP for doing fast amortized O(1) comparisons of these strings). Unfortunately I was just a few seconds too late to submit it during the contest time and got interrupted by the "end of contest" banner. Okay, no luck getting back to blue in 2021, but hopefully 2022 will be better.

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

Short statements, really interesting problems, and good distribution. Thanks, 300iq!!

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

Are you aware that a problem very similar to H (max clique instead of number of all cliques) was on an OpenCup on 5th December ;d?

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

can somebody explain me this

code actual

141111062 this is my submission

when i run the code in custom invocation (top right bar on codeforces) the execution time is 3478
while if i just comment the if condition

like this

the execution time is just 452
why????

in case someone is intereted in test case
»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

any idea for E ???

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

    Greedy. Iterate through the string $$$t$$$. For each position, we either find the closest character in $$$s$$$ that is strictly smaller than the current one we are evaluating on $$$t$$$, or we just find the closest equal character and move on. The number of swaps required to properly position each character we pick is $$$pos + sum(pos + 1, n) - i$$$, where $$$pos$$$ is the position of the character in $$$s$$$, $$$i$$$ is the current index of $$$t$$$ and $$$sum(pos + 1, n)$$$ is the number of characters previously taken that are on the right of $$$pos$$$. Code : https://codeforces.me/contest/1616/submission/141130793

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

Haha, I just bruteforced my way through C and prayed that it will pass =) 141117223

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

Can anyone please explain how we can tackle E? I read the comments above but still have no idea

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

Is D solvable using segment tree?

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

    It is I believe. Everule solved it using segment trees (141109186) in contest though I don't know what it does as I cannot comprehend how his brain works.

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

      First we subtract $$$x$$$ from all elements, and now we need all subarrays of more than one element to have non-negative sum.

      I calculate the minimum $$$lim_i$$$ such that $$$[i \ldots lim_i]$$$ is an invalid range. For that let $$$p_k$$$ be the sum of the first $$$k$$$ elements. Notice that $$$p_i \le p_{i+2} \le p_{i+4}$$$ for the range $$$[i \ldots i+4]$$$ to be valid, so the value of $$$p_i$$$ becomes irrelevant after a certain range, in which case the maximum range is the same as for $$$i + 1$$$. If it becomes invalid earlier, then you can do quick brute force on small subarray.

      Then I just iterate over where the next removed element is, as element $$$i$$$ being closed means that there is some element before $$$lim_{i+1}$$$ that is closed, and we take the minimum dp value among those. You could also probably do $$$O(n)$$$ for this but I didn't think that much.

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

    I solved it using segment tree. First of all, we need to ignore an element from a subarray $$$[l, r]$$$ only if $$$ps(r) - x \cdot r \lt ps(l - 1) - x \cdot(l - 1)$$$. I call such subarrays "invalid subarrays". Note that $$$ps(x)$$$ here means prefix sum upto index $$$x$$$ ($$$1$$$-indexed).

    Say $$$F(i) = ps(i) - x \cdot i$$$. First, I precompute all $$$F(i)$$$ and store it in an array $$$V$$$. Now for any invalid subarray to end at index $$$r$$$, we need atleast 1 $$$l$$$ such that $$$F(l - 1) \gt F(r)$$$.

    We maintain a segment tree where index $$$i$$$ stores the largest $$$l$$$ such that $$$V_i$$$ is the largest value $$$\lt F(l - 1)$$$.

    In this way, while iterating over the array and updating and querying the segment tree, we can find out for every invalid subarray ending at index $$$r$$$, the largest starting point $$$l$$$.

    Once we have all $$$r$$$ and corresponding $$$l$$$ values, we can greedily choose what indices to not pick so that we have to (not pick) the minimum amount of elements.

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

Stupid problem F. A $$$\mathcal O(m^{3.5})$$$ solution is so obvious that I think there will be testcases to let it TLE. but everyone's naive Gaussian elimination implementation passed F in 31ms.

It's like, a simple tripartite graph with $$$9 + 9 + 9$$$ vertices and $$$3 \cdot 9 \cdot 9$$$ edges, and $$$9^3 = 729$$$ triangles, can let my solution spend 280ms in naively eliminating the linear system. But you didn't put any of similar graphs into the testcases.

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

Can anyone please tell me the mistake in this code for problem C

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

It seems for E, you can just copy and paste this , modify it a little and run binary search to get K. Unfortunately, I was unaware of it and coded a solution from scratch... RIP rating

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

Hi, This contest has a lot of traps (eg. Problem B, C). May I ask that how do you all do testings other than stress testing to find out the wrong proof that we have made? I am very often stuck in these kinds of situations where my solution is mostly correct but due to tricky edge cases or wrong assumptions (for eg my problem C) that I could,t find out I was a mistake. I wish that I could get some help in facing these situations because I quite often faces these issues. Sorry for the bad english. Thank you very much.

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

I am so sad. After I solving the Problem C I am nearly 70th, But after I solving the Problem D I am nearly 700th.

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

    I use a dp to solve the Problem but I think it is too hard. So I use greedy and pass the pretest suprisely in the end. It takes me nearly 1h. Is there anyone have an easier solution? Many thanks.

    My stupid greedy

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

      The first part of my solution is similar to yours: subtract $$$x$$$ to all the elements of $$$a_i$$$ so the problem becomes make range sums non-negative.

      Then, we use the following greedy algorithm:

      Iterate from $$$i=1$$$ to $$$i=N$$$, let us assume that $$$j$$$ is the maximum index smaller than $$$i$$$ such that $$$a_j$$$ is not selected. Then, if there exist any $$$k$$$ where $$$j \lt k \lt i$$$ and $$$\sum_{x=k}^i a_x \lt 0$$$, we can delete $$$i$$$.

      To implement this, we can store the prefix sums of $$$a_i$$$ and keep track of the maximum prefix sum when we iterate from $$$i=1$$$ to $$$i=N$$$.

      You can see my submission here: 141100821

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

When will ratings be updated?

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

Codeforces is taking longer time than usual to reflect the rating changes :(

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

Please add tutorial, looking forward to read approaches for D and E problems

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

what is error in my solution for problem b my solution

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

When will ratings be updated??

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

Can someone find the mistake in my Problem-C solution?? link to my solution. https://codeforces.me/contest/1616/submission/141148146

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

What is error in my solution for problem C . It is failing in 7th testcase.

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

When will the rating be updated?

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

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

Editorial of this contest is published https://codeforces.me/blog/entry/98501

somehow they didn't linked it to this post

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

In problem C,7th testcase was not included in system testing!!

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

Anyone else waiting for rating change to see that beautiful purple color of candidate master

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

Can someone please clarify why the 7th test case was not included in system testing for problem C ?

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

Please tell me how to get the reward of this competition

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

Hi, my solution for problem 1616B (141080537) and the solution ti21_phnam (141107393) was found to be too similar by the system. We believe that there is nothing similar in them, except for the title, but this is a comment. Can the authors of the round or the admins deal with this situation?

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

Yet another young LGM in China ,He_Ren orz.

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

And where did you guys take DIV 3 and Div 4 contests? Not all of us are in the elite league consider!!!

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

    Do you realize that beginners get more resources than anyone else? You get more contests, more tutorials, everything. And yet you demand more. Be happy with what you get. Div 2 contests are completely suitable for you. Don't be so entitled to expect everything to be tailor-made for you.

    Further, the last Div. 3 was a whopping 10 days ago. That's a normal gap.

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

      He is not wrong tho. You guys even participate in div3. Solving questions in like mins or so and When we get stuck, (and check the leaderboard by mistake), you guys have already finished the contest. It demotivates the shit out of us.

      Talking about div2, Sometimes it is difficult to crack even A. But you guys, make it look so easy that anyone below you, if asks for something(like the comment you replied to), You guys treat it like its worth nothing. -is-this-fft-

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

        I think if you get demotivated by the existence of people better than you then it is hard to accomplish anything in life; Codeforces should not take such feelings into account.

        When I started, there was no such thing as Div 3. And people managed to improve just fine. The whole existence of Div 3 is IMO a big favor.

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

Wrong solution marked correct My solution of the problem C has been marked as AC in the contest. AC SOLUTION However this solution is incorrect possibly due to floating point precision. On trying to resubmit the problem now it's giving WA on test 7, however in the contest there were only 5 tests and the solution was able to pass all those tests. Would you please revaluate the solutions? @thenymphsofdelphi @74TrAkToR @gamegame @300iq

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

Let's use the new feature!

Problem A:

liked:
disliked:
neutral:

Problem B:

liked:
disliked:
neutral:

Problem C:

liked:
disliked:
neutral:

Problem D:

liked:
disliked:
neutral:

Problem E:

liked:
disliked:
neutral:

Problem F:

liked:
disliked:
neutral:

Problem G:

liked:
disliked:
neutral:

Problem H:

liked:
disliked:
neutral:

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

Hi! I got rk12 in the goodbye round. However, I only received Ⓝ0.1 rather than Ⓝ16. I guess it's because I changed my handle after the contest. What should I do now?