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

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

Üdv, Codeforces!

Error-42, gortomi and I are glad to invite everyone to participate in Codeforces Round 1030 (Div. 2), which will be held on Jun/12/2025 17:35 (Moscow time). You will be given 6 problems and 1 subtask with 2 hours to solve them.

The round will be rated for participants of Division 2 with a rating lower than 2100. Division 1 participants can participate unofficially.

All problems are authored by Error-42, gortomi and me.

We would like to thank:

We hope you will enjoy and have fun in the contest. Sok szerencsét!

UPD1: Score distribution: 500 — 1000 — 1000 — (1250 — 1000) — 2500 — 3500

UPD2: Thanks for participating, editorial is out!

UPD3: Congratulations to the winners!

Div. 1:

  1. tourist
  2. ksun48
  3. tiger2005
  4. maspy
  5. StarSilk

Div. 2:

  1. geniorzity
  2. KaiKaKa
  3. 2ky
  4. Bronya_H
  5. hondacity
  • Проголосовать: нравится
  • +311
  • Проголосовать: не нравится

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

I hope that the problems are interesting and I everyone gets a positive delta , I reach Specialist !!!

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

As a tester, I am glad to have been sapphire this time )

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

Interested! Just it would be fine if i don’t get wrong on first 3 problems.

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

obsidian testing :orz:

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

It was a pleasure doing obsidian testing as my very first Codeforces round! And what a round!

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

Error-42 round orz

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

Hopefully the problems A-B-C are sorted difficulty wise unlike recent educational round

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

As a tester, I'm really happy seeing my name in the first place of the row. I wish "Kéz és lábtörést!" for everyone participating!

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

SpyrosAliv is a goated tester :)

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

I hope for a round with interesting problems and no Newbies performing like Grandmasters...

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

It seems that this round is related to gems. I need to quickly review the algorithms about gems and minerals.

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

As a banana tester, here is how we decide the score distribution:

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

Did the coordinator reject good problems too? (for anyone confused there is white text after rejecting our bad ideas)

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

strong hungarian contest! glhf

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

Hoping for a good round.

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

I hope to solve all problems (or at least 9 problems)

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

Why is there no emerald testing?

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

Thank you for the beautiful problems.

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

satyam343 for their amazing coordination and for rejecting our bad ideas (and several other problems too.) missing line

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

Thank you for letting me test this amazing round, it was very fun!

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

Did anyone else also notice that.. "and several other problems too."?? XD

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

As a CF newbie, I hope to rated rising more, come on!

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

my first competition.hope to solve 1 problem?

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

As a tester, it's a nice round

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

hopefully the round i finally reach CM :sob:

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

i hope i reach expert for the first time after this contest!!!

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

WHY I cannot paste code on phone?My computer is stuck and cannot login Codeforces.qwq

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

I hope I reach pupil in this contest

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

who can tell me ,as a beginner, where should I go to look at the explanations for the problem?

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

I lost my rank 1 :(

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

Is this contest rated or unrated?

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

oh no .. I got the idea for problem D2 but couldn't code it ... aaaaa!!!!

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

How do you solve B?

I literally spent like 90 minutes on it.

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

    I actually knew a trick which rotates the array

    so if array is abcde .. let me reverse first two and last 3 .. we get baedc ... now if you read this from a towards left .. you getabcde ... so this is a rotation of reverse of string ... this way you can find all rotations using 2 operations for each row and you can achieve

    edcba ( 1 reverse whole string )

    aedcb (reverse 1 to 1 and then 2-5)

    baedc (reverse 1 to 2 and then 3-5)

    cbaed (reverse 1 to 3 and then 4-5)

    dcbae (reverse 1 to 4 and then 5-5)

    although reverse (1,1 ) and reverse (5,5) are redundant... they are allowed in the problem and don't increase the count above 2*n

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

    Follow this pattern

    1 1 n

    2 1 n-1

    2 n n

    3 1 n-2

    3 n-1 n

    4 1 n-3

    4 n-2 n

    and so on..

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

    something like that ~~~~~ void Solve() { int n; cin >> n; cout << 2 * n — 3 << endl;

    for (int i = 1; i <= n; i++)
    {
        int r1 = n - i + 1;
        if (r1 > 1)
            cout << i << " " << 1 << " " << r1 << endl;
        int l2 = n - i + 2;
        if (l2 < n)
            cout << i << " " << l2 << " " << n << endl;
    }

    } ~~~~~

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

Just how angry must a person be to make that kind of Problem B. B >>>>>>>> C :(

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

THE B PROBLEMMMMMMMM

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

Any chance for py to pass D1 in O(qnk)?

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

I was going to submit on D2 and time finished 0.5 seconds before i submit

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

I was only 1 second away from successfully submitting my E solution — when I moved my mouse over the submit button, the contest showed it was over

My mistake was: I swapped n and m, but didn't flip the output。:))))))

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

Can someone help me figure out why I am getting TLE (Problem C) on https://codeforces.me/contest/2118/submission/324135426. The time complexity is n(logk)^2

It seems to work whenever k is less than ~10^9. But n=1, a[0]=0, k=1e10 seems to break it :(.

Thanks

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

(B)>>>>(D)>(C)>(A)

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

Problem B demoralized me so badly,I left the contest halfway.

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

    Same. I solved A in 1 minute, then spent 58 mins (!!) on B. Honestly skill issue on my end for overcomplicating it, but yeah :(

    Could've had such a good run today if I solved B like I usually do. C was quick and I had the idea for D pretty quickly but didn't have the time.

    Oh well, back to specialist I go :,)

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

      After spending too much time on Problem B, my brain just froze, and I ended up leaving the contest without even looking at the next problems. Definitely need to bounce back stronger in the next contest.

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

Is there any easy to code for D1, i got stuck at dfs with memoization for 1 hours ToT.

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

    Well, I defined state[i][j][b] to mean that we are currently at stoplight I, at time j mod k, and b is 0 or 1 indicating we are facing left or right. Then it’s just a matter of cycle detection from the first stoplight we hit. Let -1 indicate the state is unprocessed, 0 for under processing, 1 for having been processed and answer is no, and 2 for having been processed and answered is yes. That’s pretty much it.

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

    for D1 you don't need DFS ... you can simulate the whole process ...

    but your solution might have solved D2 I think

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

      My dfs is like dfs(int pos, int timer, int state) to know where is the traffic light we are in and the total time mod k and state is go left or right so how can I improve this to do D2.

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

        oh so for D2 the idea I came up with was ... you can draw and edge between i and j if pos[i] + d[i] MOD k was same for both... but you need to remember the direction of edge ... like i to j or j to i

        now with one DFS / BFS you can find out if a node is on a cycle ... then you can't escape if you meet a node

        I thought you were doing DFS like this

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

My luckiest contest

1030E.png

My E idea: First color the center, then color the outer circle of the center, and then color the outer circle of this outer circle,... For a circle, the closer it is to the four corners, the later the color should be.

Code: 324136762

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

I after reading B was intuitive to understand that it needed some left rotation logic that needs, to be done, but couldn't figure out the logic of left rotating within 2 operations, can someone tell me how to do it? Also, which type (tag) of problems on codeforces should I practice, to improve my intuition and logic for these kind of problems. Any help or suggestion would be appreciated...

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

How are B and C the same score?

C is way too much easier than B

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

Solved ACE but not B. Oh well.

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

Why this testcase gives YES in D ?

1
3 4
5 6 7
1 3 3
1
6
»
17 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

is it possible to simulate the entire process in D1? i tried doing DFS with directed edges but i couldnt implement it

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

if only i had read C before B :(

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

I don't think D1 is a proper problem that can exist in the contest. First, the solution of D1 and D2 are totally different. Secondly, D1 worths 1250 point so that solve D1 first can gain more score than solving D1 and D2 at the same time (maybe D1-500p, D2-1750/1500p would be better).

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

    D1 was added to bridge the difficulty gap between C and D2.

    First, the solution of D1 and D2 are totally different.

    I do not agree with this in general. It might be the case for your solutions. It is true that D1 does not require much thinking. But it is still a decent task for div 2 participants. That is why it was added. Sometimes, we do need to add some filler problems to balance the contest.

    maybe D1-500p, D2-1750/1500p would be better)

    In my opinion, D1 should definitely have more points than B and C. Yes, it could be argued that we should have had more points for D2. We were in fact thinking about having (1250 + 1250). But we did not do that. A lot of div 2 participants would be affected if we had low points for D1 (slow ABCD1 getting beaten by fast ABC). That is why we kept more points for D1 than B and C. We did not increase the points for D2, because we might need to increase the points of E too in that case (well, difficulty of D2 versus E is debatable). But that's the issue with subtasks, which are sometimes needed to bridge the difficulty curve.

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

Wasn't left with enough time to implement D2 so prompted GPT with the (not so well explained) idea and it gave a short and clean code. Didn't submit that, but wouldn't have been that hard to make edits and escape plag from other GPT generated codes.

I wonder if the AI guidelines could be relaxed when the prompt itself fully specifies the solution and implementation, as those only seem to serve as a compliance checklist for genuine competitors due to the system's inability to catch every violation.

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

If anyone asks whether rainboy strategy is good:

I started today's contest on problem E (not even the last one). After almost one hour and WA on test case 2 I gave up and went to D. Solved D2 and D1 close to the end of the contest and still had some spare time left to solve C. Tried A without even reading the problem properly and that was it. Final result: ~ position 6000 (which is around 1330 performance, almost 800 below my rating).

So yeah, don't do rainboy strategy unless you mogg the contest you are doing

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

Am I the only one that found C super easy?

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

i am so restarted solved only A

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

B killed me

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

my jugaad solution for D1, simply simulated it- got tle/wa added a count-- variable on every rebound,played around some values and 1000 seems to work.

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

    So I use DFS to solve D1.Find a position with a light and a time to start,then see what happens the next light and so on.

    For example,input data:

    3 1000
    9 99 616
    819 0 0 1
    

    You choose to start at the second light at time 514,and it’s equal to start at the third light at time (514+616-99)%1000 = 31.Since it may change your facing direction,you should enumerate two directions.

    That will be O(n^2),available to solve D1 but not D2.

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

    i did the same lmao just to be safe i set that count to 1e4

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

B is kind of ad-hoc.C and D are quite GREAT problems!!!

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

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?