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

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

Hello Codeforces!

I am glad to invite you to Codeforces Round 986 (Div. 2), which will start on Nov/10/2024 18:35 (Moscow time). Note the slightly unusual start time.

The contest will run for 2 hours and have 6 tasks. The contest will only be rated for those with a rating not higher than 2099, but we welcome higher rated users to participate out of competition.

Holding the contest would have been impossible without:

and of course a special thank you to all of you for participating!

Score Distribution: $$$500-1000-1500-1750-2000-2500$$$.'

UPD: The Editorial is now published.

UPD2: Congratulations to the winners!

Div 1:

  1. jiangly
  2. A_G
  3. BurnedChicken
  4. MAKMED1337
  5. maspy

Div 2:

  1. SUPERLWR-beta
  2. mychecksdead
  3. sweet_dream
  4. contee
  5. Sunflower233

First solves:

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

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

As a tester, this is indeed a Codeforces round.

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

As a tester, I almost planned to register until getting tagged.

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

As a tester, i couldn't solve all the problems.

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

As a participant, I wish we can learn something from the contest

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

as a participant, I will start from Problem F, or die trying.

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

As a tester, I want to know why you're not doing Universal Cup.

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

I hope the people who are genuinely solving tasks(by themselves) get a positive delta.

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

As a participant Hope to solve 3 problem

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

I hope i can reach pupil , its nearly impossible ig but ill try my best .

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

As a participant, I wish I can solve at least one problem

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

I hope I will reach M in this round.

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

hope to solve 4 problems :)

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

As a Codeforces user, I don't understand all these ass comments everywhere, what is the story behind them? why are they considered cool?

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

hope to solve 4 problems -_-

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

Who else came here and the contest haven't started?

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

As a tester, goodluck.

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

As a participant, this is my first unrated Div.2 :D

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

i'm cooked

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

as a participant i can say the solution was out on telegram. Please take strict action on cheaters a request. I am fedup of this cheating can't you block their account permanently and ask everyone on the platform to link their account with their phone numbers so that if one cheats he will need to create a new account with a phone number and a person can have limited phone number not like gmail account so he or she might not do the same with other phone number account. The problems where good indeed

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

great b and c. Makes you really think.

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

C is much easier than B

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

how to solve F?

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

Why q 2 j 4 is invalid in problem D for the second test case? where: Q: 2 3 1 4 K: 1 2 3 4 J: 1 4 2 3

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

Realized my mistakes at the end of the contest...

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

B burned me to charcoal, C reduced me to ashes and buried me in the mantle

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

Still have no idea how many rounds of simulation to run for pA... was guessing 100 * 10 would be enough?

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

C<B

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

pls dont make these shits again.

thank you.

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

I liked B and C, but the problem statement for D made me lose braincells

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

In the second test case for Div2D, can you please help me understand ? I am able to reach from type-1 to type-4 card in this manner.

1) Give the type-1 card to queen, and get type-3 card from queen

2) Give type-3 card to king , and get type-2 card from king

3) Give type-2 card to Jack, and get type-4 card from Jack

What is the problem ?

I couldn't solve B, or C or D. Implemented all 3 questions, but kept on getting WA on pretests. Quite imbalanced contest IMO.

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

B was harder than C.

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

Problem C is GARBAGE.

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

nice C and D, retarded A and B.

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

Solved A in 4 minutes just to stare at 5 wrong submissions on B....

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

for B, if b == 0 and c == 0 => if(n <= 2) ans = n — 1 else ans = -1;

if(c >= n) ans = n;

otherwise ans = n — (n — 1 — c)/b — 1;

what is wrong with the approach?

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

Terrible weekend. Got humbled twice I don't belong here.

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

It was so close for AC :(

The feeling when you skip B and can solve D & E is indescribable, feels good.

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

I felt like A < C = D < E < B by difficulty

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

Wow, I think I solved D in the last 2 minutes of contest, hoping it passes system testing!

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

I spent maybe 10 minutes rereading the problem statement for D until I figured out that the Queen/King/Jack of Hearts are supposed to be the players and are not cards of the game. Other than that, great contest :)

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

what the hell was be

can someone help me by telling what case i missed

https://codeforces.me/contest/2028/submission/290946207

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

I submitted my solution for problem C in the last 30 seconds without even testing it!

I am really happy!

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

Is problem D a graph problem ? In the entire contest, I try to build the graph and reduced the edges so that the graph size is O(n) instead of O(n^2). I try the mono stack or segment_tree but failed very badly.

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

first time solving a problem which has less than 500 submissions. (problem E)

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

C is actually good problem, sadly I lose all my time for A/B because I'm bad at edge cases.

Just sad.

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

Wasted almost an hour on C by somehow concluding that Alice's segment can be non-contiguous and now I'm actually curious how to solve the modified problem
Ex: For $$$m=2,v=2$$$ and $$$a=[100,2,100,1,1,100]$$$ answer would be 300 where we give segment $$$[1,1]$$$ and $$$[3,4]$$$ to the creatures and rest to Alice.
$$$O(n.m)$$$ is obvious but can we do better ?

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

    I am actually curious what the $$$O(n.m)$$$ solutions is!?
    All I can think of is complete search on the set of pieces allocated for Alice, and for each check whether we can make monsters happy using the rest. It's $$$O(2^n.n)$$$

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

      Let $$$dp[i][j]$$$ denote the minimum sum of the j pieces to satisfy j creatures among the first i elements.
      $$$dp[i][j] = min(dp[i-1][j],dp[k-1][j-1] + sum[k,i])$$$ where k is the maximum index less than i such that $$$sum[k,i] \gt = v$$$
      Answer would be $$$sum[1,n]-dp[n][m]$$$
      We would need to do binary search to find k so the TC would actually be $$$O(n.logn+n.m)$$$

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

    I wasn't able to spend much time on C in the contest (got cooked by B like many others), but the approach I had was quite straightforward. I did end up upsolving it after contest ended, with an O(n + m) solution, which is this case is just O(n).

    Key Observation: Alice's section can only be at the beginning, end or somewhere in the middle (since she can only take a single contiguous section) — part of the question, but easy to miss.

    Approach: 1. Create modified prefix arrays of potential sections in both forwards and backwards directions (adding to array whenever the sum crosses v — creating sections greedily in both directions). 2. If length of above arrays isn't over m, then a solution is not possible (as we couldn't create m sections even using greedy). 3. Now it's just a matter of maximizing Alice's section (m+1th) while considering m sections from a combination of forwards and backwards arrays — we can iterate i in 0..m and consider max of (total - forwards[i] - backwards[m-i]) as the final answer.

    AC submission without using 2 pointers or binary search: 290960412

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

D is extremely hard for me to understand the statement.

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

Thanks for the contest! Feels good getting pB in 1 try!

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

I have a simple question Was not there other names in the WORLD except King, Queen ans Jack ?

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

What can I learn from problem A? If constraints are really small, just run the simulation enough number of times which is very large than the constraints?

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

can someone explain why in D, in the the second test case.

Alice exchanges to card 3 with queen and then to card 4 from jack. Why isnt this a valid workaround

In other words,

why isnt the soln

3 q

4 j

correct?

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

I think that problem B needs too many steps as the second problem in Div2,but after minutes of thinking,I solve it.I use very easy to use and convenient translator today which I didn't know in former.But my parents asked me not to use the translator on some competitions that are not important or do not increase the rating value.

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

To be fair, I don't believe the submissions from podyapolskiy.yaroslav are works done by a single person without using AI tools. If you look at their submission history, the person switched to a new random question every 3-5 minutes, and was able to produce a fully written solution that passes the sample but failed at some later pretests (except A). Even worse (and that's why we could discover this) -- they don't even bother hiding it with spacing out the submissions by a few more minutes, or at least trying them in order.

The final judgement obviously needs to be made by the admins, but it's fairer to award the first solve to the genuine first solver if the admins found this case guilty.

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

What was the point of even having D, it was just simple greedy and implementation

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

first time getting a first solve :D

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

We can see that the first person to solve problem A, podyapolskiy.yaroslav, used AI on all of the questions.

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

Oh may bad , I got WA on A , because of limit of repeating the process , if I got it correct , then I'll top 3k now

Meme

Just not in python

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

orz

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

"Amazing problem! It really tested my understanding of edge cases and forced me to think creatively. Loved how every observation brought me a step closer to the solution. Looking forward to more challenges like this!"

"Finally solved it after hours of debugging! The problem was tricky but super rewarding once I figured out the approach. Thanks, Codeforces!"

"Great problem! Loved the unique constraints – they made me rethink my entire approach. Big shoutout to everyone who shared tips on handling tricky edge cases!"

"One of the best problems I’ve solved recently. It perfectly balanced complexity with elegance. It felt satisfying to apply different techniques to reach the solution. Kudos to the author!"

"Spent half my day on this but learned so much! From wrong attempts to the right approach, the journey was worth it. Excited for more problems like this!"

Each of these comments is around 60 words or less, focusing on appreciation, learning experience, and excitement for future challenges.

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

POV : B is close to This

I've just noticed while upsolving AC problems

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

it’s a great idea to highlight the name of the first solver for each problem!

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

Mayakowski is the strongest competetive programmer ever