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

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

Hello, Codeforces! We're glad to invite you to take part in Codeforces Round 1031 (Div. 2), which will start on Jun/15/2025 12:05 (Moscow time). Note the unusual start time of the round. You will be given 6 problems and 2 hours to solve them.

This round will be rated for participants whose rating is below 2100. Participants with higher rating can participate unofficially.

The problems were authored and prepared by bashkort, TheEvilBird, 127.0.0.1, Mangooste and Moscow Olympiad Scientific Committee.

The round is based on All-Russian olympiad in the name of Keldysh.

We would like to thank

Good luck everybody!

UPD: Score distribution: $$$500 - 750 - 1250 - 1750 - 2500 - 3000$$$

UPD2: Editorial

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

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

hope to reach 1750+)

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

I am aiming to reach Expert in or may be close to expert this round !! Hope the problem statements are enjoyable and interesting , and God bless everyone !!

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

omg, Mangooste && bashkort round!

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

That's a really short announcement ngl

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

Hope to reach specialist again.

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

rating distribution? :pray:

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

only 5 testers?

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

Just try not to make problem B harder than C.

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

Note the unusual start time of the round.

Thank you for reminding me to set an alarm.

Hope this round will be great and problems will be interesting :)

At last, what is the score distribution?

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

Hope to reach Master for the first time :D

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

9:05am — 11:05 UTC (Codeforces)

12:00pm — 2:00pm UTC (ARC Div. 2)

LETS GO!!!!!

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

hope to cross 1350+)

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

I manage to solve A and B easily, sometimes C but sometimes it's difficult to solve C, can anyone tell what to do to solve C and D like any structured way or source to practice??

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

Hoping that this is the last time ill be hoping to reach pupil.

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

Good Luck EVERYONE!!!

Wishing you a positive Delta!

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

🗿

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

Interested.

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

Only two div. 2 people tested?

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

This round feels kinda odd

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

Hope that Problem statements are simple as announcement...

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

..

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

Let's hope I dont spend the whole contest debuging just to later find out that a single character was wrong like Round 1030

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

glhf everyone.

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

Hope to cross 1700 this contest

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

Thank you for making such good and beautiful problems—I’m excited to see them. Yeahhh, lesssgo !! :)

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

I want to play maimai DX PRiSM PLUS after the contest.

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

Loved the Problems. Specially D ...

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

i submitted 2 solutions both are correct will i still get -50??

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

I'll give a shout-out to geometry on my suicide note

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

shouldn't have participated

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

What was that C !

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

How to do D and F?

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

    Problem D.

    I used the method of binary search for answers. I binary search for the number of games that players can win. During the inspection process, I came up with a greedy method. Suppose we win $$$x$$$ games. I divide the array $$$a$$$ into two parts, the first $$$x$$$ and the last $$$n - x$$$. Then I will exchange the minimum value of the first half and the maximum value of the second half (of course, some special cases need to be judged, such as the minimum value of the first half being greater than the maximum value of the second half). This greedy train of thought passed the pretest.

    It's a pity that I can't explain its correctness very well.

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

Apart from the extremely difficult D(Completely no idea), A and B were absolutely pain. These two problems need much more observation and mathematics details than usual, which makes them somehow very exhausting(at least for me).

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

how to solve C??

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

    go on every empty cell and check what gold will be demolished if we detonated at that cell,subtract that from total gold in matrix as it will be always achievable after wards

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

    so what I figured out was if you clear any square in the first move ... then you can always take all the remaining gold after that ( to prove this I drew a grid in my paper and then you can always expand the initial square one layer at a time in each direction )

    so problem reduces to how many gold gets destroyed in first dynamite blast, and we would like to minimize this of course

    so the problem is for the possible blast location in first move ( ie empty cells at center ) .. what blast square contains least amount of gold

    this can be solved with prefix sum for 2d- grid like technique .. but you have to figure out rectangle affect by blasting at a particular location

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

    Check which initial explosion will waste the least gold. After that, you can collect all the golds by choosing the empty cells optimally, so you don't need to check that.

    Final answer is: total gold — least gold wasted from the first explosion among all possible first explosions.

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

    Let's calculate the total gold of the initial matrix. The answer only depends on the first explosion we make. Let's try all the explosion we can make, and calculate the number of gold that is deleted after that explosion, let's denote it as x. Then the answer is maximum of all the total gold minus x over all explosion we made at the first move.

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

darnIt ....

problem C -> 20min

problem A -> 30 min ... 2 wrong submissions

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

    Bhai the same thing is happening with me for the last 5-6 contest where i am unable to solve B but most of the time I can solve C in much lesser time.. Why is this happening?
    Also can you tell what should I do to become specialist as soon as possible, i try to solve hard problems (1500-1600) and most of the time I am able to solve these in around an hour(unless its a dp problem), could you tell where I am going wrong?

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

B >>> C

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

Statements felt confusing.

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

GridForces :|

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

I hate Cheater. I hate cheater.

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

couldn't solve C, I know only brute force way but that is giving WA's, can anyone give idea in which direction we should think for such problems?

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

    In this problem, at worst you'll only need to explode 1 crowded cell (might have gold in it), but after that you have room to move and you'll never lose any gold.

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

    i checked the constraints ~500 so i thought of dp and dfs (graph theory in general) maybe 2d prefix arrays

    thats why i got stuck i forgot 2d prefix solution can exist

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

As a participant who solved D but not B, C<A<D<B

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

Is it just me, or are the Div2 B's getting tougher day by day :(

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

someone can explain me: i didn't understand the D question 3rd test case

5 8 6 3 10 1 7 9 5 2 4

why i as a player can't swap 10 to 8 instead of 10 to 3 which is explained in ts.

if i swap 10 to 8, i collect more than 3 points.

swapping the max element to first card win you more game no ?

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

i didnt think c can be solved using 2d prefix until the last 20 mins of the contest

trying dp and dfs was a headache

thank you for this beautiful contest!

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

.

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

I think it took me more time to figure out how the explosion is working in C than it took to actually solve it

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

I missed this contest due to some accidents, but now it seems that I am lucky

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

I don't understand what I was doing wrong in qB

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

Terrible statements and testcase examples for C, very unclear and not explained properly.

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

wtf, kya hi contest tha majjaaa aagyaaa :)

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

Please someone share idea to solve D,

I couldn't solve it during the contest and didn't get any ideas on how to tackle it.

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

In problem D, is it true that if the maximum of $$$\min(a_1, a_2, ..., a_k)$$$ after swapping is larger than $$$\min(b_1, b_2, ..., b_{n-k+1})$$$, then I can win at least $$$k$$$ times? I tried this but got wrong answer.

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

    The idea seems correct (though I haven't performed an extensive fuzzing). However, here's an example of a test that breaks your solution:

    1
    6
    1 9 7 8 4 2
    5 6 11 12 10 3
    

    I don't know what's wrong here — supposedly the way you find the best swapping is wrong.

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

    it has to be right? you're playing n rounds, so n cards got discarded. the one that remains has to be the one with the minimum value amongst all the n+1 cards you mentioned.

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

I could make no observation for A problem. what was it?? B felt far more logical than A (i hope sys test don't prove me wrong)

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

    For A ... what I finally figured out was that try to reduce by minimum delta.. so if x < y ... use all x moves first until possible .. else use all y moves first

    then use the remaining moves .. but I made wrong submissions before figuring this out.

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

    implementation , Take from the cheaper option until you can’t anymore, then try the other one. use an equation to bypass time limit

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

AM I THE ONLY ONE WHO FELT PROBLEM B WAS MORE TOUGHER THAN THE USUAL DIV 2 B PROBLEMS?

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

No doubt that this round required more time, especially in testing and improving problems, so tough problems that seem to include tons of corner cases

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

problems were good.

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

anandxaditya was in my room and I'm pretty sure he has cheated. Just look at the quality of documentation he is doing while maintaining his speed

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

How to Solve B ?

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

Unusually difficult contest. B and especially C were ridiculous compared to most other div2 contests. D in contrast was unusually easy (though proving the solution, less easy).

Oh wait, there was only one div2 tester, that's why :smile:

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

Can someone explain the approach for problem B?

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

How to solve problems like C and D.

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

Can anyone share the core idea for D? I solved F after C, but have made 0% progress on D since then :(((

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

trash mathforces + gridforces + guessingforces.

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

trash round

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

MikeMirzayanov, vaaven the account yashhatwar is suspicious. Have a look at these submissions from today's contest: Seems from some LLM: 324492128, 324511691 Looks original: 324481085

These submissions from round 2117: Seems from some LLM: 323469770 Looks original: 323455468, 323437423

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

Did the authors think B was easy just because the solution is so short? How absurd! There should've been testers of lower ratings as well

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

If C can be solved in O(n^2) using 2D prefix sum, why was limit on n kept <= 500?

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

Many people complain that the contest is difficult, pointless, and the questions aren't tested. Is there a chance it will be unrated?

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

I think there is some issue with the ratings awarded in the contest. I solved 2 ques and got rank 4200 but still there was only +1 increase in my rating.

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

Not a proper Div. 2

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

B is so trash... 2 hours of hard brainstorm and zero as result

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

shitty contest

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

Hello coordinators,

I received a plagiarism warning regarding my submission (ID: 324506450) for problem 2113C, stating that it significantly coincides with other solutions.

I would like to respectfully clarify that I wrote my code entirely by myself during the contest. I used the CodeChef IDE to write my solution and was not aware that it might be publicly accessible. I did not share my code with anyone, nor did I copy from any external source.

I’m genuinely surprised by this warning, as I took care to participate fairly and independently. If a similarity exists, it must be purely coincidental or unintentionally caused by the editor I used.

This is the first time something like this has happened to me, and I now understand the importance of using private local editors. From now on, I will make sure to use a local editor like Visual Studio Code to avoid any such issues.

Please let me know if I can provide any further details to support my case. I would be grateful if you could kindly review the situation again.

Happy to explain my solution or share additional information if required.
Thank you for your consideration.

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

awful

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

I received a message that my solution (ID: 324490202) for problem 2113B significantly coincides with submissions from other users. I would like to clarify that I wrote the solution entirely on my own during the contest and did not engage in any form of cheating or code sharing.

I have not shared my code with anyone, nor have I copied from any source. If there is any similarity, it is purely coincidental or possibly due to similar logic being used for standard approaches. I did not use any public IDE or make my code accessible online in any form.

I fully respect the rules of Codeforces and competitive programming ethics. I kindly request a fair re-evaluation of my submission.

Thank you.

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

Competitive Programming in 2025 – A Broken Race?

Two coders. Same leaderboard.

  1. One writes 200+ lines, fails test case #83, debugs, and finally ACs.
  2. The other pays ₹25 and submits instantly.

Result?

  1. Both rank above you. One earned it.
  2. The other bought it.

The problem: CP is turning into a “pay-to-win” model.

Impact:

  1. Honest coders feel demotivated
  2. Rankings lose meaning

The spirit of CP is at risk !!

The ask: Platforms like Codeforces, CodeChef, LeetCode must act fast. Cheating isn’t just breaking rules — it's breaking the community.

Let’s keep CP clean. Let’s keep it fair. Agree or disagree?