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

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

Hi everyone!

It's been a while since I set problems for Codeforces competitions, so I hope that you had sufficient opportunity to rest before dealing with my problems again. Oh, no-no, there's nothing to worry about! Probably! I promise!

jeroenodb and adamant (that's me!) are happy to invite you to Codeforces Round 869 (Div. 1) and Codeforces Round 869 (Div. 2) which are going to take place at Apr/29/2023 17:35 (Moscow time). Participants with a rating strictly lower than 1900 will participate in Division 2, while participants with a rating of at least 1900 will participate in Division 1.

All the problems are prepared by us, and we would like to thank:

In both divisions, you will have 2 hours and 15 minutes to solve 6 problems.

Score distribution in both divisions: 500 — 1000 — 1250 — 2000 — 2500 — 3000.

Good luck and have fun!

The editorial is out.

Congratulations to the winners!

Div. 1:

  1. A_G
  2. tourist
  3. ecnerwala
  4. Rewinding
  5. QAQAutoMaton

Div. 2:

  1. RGB_ICPC4
  2. elizazh
  3. lintd
  4. -LAP-
  5. STOC
  • Проголосовать: нравится
  • +318
  • Проголосовать: не нравится

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

As a tester, I enjoyed testing the round. Good luck to all the participants!

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

As a tester/problem discusser, I hope the participants like the problems as much as I did.

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

As a back-to-back tester, I really enjoyed testing this round! very interesting problems )

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

As a tester, I saw a twist on one of the problems that I have never seen before!

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

    Now that the contest has ended, I am curious to what you were referring to.

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

      The custom prepared program for Toys is something I have never seen before.

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

        Yeah this is something new for a codeforces contest. However, I witnessed something similar at IEEEXtreme 14.0 about 3 years ago at this problem. They made an entire downloadable game and it strangely includes all testcases. Not sure if you can still download and play it though.

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

As a tester, Best contest I have ever seen!

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

writing announcement 4 days before the round -> good round

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

As a tester, I regret not doing this round officially.

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

неееееееееет

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

As an early tester, I'm pretty sure I haven't seen the newer problems but I'm sure they'll be interesting.

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

As a tester the round has cute problems :DD

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

    before contest, I read this comment, I felt it was sarcastic based on your DP. My prediction was right xD.

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

As a participant I won't participate

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

As a participant, I will try my best to participate in the contest. I hope I will give my best.

And also best of luck everyone.

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

Holy hell, so many testers!

Hope this round is cool

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

Is it rated for everyone?

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

    Yes. Everyone with < 1900 rating can patricipate in the Div. 2 rated and everyone with rating >= 1900 can participate in the Div. 1 rated.

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

As a Div 3 tester, this round will be interesting and challenging for Div 3 participants. Good luck and hope you enjoy the round! :)

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

    hi fellow friend. how so good tester. teach me your ways :pleading_face:

    As a participant, I will participate. Wish everyone the best of luck and positive delta!

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

As a first-time Div.1 participant, I hope that I stay at Div.1.

UPD: Mission accomplished somehow.

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

Very early score distributions indeed!! ♥

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

Clashes with LeetCode Biweekly 103

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

:)

Div.1 and Div.2 will both be rated?

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

    This is part of an old Bug Which is reported many times. Here I reported. instead of supporting, people started downvoting, so nobody works on it.

    If someone reports bug, and others support the initiative, then bugs could be solved by getting developers attention.

    https://codeforces.me/blog/entry/114097

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

Good Luck for all participants

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

How many common problems between the divisions? Can't figure out from scores.

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

Hopefully to reach cyan again!good luck everyone!

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

Hey if anyone is interested in becoming friendly competitors, you can reply I'll add you and we can compete together during contests.

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

    If you add me, please let me know so that I can add you back!

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

How to Approach hard problems D, E and F in DIV2

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

Hoping to solve till Div 1 C today and achieve my first ever rating plus as master, and first ever rank maintainance as a separate Div 1 participant.

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

Good luck to all the participants ;)

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

It is game time.

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

people who will realize div2 c twist after contest :( me who got it during contest :) after getting two WA

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

    then it's a :) for me too

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

    What's the twist?

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

      v[r]-v[l] i was doing earlier but v[r]-v[l+1] this was indeed a twist for me atleast

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

        Lmao, I got stuck trying to do it with segment trees. When I switched my approach, there was hardly time left for casework!

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

        Can you please explain why l+1 is used here with an example?

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

          i am using prefix sum and storing a cnt for the index 2<=i<n v[0]=0,v[1]=0 with condition if(v[i]<=v[i-1] and v[i-1]<=v[i-2])cnt++; v[i]=cnt;

          example :- 1 2 4 3 3 5 6 3 2 1 v would look like [0,0,0,0,1,1,1,1,2] and suppose to query is 4 7 then do the casework if(r-l+1<3)cout<<r-l+1<<endl; else { int dif=v[r]-(l+1<n?v[l+1]:0); cout<<r-l+1-dif<<endl; } why l+1? because we have to consider elements from l to r inclusive but for lth index my answer would be stored in l+2th index given the condition above but I have to include my lth so i will substract v[l+1] till which I don't have to consider; here answer for this query will be 4

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

you are too day^-1

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

Many people would have left due to problem A. 17k registrations and only 6k participants

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

explain C, pls

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

    Use prefix sum. Do casework.

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

    I need it too. Got WA 3 times. Anyone pls explain.

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

    Store all the important points, i.e., where $$$a[i]>a[i-1]$$$. In this case, $$$i$$$ and $$$i-1$$$ both are important points.
    Now for a query just check how many important points are between $$$l$$$ and $$$r$$$. Add $$$1$$$ if $$$a[l]$$$ is not an important point. Similarly, add $$$1$$$ if $$$a[r]$$$ is not an important point.
    Think why it's working!

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

    https://codeforces.me/contest/1818/submission/203949170

    I have an array of "holes" where i store the indexes where it is bad, aka i >= i+1 >= i + 2

    Then I just binary search for the leftmost hole, rightmost hole then the answer is r - l + 1 - hole_count

    It is sort of doing binary search on intervals.

    There is some more casework (e.g. r - l + 1 < 3, if there are no holes, if the leftmost / rightmost hole does not fully cover the left/right portion)

    Time complexity: O(n + q log n)

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

    Suppose you have three consecutive elements $$$x$$$, $$$y$$$ and $$$z$$$ where $$$x \geq y \geq z$$$. Then for any range that includes $$$x$$$ and $$$z$$$, there is no point in keeping $$$y$$$ in the subsequence, since any subsequence that contains $$$y$$$ must exclude either $$$x$$$ or $$$z$$$, whereas it would have been better to keep both $$$x$$$ and $$$z$$$ instead ($$$x$$$ can have an easier chance of connecting to stuff in the left since it's $$$\geq y$$$ while $$$z$$$ can have an easier chance of connecting to stuff in the right since it's $$$\leq y$$$).

    My approach was to mark all such $$$y$$$ as "useless" indices. The non-useless indices (aka useful indices) will already form an almost-increasing subsequence, so we can always include them. We can use a prefix sum to count how many useful indices we have so far. Now, for each query, we can count all the useful indices between $$$\ell$$$ and $$$r$$$. If either of $$$\ell$$$ or $$$r$$$ are useless, we should add it to our subsequence too.

    My submission: 203942625 The rem vector marks useless indices.

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

I'm not a good fisherman bcz I couldn't catch the fish from the graph(problem D xD)...

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

The webpage with a simulator for problem D was very helpful. Thanks!

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

No tougher A please, people are simply skipping contest after seeing A.

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

    I think understanding the statement was tough but the implementation was easier.

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

Can Someone Tell The Idea For Problem C If Instead of Subsequences It Was Subsegment?

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

    Use prefix sum. For each query, do casework on l

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

      Can You Please Elaborate More? It will be Helpful

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

    I misread the problem during contest and wasted my time solving "Subsegment" version ;(

    I don't know if it have simpler solution but I have a possible solution for "Subsegment" version of Div2C using segment tree in $$$O(n + qlog(n))$$$.

    Here is my code

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

      i was also solving for subsegments initially the problem then essentially reduced to taking max of intersection (l,r) over certain intervals which i was not able to figure out within the time constraints

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

The demo page really helps a lot when solving div1 D.

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

Hi, the system verdict my solution was used the edge (2,4) twice while I checked the output, it doesn't seem like that. I don't know what's happen. Is my solution wrong or is there any problem with the verdict system? https://codeforces.me/contest/1818/submission/203958546

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

    You forgot to output the number of edges in your subgraph. Because now all numbers are offset, the checker comment is weird.

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

Excellent fishy contest

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

Is it me or C was disgusting to implement?

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

For Div2, difficult A and nice C.

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

anyone pls explain how to approach b in div2

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

    Write brute force for $$$n\leq{10}$$$ and try to see a pattern... unfortunately that was enough to solve a problem.

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

    If n is odd the there will not be an answer because sum of array = $$$\frac{n(n+1)}{2}$$$ will be divisible by n.

    So, now assume n is even. Now consider the permutation p = [1,2,3,4,5,6,7,8,9,10,....] and array a = [2,1,4,3,6,5,8,7,10,9].

    If len = r-l+1 is odd. then p[1...len] would have been divisible by len. Also the p modulo len : p[i]%len would be repeating. For example, modulo 3. p = [0,1,2,0,1,2...]. So any subarray of len would be divisible. By making it into array a, we would make sure that in any subarray of len, there is exactly one different element in a than perm.

    If len is even. Again p modulo len would be repeating. And for any subarray of len in perm. sum modulo len is $$$\frac{len}{2}$$$. In array a, if subarray starts at odd index(1-based) then set of elements modulo len would be same as in p. But if subarray starts at even index, say l and ends at r(r = l+len-1), the a[l] = perm[l]-1 and a[r] = perm[l]+1. So total sum still remains $$$\frac{len}{2}$$$ modulo len

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

IN DIV2 D,

We just check for all vertices who have atleast 4 neighbours, whether they are a part of a cycle or not.. Am i missing something?(except implementation)

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

    That's what I did

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

    You have to check if at least 2 more vertices are not part of the cycle.

    There are multiple cycles possible from a vertex. If you choose a larger cycle and checking for 2 more vertices return false, it is possible that a smaller cycle exists with 2 more vertices.

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

How to solve Div2E/Div1C? UPD: Nevermind, gonna read the editorial

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

Div1C may not be suitable here. I think Div1C should focus on thinking, and only use basic algorithms like dp or greedy. But this problem is nearly a pure math problem.

Anyway the problem is very nice. Using it in icpc contests may be better.

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

    Isn't Div1C focused on thinking and doesn't use any algorithms at all?

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

      after getting the answer in terms of the coefficients, i think its mostly more knowledge based, both the approaches to compute it (seems to me) you need to know it, or you cant do it.

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

        Well, yeah, you might be right. But I feel like it's a pretty basic math fact. And even though I knew it, when I acquired a formula via coefficients it took me a long time to realize that I could use interpolation to get one coefficient because it was a new angle for me on this. I think I have never before used the interpolating polynomial in competitive programming.

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

          I had never heard of lagrange interpolation before :(, and i consider myself more versed in maths than an average person since i did make our countrys tst.

          Ofcourse, its my skill issue, and i learnt something new now, but i think maybe you are biased about it being a basic math fact(for its level). I know a lot of my friends who were in the same boat as me, having got the answer in terms of the coefficients, but no clue on how to proceed.

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

div1 D was just playing the demo game :sob:

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

In $$$B$$$ I wrote something weird and it passed. Is it correct?

Iterate over all edges. Fix edge. Let it be in the tail of fish, and let one of its vertices be the center of the fish. Do simple dfs, which will not go into fixed vertice in tail. When in dfs we try to go to center of fish, and there is at least one unused neughbour vertice of center, we found answer. Otherwise continue.

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

including yourself (member 1) this line should be bold on A (:

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

This was my first contest! Glad I passed at least pretests on A and B. Then I think I understood how to deal with div2C but my solution was too slow so I don't submitted. I preprocessed the whole array finding the bad triplets for which x >= y >= z. Then basically for each query I would count how many "bad triplets" fall totally into the interval [l, r]. Then I would subtract this number from r — l + 1 which would be the answer if no bad triplets fall inside. Is this approach reasonable? How can this be optimized?

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

    You can store a prefix sum and now count how many are in your range in O(1)

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

dang I spent too much time thinking how to write d1B knowing the solution

My ideas on d1C

if we knew n-th and n-1-th coefficents of A and B then we know the answer to the problem, and to compute them (lets say we are finding for A) we use interpolation by Newton to gradually build A so that it satisfies first i+1 points and deg(A) <=i; if we modify for point i+1, then lets say P(x) was our previous polynomial, and now P1(x) will be modified P(x) P1(x) = P(x) + (x-0)(x-1)..(x-i)*((y[i+1]-P(i+1))/(i+1)!), and we just need to find P(i+1) to know the largest coefficent of P1(x), and the second largest coefficent of P1(x) will be largest of P(x) + ((y[i+1]-P(i+1))/(i+1)!)*(0+1+..+i), so we can always find two largest coefficents of P1(x) if we can quickly find P(i+1), but P(i+1) can be counted using interpolation by Lagrange, and since x[i]=i it looks like every L[i] is a factorial divided by two factorials and i(maybe (-1) in a certain degree), and if we could somehow update them fastly after each step, we could find P(i+1).

Is my approach correct, and if yes, then how do we finish this?

upd.: i checked the submissions and it loosk like there's something simpler, but I don't know

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

D1A/D2C: Let [L, R] be a maximal non-increasing block (which means a[i]>=a[i+1] for L<=i<R, L==1 or a[L-1]<a[L], R==n or a[R]<a[R+1]) is min(2, R-L+1). Therefore we can solve the problem by prefix sum, but we need to process for blocks on the boundary of the queried range.

D1B/D2D: We need to find a node u with deg[u]>=4 and a cycle contains u. We can build a spanning tree rooted at u of the component of u, and find an edge connecting nodes in different subtrees of u.

D1C/D2E: If d==1 the problem is simple: Since A(x)=a1*x+a0, a1=A(1)-A(0), and B(x)=A(x+s)=a1*(x+s)+a0=A(x)+a1*s, so s=(B(0)-A(0))/a1. If d>1 we can find the (d-1)-th order difference of A and B, they will be polynomials of degree 1, and solve the problem as d==1.

(d-1)-th order difference
  • »
    »
    18 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Hi. I wonder if s = (B(0) — A(0) / a1, is it correct when a1 % MOD == 0? Or can you prove (d — 1)-th order difference of A(1) is not zero. (0.0)

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

      By the constraints of the problem, the d-th coefficient a[d]!=0. If the highest term of p(x) is a[d]*x^d, then the highest term of the difference of p(x) is d*a[d]*x^(d-1). Therefore, the first coefficient of (d-1)-th order difference is a[d]*d!, which is non-zero modulo 998244353.

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

    I am getting TLE on test case 24 in Div1 B. please help. Here is my submission. 206435558

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

It seems that conqueror_of_tourist beats tourist again.

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

Fuck me xd I haven't cleared that shit after debugging:

Nice contest, had fun

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

    Huh, no random maxtest in E pretests?

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

      Generally, I didn't want to make pretests for this problem particularly strong, as the key observation could be guessed, and I didn't want people to brute-force their guesses against the pretests. Test 6 is quite large, but it only has very large numbers in the input. In the hindsight, I think I overdid it a bit, and it would be better to include the test 7 into pretests as well, and it was fully random.

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

        Did you explain your intention of the weak pretest to the testers or coordinators? If I were among them I would have strongly opposed the idea.

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

          I did not.

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

            That's pretty sad, but it doesn't surprise me. There were 33 testers and they didn't pay attention to this, while this is one of the things that they should exactly look for.

            I generally consider the quality of testing on codeforces as rather poor. Maybe it's a good idea to create some kind of checklist for them to follow, which would contain stuff like check the statement for unclear things and typos, check the strength of pretests (or at least if they contain a random maxtest/everything that they should contain), think if some problems have already appeared before etc?

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

              I think this in particular is because testers are simply not exposed to pretests/systests composition. Few years ago, testing was done on Polygon directly, and now it's just virtual contests in mashups, so they don't really get enough information for quality assurance.

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

          I want to say three things (I was the coordinator):

          1. I should have noticed the small number of pretests compared to the total number of tests (I usually suggest to the authors to have tests=pretests in hard problems, as antontrygubO_o suggested me when he coordinated me).

          2. My opinion is that weak pretests are always bad. I cannot think of a single exception.

          3. If adamant had told me that he wanted to have weak pretests because [see what he wrote above], I would have tried to change his mind. If he remained adamant (pun intended) about his decision, I might have allowed it. I feel like it is something an author can decide in certain problems (after all, Codeforces has never said explicitly anywhere that pretests are always as strong as possible), and this one is a problem where it makes sense (i.e., 1 person out of 10 might agree with Adamant).

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

            Thank you for explaining the situation.

            I too believe pretests should be as strong as possible. However, I know some people have a different opinion and they have a right to challenge the tradition.

            What I want to say is that they can try to change something, but it must be done through communication. This time it was done by a single person and I feel that is much more problematic than the weak pretest itself.

            If I had been consulted about this problem, I would have suggested adding the line "the pretest of this problem is intentionally made weak". This is just an example, but anyway hearing others' ideas could certainly make the situation better.

            I hope the future CF rounds will be prepared with better communication.

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

So happy to have AC-ed Div2C at 2:14:50 in the contest.

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

adamant Could you please mention first solvers for each problem ? Today is the first time for me to first solve problem. (Problem Div.2 B)

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

Rating boost thanks to div1C.

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

Very good contest. Div2C and Div2D were interesting.

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

As a tester, I hope that you have enjoyed this round.

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

Div1D is one of my favorite problems that I have seen on Codeforces, thank you.

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

Why are 6 files considered enough for Div1E's pretest... And if you know the solution you find the cases with small $$$n$$$ are not useful, and there exists only one (possibly) useful pretest. Why?

My bug is my fault (detail: I had to check cutting the leftmost/rightmost contiguous intervals (instead of just one element), but I am strongly against having deliberately weak pretests because the contest would heavily depend on hidden information.

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

    But it does depend on hidden information every contest, as long as it's not an official policy to make pretests sufficiently strong. At the moment, there is just no guarantee that the pretests are comprehensive, and you can't (and, imo, shouldn't) depend on it. Of course, one can argue that there should be such a guarantee, but (again, imo) to give it there should be a global decision, rather than just a tendency.

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

      Thanks for reply, yes, it does depend on hidden information every contest and that's why I dislike the current pretest rule. And your point:

      Of course, one can argue that there should be such a guarantee, but (again, imo) to give it there should be a global decision, rather than just a tendency.

      makes sense.

      Yet, in a particular contest, the more you put useless cases into pretests, the larger the factor of guessing hidden information, and the worse (I think) the contest becomes. Or at least "tendency" changes too much. I don't think it is good that one problemsetter can change it (In my opinion this is what the coordinators should keep).

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

Nice contest! Enjoyed D. B Failed system test, but appreciated to contest authors.

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

A_G hitting LGM in style 😎

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

div2 a > div2 b

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

This round was cool but i really hope we dont see more problems about polynomials at D2E/D1C, lol

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

Finally, my color got changed.

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

Problem A was a bit tricky tho(or the problem statement was somewhat confusing), it took me around 20 minutes to figure out the exact solution.

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

Div2 top5 are alt accs. As always :(

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

I know it's a different blog but why the upcoming contest 870(div2) registration will start at the time of starting of that contest then how people are supposed to register ?? or is it a bug?

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

ahrorov.5758

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

Can someone tell me how to solve Div1B/Div2D in $$$O(n+m)$$$?