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

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

Hello, Codeforces!

We are glad to invite you to participate in Codeforces Round 1048 (Div. 1) and Codeforces Round 1048 (Div. 2) on Sep/08/2025 17:35 (Moscow time).

The round will be rated for everyone. You will be given 6 problems and 3 hours to solve them in both divisions. Some problems will be divided into subtasks.

The problems were authored and prepared by installb, wjy666, tarjen, StarSilk and 2014CAIS01.

We would like to thank:

The scoring distribution is below.

  • Div. 2: $$$ 500-1000-1500-2250-(2250+750)-3500 $$$
  • Div. 1: $$$ 500-1250-(1250+750)-2500-(2750+1500)-4250 $$$

Good luck to everyone! (=^・ω・^=)

UPD:Unfortunately, it was discovered very lately (2 hours after the contest began) that the statement of div2D/div1B was missing an important condition. The correct statement should include the line "The operation 2 can only be applied at most once." The statement will be corrected soon.

We believe this issue affected many participants of this round, and therefore we have to declare this round unrated. We sincerely apologize for this mistake.

https://codeforces.me/blog/entry/146176 please refer to this blog for more information on why we decided to make the round unrated, and further elaborations on how this accident happened. We are deeply sorry for disappointing everyone, and we hope for your understanding.

UPD2: Here's the editorial: https://codeforces.me/blog/entry/146172

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

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

As a fan of StarSilk and tarjen, I tested. Hope you will enjoy the meow meow problems (=・ω・=)

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

Wish I'll back to GM after this contest AwA

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

As a participant i wish some dp problem.Then it will be great for learning dp.

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

Ready for (=^・ω・^=) meow meow problems for this contest :)

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

I must should and have to master dp!!! But hoping it will be nice contest

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

akqxolotl is unrated/Black how can he do Grey testing?

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

orz

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

So few blue/purple testers seems a bit alarming. Let's see if the round turns out to be a speedforces.

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

either i've become stupid or there are too many cheaters i dont understand the meaning of all this tolerance towards them

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

Wow that was clutch

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

Ig it's good to me that it was unrated lol. I was rank 6k

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

WHY UNRATED? WHO DID IT AFFECT? A BUNCH OF NEWBIES???!!!!!

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

Do you have a ton of testers and couldn't notice it? Why did you make the announcement after 2.5 hours? Why do you think many people are affected by this? A lot of people have successfully solved this problem. Why is this unrated?

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

Well so that happened.

can i get 298 upvotes instead?

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

Why Unrated?? I solved Problem E for the first time during a live contest :'(

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

OMG, unrated!?

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

man what the fuck got 2k rank for first time and this

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

I don't see how the other statement of problem D would convey different meaning to participants.

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

How did so many people solve Div1B/Div2D without atmost once condition?

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

The testers are there for a reason...

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

whoa I made a comment on this post a while ago and it vanished !!!

BTW how come authors realized such big problem so late.

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

Can someone explain in what way the newly added condition affects some solutions for D1B / D2D? I don't get it...

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

You got to be kidding, spent 2h thinking about this Div2D, trying to find the bug.

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

guessforces

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

As a participant who solved 5 (actually 4.5) problems during the contest, I am upset that the round became unrated :(

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

le me: finally, i am elitist

le universe: u sure about that

still cool questions.

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

Changing the contest to unrated is not fair for people who did not even attempt that question, some other solution must be made for this issue

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

It should be unreated for those who want it, I even did the problem c quickly for the first time :(

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

there goes my hope of recovering my rating from this round.

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

Man i skipped my dinner for this quess,i would have become a specialist today (╬▔皿▔)╯

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

Nooooo, my CM :((((((((

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

damn why unrated ,wasted my time.solved the problem and get not bad rank.also that isnt important if the operate2 only can use once,i didn't know that but accepted the problem.

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

The fact that over 70% of Div1 contestants solved B by guessing a completely wrong solution is actually insane.

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

guessforces,bestforces

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

I lost my chance to get +100 delta & reach rank ~20 in a rated Div. 1 round...

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

It really feels pathetic to spend 3 hours in a contest..just to find out the question you were stuck is wrong and the whole contest is declared unrated

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

It's unnecessary to make the contests unrated.

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

never in my life solved an E problem. when I finally did, the contest turned out to be unrated, so cool

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

Messed up C with 2WA, I thought I had clutched D and was feeling really good about myself, only to be faced with WA.

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

[div1. B] When operation 2 can be used any number of times, a sequence b is perfect if and only if it is both 321-avoiding and 3412-avoiding.

I wrote a brute force solution and, through experiments, discovered this fact. However, when I tried to implement it (which was difficult!) and submitted it, I got WA. Stress testing didn’t reveal any failing cases, so I was stuck.

Then I thought, “Could it be…?” and tried submitting a solution that only checks the 321-avoiding condition — and surprisingly, it got AC.

I think many people’s solutions would fail on the following case:

1
4 1
3 4 1 2
1 4
»
15 месяцев назад, скрыть # |
 
Проголосовать: нравится -50 Проголосовать: не нравится

Changing the contest to unrated is not fair!!!!!

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

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

I am very sorry about this issue. I wrote a short blog explaining the issue. I hope that everyone will downvote my blog instead of the announcement, as the authors worked very hard for this contest to happen, and it was fully my carelessness that resulted in this issue.

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

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

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

Alr go installb, wjy666, tarjen, StarSilk and 2014CAIS01 are yall blind? Smart guys.FKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK

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

what is proper way to find min operations for div2C

I guessforced by going in opposite direction and always taking from greater one... but I feel there is some observation in bits to be made ?

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

I really sad. I'm solve ABCE1E2 in first on my life and i gonna have +80...

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

Since the contest finished I can write now (there is a spoiler for problem D)

How did the change affect the problem? If you use the second operation any number of times (or at most once) the answer will be the same! So if you write at most once or not it doesn't matter. Why you made it unrated!

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

is this some kind of a joke?problem statement changed at the end of contest?

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

Is there anyone else like me trying a bitset in C2? Bitset is an intended solution, or is 6s just a trap?

My bitset code: 337632742

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

    the intended solution is the O(N sqrt N) knapsack dp I believe, but I got baited into bitset too. should probably work with good enough constopt though.

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

      huh what is O(N sqrt N) knapsack dp

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

        Here's a rough explanation:

        We assume $$$W=n$$$, so $$$O(nW)$$$ becomes $$$O(n^2)$$$,but this trick also works otherwise and allows for O(W sqrt W) knapsack. An interesting trick is that 3 copies of a number $$$x$$$ can represent a choice between increasing by $$$0$$$, $$$x$$$, $$$2x$$$, or $$$3x$$$. However, there exists an equivalent way of being given this choice, which is having 2 elements in the knapsack with values $$$x$$$ and $$$2x$$$. Since this choice removes a net total of 1 element, this speeds up the knapsack. This process can be iterated, and so only at most 2 elements of any value $$$x$$$ must remain. In other words, there must exist at most 2 copies of 1,2,3..., and in fact you can use this to show there must be at most $$$O(sqrt N)$$$ elements in total. In general, for the general case of having sum $$$W$$$, this reduction allows at most $$$O(sqrt W)$$$ elements to remain.

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

      apparently the constopt in question is finding the next set bit in the bitset in O(fast) (specifically, faster than a linear scan), which would've worked.

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

Contrary to the authors' claims, $$$3,4,1,2$$$ is not actually a countercase so I have no idea what fails D as previously written but passes D as it is right now, and I don't think the authors do either.

3 4 1 2 w/ op 1 swaps only:
w/ one op 2 swap:

An actual wrong test case would require multiple op 2 swaps to save 1 or more moves, but also that 1 op 2 move cannot save moves.

EDIT: somehow messed up my op2 case, yes the op2 case takes 3 operations regardless of which op2 you take since it only fixes 1 inversion. Unfortunate :(

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

Since the statement of d2D/d1B changed to only allow at maximum 1 operation 2, the 3-4-1-2 case is wrong, therefore we only need to factor in the 3-2-1 case (which makes the problem much simpler to implement). I actually just deleted part of my code at got it AC.

Okay problem, but it was a pity it had to be this way.

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

First time cracked Div2C in live contest! Yayyy!!! I was happy until I saw that statement 'We apologize'

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

Me whole 2 hours :-

I can solve E1(trying dp[node][no. of zeros left] -> Nah i can solve D Segment tree? Nahh dont know -> again back to E1.

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

I don’t really understand why the contest was made unrated. I’ve been trying to think of a case where limiting operation 2 in problem D to being used at most once is important, but I haven’t found any.

From my perspective, the key point is whether we can reduce the number of inversions in the array. If this can be done with a single operation, that’s already enough. This seems like an observation that contestants should make during the contest, rather than something that must be explicitly stated in the problem statement.

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

thank god it was Unrated.. just solved one problem lol

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

I don't get the point of making the contest unrated. Some other workaround could have been found.. like removing the points of problem D. I got a good rank today after a long time. Codeforces has recently become an uphill battle.. first fight against cheaters and then this happens.

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

Would you mind explaining why you divide D1C/D2E into 2 subtasks? is it necessary to create a special subtask for bitset?

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

A round being unrated almost at the end of the contest is such a slap in the face.

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

Ok so my solution of E is surprisingly simple. Figuring it out, on the other hand... wasn't simple at all.

Main idea: tridiagonal matrices. The determinant of any top left square $$$i \times i$$$ of such a matrix is given by a simple recurrence: $$$d_i = d_{i-1} a_i + d_{i-2} b_i$$$, with $$$d_0 = 0$$$, $$$d_1 = 1$$$. In this case $$$a_i, b_i \in \left\lbrace -1, 0, 1 \right\rbrace$$$.

Let's simplify it even further: we take a matrix with 0/1 on the diagonal, -1 above it and 1 below it. We just need to choose the right bits on the diagonal — there's $$$2^{50}$$$ options so it should be enough, right?

The formula simplifies to: if 1 is on the diagonal in the cell $$$(i+1, i+1)$$$, $$$d_i = d_{i-1} + d_{i-2}$$$, otherwise $$$d_i = d_{i-2}$$$. (The top left cell is always 1 for $$$d_1 = 1$$$.) Going in reverse, we either subtract or swap. That's Euclid's algorithm — the slow version. We know $$$d_n = K$$$ and for any $$$d_{n-1}$$$ we can simulate this in reverse and obtain $$$n$$$ — the size of such a matrix.

That's a lot of values! However, we know that short sequences arise when $$$d_{i-1} / d_i$$$ is approx. the golden ratio $$$\phi$$$. What I did was simply trying all $$$d_{n-1}$$$ close to $$$K \phi$$$ and picking the smallest $$$n$$$ among them. It's slow for E2, barely fitting in the time limit for the matrix size limit, but hopefully good enough.

I also reduced $$$K$$$ to an odd number and added diagonal blocks ((1, -1), (1, 1)) with determinant 2 at the end, but that shouldn't affect things much.

And now it's time to figure out if the change in B affected me. I misunderstood things in the problem, but they were different things.

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

Noooo i did so well and it became unrated sad. Anyways still a good round

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

What?Can I choose to be rated?????Thank you!

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

Div1A is a known problem, even solved by a minecraft youtuber: https://www.youtube.com/watch?v=AdHGmFpaoCE

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

ohno,unr,The tester's mistakes should not be borne by the contestants.

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

I was so happy about getting a high rank this time, but it turned out to be for nothing.

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

I just had the worst luck. I was gonna reach Specialist for the very first time today, on my 100th contest. I have two exams tomorrow and bunch of studying to do. Still I sticked around for 3 hours and pariticipated. All for nothing.

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

Man,I solved E for the first time and contest got unrated :/

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

Is Div1D something roughly along these lines:

(notation: $$$i$$$ here refers to the slider targetted by the query and $$$j$$$ to the slider for which we're calculating the sum)

A. $$$f(p_j)$$$ could be any position reachable by

  • performing any move for slider $$$i$$$ (if there exists a move for slide $$$i$$$).

  • performing one move for any other slider (optional if we performed a move for slider $$$i$$$)

  • lets call the number of the final moves in either case the number of equal elements.

B. Any move which would cross $$$f(p_i)$$$ must be performed BEFORE the moves from (A) — lets call this the number of greater elements. You can compute the numer of such moves for a certain f(p_i) using a difference array with ranges of the form [1, x + (j — i)) or (x + (j — i), n].

C. So the answer for placing a slider at a certain position is something like ways to order the greater elements ($$$cnt_{gt}!$$$) * ways to distribute the equal elements depending on the two cases in point 1 (bars and stars) * ways to place the other smaller elements ($$${q}\choose{cnt_{gt} + cnt_{eq}}$$$).

(I know there are a lot of details which are vague or outright missing, but is this very roughly in the right direction?)

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

An editorial would heal some wounds:)

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

I just want back to expert,but it unrated, so sad :(

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

In Div2 Problem D, I'm trying to understand the relationship between two functions, f(b) and g(b).

g(b) is the value after applying only type 1 operations. f(b) is the value after applying at most one type 2 operation in addition to type 1 operations according to the modified statement.

Type 2 operations always decrease the value of as compared to g(b). Since one type 2 operation lowers the value, applying more would lower it even further.

Can anyone clarify under what circumstances this might not be the case? For example, would "at most one" operation fundamentally change the relationship between g(b) and f(b) compared to "one or more" operations?

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

    If the array is [5 2 3 4 1] and we are only allowed to use at most one type 2 operation and any number of type 1 operations, then it will look something like this:

    5 2 3 4 1 -> 3 2 5 4 1 -> 3 2 4 5 1 -> 3 2 4 1 5 -> 3 2 4 1 5 -> 3 2 1 4 5 -> 3 1 2 4 5 -> 1 3 2 4 5 -> 1 2 3 4 5 (total 8 moves)

    And if we are not allowed to use a type 2 operation, then we will simply send 5 to the end and 1 to the start using 4+4=8 operations... thus, in this case, using a type 2 operation didn't save us any moves because it made the position of 3 wrong.

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

      It's not necessary to use the type 2 operation in the first move, right? In your example, if it is allowed to use type 2 operation, I will go with 5 2 3 4 1 -> 2 5 3 4 1 -> 2 3 5 4 1 -> 2 3 1 4 5 (used type 2 operation here)-> 2 1 3 4 5 -> 1 2 3 4 5 Which took 5 moves. Basically, during the process of swaps, if there appears a subarray in the format [c, b, a], the type 2 operation can save the moves by doing [a, b, c] in a single move.

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

      5 2 3 4 1 -> 2 5 3 4 1 -> 2 3 5 4 1 -> 2 3 1 4 5 (swap 1 and 5 using type 2 op) -> 2 1 3 4 5 -> 1 2 3 4 5

      5 ops

      Using only type 1 operation — 4 ops to send 5 to the back, 3 ops to send 1 to the front

      Won't using a type2 op save moves?

»
15 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится -25 Проголосовать: не нравится

Is it possible to just remove D and calculate the ratings ? Please dont downvote me out of frustration.. I am just asking out of curiosity

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

For Div2 C, what's the answer for k=5, x=21?

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

    Just try to make $$$x = 21, y = 2^{5 + 1} - 21 = 43$$$ to $$$x = y = 2^k = 32$$$:

    $$$(x, y) = (21, 43) \longleftarrow^1 (42, 22) \longleftarrow^2(20, 44) \longleftarrow^1 (40, 24)\longleftarrow^2(16, 48)\longleftarrow^1(32, 32)$$$

    Then you can get the answer by reverse the sequence "12121" -> "12121"

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

They did make a mistake, but believe me, the only way to fix it is to make the round unrated. People who understood the problem correctly were at a disadvantage, while surprisingly, those who misunderstood it were the ones who solved it. That’s just insane.

You know what could also be fair? Calculating the ratings only for those who want them to be counted (since they all performed well). But this would mean that even if your rating was supposed to increase before, it might now decrease, since you’d be competing with a smaller group

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

    Making the round rated only for those who were going to get +ve delta could be a solution. Couldn't it?

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

      But if you only consider those people, some who would have gotten a positive delta would end up with a negative one. If you mean only giving out positive deltas, that’s basically just handing out rating boosts, which I think could negatively affect the overall balance of the ratings

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

firstly ,cant believe the testers also assumed a wrong solution to D , have college exams after 2 days ,wasted 3 hrs on this secondly , is there a solution to the wrong ques btw

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

337624531 For E1 why i hv wrong on test 4 .... (my idea .. take the first consective levels by their whole nodes till i can't)

»
15 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится -48 Проголосовать: не нравится

I retract my previous statement. Mistakes happen.

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

The contest was AMAZING even though there was a little issue. Thanks to wjy666 and the whole team for their great work!:)

»
15 месяцев назад, скрыть # |
← Rev. 5  
Проголосовать: нравится 0 Проголосовать: не нравится
import sys
input = lambda : sys.stdin.readline().rstrip()
iin = lambda : int(input())
sin = lambda : str(input())
miin = lambda : map(int,input().split())
msin = lambda : map(str,input().split())
liin = lambda : list(miin())
lsin = lambda : list(lsin())

def solveTestCase():
    n,m=miin()
    v=liin()
    v.sort(reverse=True)
    res=0
    for cake in v:
        if m>0:
            res+=(m*cake)
        m-=1
    print(res)

for _ in range(iin()):
    solveTestCase()

does this solution work.. if it does .. then why?

i came up with this solution when the contest was live.. but then a thought came into my mind.. what is happening to the remaining seconds when m>n .. i did not notice that my solution is already working for such testacase( case 1 from the given cases ).. so i did not submit.. cause i am a dumass ofcourse.. but yeah why does it work

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

Despite the unexpected error, D1D/D2F, the only problem StarSilk proposed in this contest, was very profound and ingenious.

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

We are all human and we all make mistakes, but the way this mistake was handled is very strange.. making the contest unrated for everyone?? I understand that if it had stayed rated, it wouldn’t be fair to those who couldn’t solve the problem because of the missing condition, but what about the people who performed well on the rest? What about those who didn’t even attempt that problem at all? Someone like me usually target solving A, B, and C, and today I managed to solve them in good time, and according to Carrot I would have gained around 40 rating. So this is completely unfair to me, forget about me, what about the people who were about to reach a new rank after working hard for it for a long time, only to be told in the end that all of that was pointless?! The right way to handle this situation is to keep the contest rated for everyone but ensure no one loses rating, that would be the fairest decision and would cause the least harm compared to any other option in a situation like this.

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

    How will you differentiate between someone who skipped the question and someone how wasted may be entire time on the question ?

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

      You’re right ofc, but the same logic applies if you make it unrated, because you’d be unfair to those who weren’t affected by that problem at all. In situations like this it’s impossible to achieve 100% fairness but the goal is to find the solution that minimizes the losses and that’s exactly what I meant, because this way no one would be harmed the way people would be if the contest became completely unrated.

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

I solved E1/E2 with binary search + greedy. Most solutions use DP. I did offline brute force check after the contest and it has held up in my checks vs a participant's solution that used DP. Thought people might find it interesting (or provide it wrong with a counter case).

https://codeforces.me/contest/2139/submission/337659972

Edit: seems the test cases are weak. Below breaks the algo.

ones=6, zeros=8 levels = [1, 3, 3, 3, 4]

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

Thank you for the round — very interesting tasks! Very want editorial with two "version" of div2D

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

Can we solve Div2 E1 just by greedy?

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

it's a shame that the situation with problem B happened. i am sorry that this blog is downvoted. problems A, C2, and D are phenomenal! i think it could be the best problem A i have ever seen :)

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

Are the test cases weak or does greedy work for Div2 E1 and E2? 337667308

»
15 месяцев назад, скрыть # |
← Rev. 4  
Проголосовать: нравится 0 Проголосовать: не нравится

There was no need to set the time limit so high in problem Div2E2/ Div1C2 if the authors didn't bitset solutions with $$$\frac{N^2}{32}$$$ to pass

Most of the solutions I have seen which uses $$$N$$$$$$\sqrt{N}$$$ solution passes within 500ms. 6 second is quite high time limit if the authors didn't want the bitset solution to pass.

I had the idea of bitset immediately after solving C1. However, I thought it wouldn't pass. I guess it's my fault after all not trying the bitset solution

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

Please hack my E2

https://codeforces.me/contest/2139/submission/337644455

There is not really a lot of reasoning behind it, when the distance to the closest leaf is < $$$\sqrt(n)$$$ I do the same solution i did in E1, but when that does not hold then the number of nodes in each level has to be lesser than $$$\sqrt(n)$$$ which allows for the relevant updates of the subset dp to be closer together.

I think this makes sense however I am unable to prove it and would not be surprised if I fakesolved this, pls help

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

Does D2E1 have really weak test cases? This greedy solution passes for E1 (fails for E2). https://codeforces.me/contest/2139/submission/337674926

The binary search is not even required for E1 as O(n^2) per test case should pass easily.

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

I was wondering if it’s okay to have E2 with a slight difference from E1 just to make it optimal and get AC?

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

D is cool Problem anyways!

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

Stfu

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

As a problem, I can confirm I wasn't tested

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

I am new to codeforces and gave just 1 div 3 contest. I didn't know how divisions work on codeforces so I gave the previous div 2 contest in unrated mode, I came to know that the questions are solvable by my level so this was my only 2nd contest and I did pretty decently and solved 3 questions with a rank of roughly 3.5k and this gets flagged as unrated as well lol. I don't wanna sound rude but the UI sucks, people are rude to each other for no reason and now even the contests are giving out wrong questions lol I can't force myself to like codeforces rn, why is everything and everyone so gloomy here?

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

U mean... a tiny bug in announcement makes this contest unrated? I just wanna ask who was affected by that? ⊙^⊙

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

I have solved A,B,C and E1 in this contest and my rank was around 1050, I really hoped that my rating will increase to 1550 (Now 1471). Sad contest, fuck you so much.

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

So if Div2 D doesn't have the "only use once" restriction,can it still be solved?

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

As a competitor, I tried me best and solve 6 problems, but now it became bootless:(