K1o0n's blog

By K1o0n, 3 weeks ago, translation, In English

Hello! We invite you to participate in Codeforces Round 1125 (Div. 3), which will take place on Oct/07/2026 17:45 (Moscow time).

This will be a Division 3 round. You will be given 8 problems, authored by me and polished to perfection with the help of Noobish_Monk and Gornak40, as well as 2 hours and 30 minutes to solve them.

The round will be hosted by rules of educational rounds (extended ICPC). Thus, all solutions will be judged on preliminary tests during the round, and after the round, there will be a 12-hour phase of open hacks. After the open hack phase, all accepted solutions will be rejudged on successful hacks. Also, note that there is no score distribution but the usual penalty of 10 minutes for each wrong submission, following the rules of educational rounds.

We remind you that only trusted participants of the third division will be included in the official standings. This is a necessary measure to combat unsporting behavior. To qualify as a trusted participant of the third division, you must:

  • have participated in at least five rated rounds (and solved at least one problem in each of them)

  • have never had a rating of 1900 or higher.

Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you (unless you register unrated).

Note the rule restricting the use of AI. Previous announcements have already tried to scare you, so we will carry on the tradition: if you are caught breaking these rules, you will be sent straight into Gornak40's enclosure with the enraged gorillas.

I would like to thank the following people:

Good luck!

The round team
Once upon a time, photos of the authors were a beloved tradition in Codeforces announcements — so we decided to take a little trip down memory lane.

upd: Congratulations to the winners!

Trusted participants:

  1. phibrain
  2. iaica1488
  3. lixintianshen
  4. JustPinkiePie
  5. t3jtex

All participants:

  1. abc864197532
  2. paracompact
  3. peti1234
  4. leg
  5. StarSilk

We have also published the editorial.

upd2: First solves by problems:

Problem A B C D E F G H
First to solve ErrBrush paracompact MuoohlAG dinhphong0703 anuintech Adhoom Horka RunTimeError2011
Time 00:01 00:03 00:05 00:06 00:09 00:12 00:14 00:17
  • Vote: I like it
  • +277
  • Vote: I do not like it

»
3 weeks ago, hide # |
 
Vote: I like it -39 Vote: I do not like it

One day passed, still no comment :skull:

»
3 weeks ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

No thank you for KAN?

»
3 weeks ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

is that Private Pyle

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Crazy Excited.

Excited to share that I am sad that this is unrated for me :( :) ..

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Too bad it'll be unrated for me

»
3 weeks ago, hide # |
 
Vote: I like it +90 Vote: I do not like it

least suspicious rating graph in 2026

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

First time seeing an unrated tester, wow.

  • »
    »
    3 weeks ago, hide # ^ |
     
    Vote: I like it +1 Vote: I do not like it

    what is the role of the tester could you please explain please?

    • »
      »
      »
      3 weeks ago, hide # ^ |
       
      Vote: I like it +1 Vote: I do not like it

      Testers usually tests the round before it goes public.
      Check problem statement & solutions to find bugs or other issues.
      Solves the contest virtually to evaluate the difficulty levels of each problem.
      Of course these all done by only invitation to some selected trusted participants by the authors.

»
3 weeks ago, hide # |
 
Vote: I like it +11 Vote: I do not like it

Goat picture

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Tymon Kolasiński?

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

why can't i register for Round 1125 (Div. 3)?

»
3 weeks ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

"red-and-black testing of the round."

white and red for chad's

»
3 weeks ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

I hope everyone has a round full of positive delta and fun! Also K1oon mogs btw

»
3 weeks ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

Oh no, last time it's cry's permanant active volcano basement, this time it's Gornak40's enraged gorilla basement! What's next? Hungered leopard basement, or Dr.Frankestien's second lab? But remember bill_s' words: Every time that a guy on codeforces doesn't get a joke an angel loses it's wings.

»
3 weeks ago, hide # |
 
Vote: I like it -8 Vote: I do not like it

More Cyan, Green, Gray testers. That's very good.

»
3 weeks ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

Great lineup! Looks like my photo is the only one missing from your laptop

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hoping to solve atleast 3 and not bomb this one :wilted_rose:

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Is it rated?

»
2 weeks ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

Note the rule restricting the use of AI. Previous announcements have already tried to scare you, so we will carry on the tradition: if you are caught breaking these rules, you will be sent straight into Gornak40's enclosure with the enraged gorillas.

I didn't know Noobish_Monk and Gornak40 were enraged gorillas... K1o0n looks almost happy to be locked in with them!

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

first codeforces contest let's get hype y'all

»
2 weeks ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

Good luck to everyone participating in this contest! I wish you all the best and a fair contest.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I want to be Specialist. so I hope this contest goas well.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I'm Excited to take part! :)

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

If Alice and Bob played optimally in real life, they would have gotten married or broken up by now.

»
2 weeks ago, hide # |
 
Vote: I like it -24 Vote: I do not like it

@MikeMirzayanov, I am very sorry for bringing an account issue into this thread, but I currently have no other way to contact the administration since my secondary account is restricted from creating blog posts.

My original Codeforces account Ayushi_Vadariya has been disabled, and it shows the message: "User is disabled by administrators." I have not received any email explaining why, and I have already tried emailing support without a response.

I value this community deeply. Could you please take a look at my original handle Ayushi_Vadariya and let me know the reason for the disablement, or grant me a manual review? I will strictly follow all rules moving forward. Thank you so much for your time.

  • »
    »
    2 weeks ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    You took help from AI, that's why got ban.

    Check your submission time u were faster than LGM in Ayushi_Vadariya You did solve All under 30 minutes which is insane...

    I know because i faced the same, as i took hints from AI tools still got banned. Thats why follow the guidelines for the platform i.e Solve by Yourself that's it..

    • »
      »
      »
      2 weeks ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      This account is incredibly important to me because of all the hard work I put into my past contests and practice. Is there any way my account can be restored if you completely wipe out my rating, rankings, and submissions for this specific contest? I promise to strictly follow all guidelines and compete entirely on my own moving forward. Please give me one final chance.

      • »
        »
        »
        »
        2 weeks ago, hide # ^ |
        ← Rev. 2  
        Vote: I like it +3 Vote: I do not like it

        try mailing admins, i tried no response, even wanted to delete codeforces account data for email, still no response.

        just solve by yourself, this is what u can do from ur current accout solve by yourself no use of AI and other platform u will be safe. Also u have done only single contest from ur disabled account so forget it, its just a newbie account

  • »
    »
    2 weeks ago, hide # ^ |
     
    Vote: I like it -24 Vote: I do not like it

    @MikeMirzayanov, I want to be completely honest. I did use external assistance/AI during the contest because I panicked about the time. I deeply regret this decision and realize it ruins the integrity of the community. I am truly sorry. Is there any way my account can be restored if you completely wipe out my rating and submissions for that specific contest? I promise to compete entirely on my own moving forward.

    • »
      »
      »
      2 weeks ago, hide # ^ |
       
      Vote: I like it +3 Vote: I do not like it

      Use a new account, don't cheat again. That's the only right thing to do here. CF shouldn't reinstate your account because you 'promise' to not cheat again.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

The picture is like 2018 perfect football trio

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

wow didn't know that someone knows about "haikyuu" anime and would put on their profile.

Gornak40 , is your favourite character is Sugawara ?

(sorry for my bad english grammar...)

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

hey there, this is my first second contest(i am unrated) but i solved many problem on the CSES introductory set, so if i will be considered as trusted participant or not

»
2 weeks ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

delay forces ....

»
2 weeks ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

10 mins delay????

»
2 weeks ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Has it been postponed by 10 minutes?

»
2 weeks ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

one refresh costed me 10 mins :(

»
2 weeks ago, hide # |
← Rev. 2  
Vote: I like it +17 Vote: I do not like it

I only have 1 hour and 50 minutes left to sleep because of the delay -_-

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Why is there a 10-minute delay in the contest?

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

umm 10min more :(

»
2 weeks ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

Why delay?

»
2 weeks ago, hide # |
 
Vote: I like it -21 Vote: I do not like it

Subject: Appeal regarding disabled account / Submission issue due to system error

Hello Codeforces Support Team,

I am writing to appeal a recent issue with my account (ion99). I solved a problem through my own hard work and effort, but unfortunately, my submission/account was disabled due to what appears to be a system error or a false-positive judgment.

My Handle: ion99

Contest:Codeforces Round 1125 (Div. 3)

I assure you that I wrote the code entirely by myself without violating any rules. Could you please review my submissions and restore my account?

Thank you for your time and assistance.

Best regards,

ion

»
2 weeks ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

the entire contest is of K1o0n's life :|

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Man I was too busy today and I just got home. Now its too late to participate :(

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Question regarding the “Hacking” phase:

If we hack someone’s solution successfully during the hacking phase, we will receive points for it. What about hacked participant’s solution be nullified, meaning they will get 0 points for that problem?

»
2 weeks ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

wasn't E just max spanning tree? if yes why doesn't this work — https://codeforces.me/contest/2275/submission/393627241

»
2 weeks ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

Nice problems,I liked F and G.

»
2 weeks ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

Why is the TL so tight in H? Is there really a much easier approach with worse time complexity? I cannot think of one.

»
2 weeks ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

Choked in F despite formulating the idea :(

»
2 weeks ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

Great Contest!

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can someone help explain Problem E? Thanks!

  • »
    »
    2 weeks ago, hide # ^ |
     
    Vote: I like it -41 Vote: I do not like it

    Core Problem Definition

    • Objective: Find a Maximum Weight Hamiltonian Path on a strictly constrained $$$2 \times N$$$ strip graph, initiated specifically at vertex $$$a_1$$$.
    • Algorithmic Limitation: Computing a longest path is NP-hard on general graphs. Standard tree-based approaches (like a Maximum Spanning Tree) fail because they permit vertex degrees greater than two, directly violating the strict non-branching, visit-once topological constraints.

    Dynamic Programming (DP) Architecture

    • State Machine Approach: The rigid structure of the two parallel arrays limits valid continuous, non-self-intersecting paths to a finite number of recurring macro-states. The solution requires a DP state machine that evaluates the graph incrementally, column by column.
    • State Tracking ($$$i$$$): At each column $$$i$$$, the DP maintains the maximum accumulated edge weight for each mutually exclusive routing configuration.

    Topological Traversal Patterns (DP States)

    • Alternating Cross-Edges: Paths that strictly zigzag between the top and bottom rows as they advance.
    • Composite Forward-Backward Loops: Paths that advance through a sequence of nodes via diagonal edges, then route backward along the opposite row to resolve bypassed vertices before advancing again.

    Complexity and Resolution

    • State Transitions: By mapping these valid routing states and their structural transitions to column $$$i+1$$$, the DP approach collapses an exponentially complex pathfinding problem into a deterministic $$$O(N)$$$ state-transition evaluation.
  • »
    »
    2 weeks ago, hide # ^ |
    ← Rev. 6  
    Vote: I like it 0 Vote: I do not like it
    Spoiler

    I hope it's correct. It's not really formal

    • »
      »
      »
      2 weeks ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      yeah if a_i and b_i are both visited and there is some vertex a_k or b_k not yet visited (where k < i) then you can no longer visit it from a vertex on the right of a_i and b_i as there is no edge going into the blocked region...and the only way you can have all the vertices upto i visited is by down-diagonal combo

  • »
    »
    2 weeks ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    there is observation, last building which we will visit will be one among b[i], a[i] can never be last building to visit so we will assume lets say this particular building b[i] will be last one ,to reach it there will be only one patten , before b[i] — pattern will be down-diagonal-down-diagonal after b[i] — it will be all all diagonal except there will be one down at last

    you can try it yourself , this is only way , else you will be end up in loop

    take test case second : they fixed b[2] as last , before it pattern is all down-diagonal-down-diagonal after it its all diagonal

    try this for all b[i] precompute suffix sum of diagonal pattern which is forming that way you can compute for all in O(n) and then count the maximum one

  • »
    »
    2 weeks ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    From a[i], there are exactly two types of paths and both lead you to b[i]. The first path is the simpler a[i] -> b[i]. The second one goes a[i] -> b[i+1] -> a[i+2] -> ... -> b[i]. Therefore, we traverse first i columns like a[1] -> b[1] -> a[2] -> b[2] -> ... -> a[i] and from here, we take the alternative to reach b[i]. Best alternative path length for each i can be pre-computed using dynamic programming. Then, a running prefix will help us achieve the optimal result in O(n).

    You can see my solution on my submission page.

  • »
    »
    2 weeks ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    I guess you have understood the solution by now, but the main idea is that once you start going zig-zag {like a_(i) -> b_(i+1) -> a_(i+2)} , you'll have to continue going zig-zag till you cover all the nodes. So effectively there are O(n) paths only, whose path sum can be computed in a sequential manner

»
2 weeks ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

Did not read problem E correctly. Did I actually solve harder version where you could start at any point? 393623229

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

probably hackable if anyone wants to give it a shot: https://codeforces.me/contest/2275/submission/393605027

»
2 weeks ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

D's given test cases saved me from an edge case.

»
2 weeks ago, hide # |
← Rev. 2  
Vote: I like it +26 Vote: I do not like it

In Problem G, the statement specifies that n>=2 , but test 3 includes cases where n = 1. Could the problem setters please clarify this discrepancy?

  • »
    »
    2 weeks ago, hide # ^ |
     
    Vote: I like it +24 Vote: I do not like it

    Hello, it was clearly our mistake. We have now removed all test cases where n=1, which turned out to be the whole test 3, and no other tests needed to be changed. We then rejudged all affected solutions. Luckily, only five participants, including you, were affected. All rated participants have been informed and offered the option to make their participation unrated if they want.

    Sorry for the inconvenience.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

GCD is safe today!!!

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

E was a really good constructive problem, D felt a bit like implementation hell. Nice contest, thanks authors!

»
2 weeks ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

https://codeforces.me/contest/2275/submission/393529162

shiv_das you cannot pass son 😭😭

(I've seen around 10 hack attempts for your submission what's up ...)

  • »
    »
    2 weeks ago, hide # ^ |
     
    Vote: I like it +3 Vote: I do not like it

    lol that @shiv_daa. so many hackers targeted him . and @MathModel you are crazy bruh , I saw you hacked so many . Any tips on how to hack

»
2 weeks ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

Dear admins, thank you for unbanning me. Please, make this contest unrated for me.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Shameless AI Code 393603806

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I hate how problem E is written lol.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

One important thing I learned this contest is that DO NOT SOLVE PROBLEM BACKWARDS, it is penalty maxxing.

»
2 weeks ago, hide # |
← Rev. 4  
Vote: I like it 0 Vote: I do not like it

D:
393654025

we can binary search on min now if we have 3 values let's say they are a1,a2,a3 if sum already greater .... if all values equal then u can't

if ther's any pair such that first greater than second then we can use this pair to incremnt the third  elemnt till reach mn

else we have sorted a1,a2,a3 so we need to reach state that some pair first greater than second and offcourse doing opetion +=0 is useless so we will do some minus and then back to plus u can pick the min diffrence btw two variables and pick this pair as the target pair and the proof we can always achive this min df u can proof it by considering these 3 cases (1 1 3) ,(1 3 3) ,(1,2,3)

E : while u move from ai to bi to ai+1 and repeat that's fine once u moved from aj to bj+1 u can't do az to bz or bz to az anymore except for z = n cuz this mean u cant back to left values so u'll comlete in zigzag till reach n and then back (so over all it's two moves prefix and suffix)

F: even only if number is perfect square (divsors are d , n/d ) checking perfect from prime factors is if each prime factor cnt is even H : (a1+a2+....an)^2 = sum of ai * aj >>i have anonter comment below about this problem so enough

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

How to solve H :(

  • »
    »
    2 weeks ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    (a1+a2+....an)^2 is the same as sum of ai * aj for any i , j

    so it's like some of first cell * second cell * priority of sub include them *count sub satisfy fixing one cell and priorty of rows ,cols helps

    for me it's well known before the contest but u can proof it starting from (a+b)^2 = a*a+b*b + 2*a*b ((a+b)+c)^2 ...

    • »
      »
      »
      2 weeks ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      I tried to solve a simple problem is sum of 1D array and it was not hard. But on 2D it was harder than I think

      • »
        »
        »
        »
        2 weeks ago, hide # ^ |
        ← Rev. 2  
        Vote: I like it 0 Vote: I do not like it

        393630206 this one is mle and maybe tle but can be optimized to pass az it only n*m * 8 can u look at this

        im solving for cells that first cell (i,j) , (i2,j2) where i<=i2 and j<=j2 then i reverse the matrix and call work again to cover the remaining pairs (first pair is always i<=i2 but either j<=j2 or j2<=j)

        i brute forces the i,j cell and the r1,c1 priority for the left corner of the submatrix and r2,c2 the down right corners so it's like for reach cell from (i2,j2) i take it's contrubtion

    • »
      »
      »
      2 weeks ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      So we need to calculate for each pair of elements (i, j) (k, l) 1<=i,k<=n, 1<=j,l<=M in how many submatrices they both are and the sum s = (-1) ^(a+b) over all of these. Then the contribution to the answer is a[i][j] * a[k][l] * s

      Now lets think about the values of (a+b) for the submatrices. We have the smallest submatrix (min(i, k), min(j, l)) (max(i, k), max(j, l)). Then we can extend it in the 4 directions and one extention add 1 to a+b — flips the sign. This means that this pair of elements doesnt cancel out (s=0) only if all the possible border directions have an odd number of choices. s = 1 for these.

      So the answer is a[i][j] * a[l][k] * (-1) ^ (i+j+k+l) for i, j, k, l with min(i, k) % 2 == 1 and min(j, l) % 2 == 0 and max(i, k) % 2 == n % 2 and max(j, l) % 2 == m % 2.

      This can be calculated by fixing the side i, j, k, l an element is in the pair and iterating over the matrix.

      Not the best way to explain, but maybe you get some direction

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I hope I did well in this contest

»
2 weeks ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

I except div 3 to have short questions statements , at least not this long .... D was too hard for a div3 D . Thanks for the contest but a great div 3 like last div 3 made my exception high...

  • »
    »
    2 weeks ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    D was a simple binary search problem. I think E was a very good problem and that F was easier than E.

    • »
      »
      »
      2 weeks ago, hide # ^ |
      ← Rev. 2  
      Vote: I like it 0 Vote: I do not like it

      except it s not, in a ‘simple’ binary search problem, there’s no math observation, and the math for that was kind of hard to figure out, and even then you had to subtract 2x the amount it takes to get an element to be changeable to it back to its sum before the operations, so i dont think it s a normal binary search

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

For F, I thought that I only need to look at each elements, prime factors's powers parity i.e 2^x * 3^y and so on is a number, I am eventually just looking at the parity of x and y. Now for some given j where we take the subarray from index 1 to j, lets say I know the prime factors whose power is odd, I just need those indices i, who has the same parity(odd) for the same prime facts in the subarray 1 to j

The issue for me arises in how to optimally find those indices for each j without O(N^2), I thought some freqmap would help, but for each j I will have different set of odd powered prime facts, how do I get them indices i optimally is there some O(logn) approach for this?

  • »
    »
    2 weeks ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Get the square free value for every number and store its frequency in a map. Then, iterate over all valid prefixes maintaining a set of active primes. Notice, that the product exceeds 1000000 in at most 7 primes. So, now you have the square free value of the current prefix and you can find how many pairs it forms with all valid i. Check my solution out. There is one logical error though and that is I did not use the early break when prefix exceeds 1000000 which is important to prevent overflow. But it somehow passed after the contest.

»
2 weeks ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

Dear Codeforces admins,

I got account — reroru — blocked on Codeforces Round 1125 (Div. 3). I’m not a frequent visitor to the site, but I’ve participated in contests and followed the rules. During this contest, I came across an llm injection in one of the problems, decided to have some fun, and even left a comment in the code clarifying the error in the hidden request.

Please take a look at my solutions. I’m to blame, I understand everything — it was a stupid thing to joke about like that. You can ignore these competitions, but I’d like to ask you to return the account I used to solve problems back when I was just starting my university studies.

I apologize for creating a second account; there was no other way to get in touch.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

The worst tests I have ever seen...

Honestly, these tests were absolutely ridiculous.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hi I submited the solution of the problem in pypy https://codeforces.me/contest/2275/submission/393587956 it gave tle but cpp submission that I did after contest was passed will you tell me the reason as both submissions are quite similar for me.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

nice contest :)

i think D was harder that E

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hello Codeforces Team, My submissions from Round #1125 (Div. 3) have all been marked as Skipped, and I received a system message stating that my submission 393618819 for 2275G significantly coincides with several other submissions. I would like to request a manual review. I independently solved the problems during the contest and did not copy or collaborate with other participants. In particular, I independently derived and implemented my solution for 2275G (submission 393618819), and I can explain the complete reasoning behind the algorithm and implementation if necessary. I understand and respect Codeforces' anti-cheating rules, but I believe this may be a false positive. I would be grateful if my submissions could be manually reviewed. Thank you.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hello coordinators,

My submissions for yesterday's Div. 3 round were all changed to "Skipped" due to a violation flag on Problem D.

I wrote the logic entirely by myself, but I made the mistake of using the online CodeChef IDE to compile my code during the live round. I suspect my code may have been scraped or viewed publicly without my permission.

I did not intentionally share my code or cheat. Could a coordinator please take a quick look to confirm if it was a false positive, or let me know if the rollback is completely permanent? Lesson learned regarding online IDEs, and I will strictly use local editors in the future.

Thank you for your time.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hi Codeforces team,

I got a plagiarism warning for my solution to 2275D (393586673), but I didn't copy code from anyone or share my solution.

I just want to explain my approach. First I calculated the sum of each triple and took the minimum sum. Since we need to maximize this minimum value, I used binary search on the answer.

For each triple I calculated the cost needed to start increasing its sum. If the triple was already not sorted, the cost was 0. Otherwise I checked how many operations it takes to make b less than a or c less than b, and took the minimum valid one. I also handled the case where all 3 values are equal separately.

Then for each mid in binary search, I calculated the total operations using "(mid-S[i])+2*cost[i]" for triples below mid. If the total was within k, I tried a higher value otherwise a lower one.

I know the other code looks similar but this is how I approached the problem. I don't really know how else I could have implemented the same logic. Now all my submissions are showing skipped even though my rating increased.

I genuinely solved the problems myself and I request you to please review my submission once again. I would really appreciate it.

My submission: https://codeforces.me/contest/2275/submission/393586673

Thank you.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hello, I received similarity warnings for my submissions 393574789 (Problem B) and 393625564 (Problem C). I would like to clarify the circumstances. I independently derived the problem-specific logic for both problems during the contest and did not copy the problem-specific solutions from the submissions mentioned in the warnings. Before the contest, I had generated a personal Java contest template using an AI tool. The template contained generic boilerplate such as the imports, Main class, Scanner, test-case handling, input parsing, and common variable names such as t, n, and a. These submissions were the first time I used that template in a contest. I also used VS Code's document formatting feature. I understand that the similarity detector has identified substantial overlap, particularly in the problem-specific portions. I still have the handwritten rough work I made while solving the problems during the contest, including my intermediate calculations and reasoning. I can provide the original rough work and the template if they would be useful for a manual review. I would appreciate a manual review of the submissions in light of this information. Thank you.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hello Codeforces team, I am writing regarding the plagiarism warning for my submission 393601315 for problem 2275G (G — Copper Squander). I want to clarify that I wrote this solution independently during the contest. I did not copy or receive the solution from any of the users mentioned in the warning. There is an important chronological detail that I would like to ask you to consider: - My submission 393601315 was submitted at 23:15 UTC+7. - The three submissions from Ajeyoshi_KaminaRyu that I can still access were submitted later: — 393618387 — 23:52 UTC+7 — 393621008 — 23:58 UTC+7 — 393622359 — 00:02 UTC+7 In particular, submission 393622359, which was listed in the warning, was submitted 47 minutes after my submission. The other accounts mentioned in the plagiarism email now appear to be disabled or locked, so I cannot independently verify their submission timestamps anymore. I would therefore appreciate it if the Codeforces team could check the complete submission logs and timestamps internally. My implementation also follows the same coding template and style that I have used in my previous Codeforces submissions, including my usual variable naming and DSU implementation. I can provide links to those previous submissions for comparison. I understand that different contestants can independently arrive at the same algorithm, especially for a problem where Kruskal/DSU, prefix sums, and binary search are natural approaches. I respectfully request a manual review of submission 393601315 and the related submissions before any permanent decision is made regarding my account. I am willing to provide any additional information that may help with the investigation. Thank you for your time. Relevant submissions: My submission: https://codeforces.me/contest/2275/submission/393601315 Ajeyoshi_KaminaRyu: https://codeforces.me/contest/2275/submission/393618387 https://codeforces.me/contest/2275/submission/393621008 https://codeforces.me/contest/2275/submission/393622359 Evidence screenshots: Evidence 1 — My submission 393601315, showing the submission time of 23:15 UTC+7 Evidence 2 — Ajeyoshi_KaminaRyu submissions, showing submission times of 23:52, 23:58, and 00:02 UTC+7 Evidence 3 — My previous code showing the same coding template, naming conventions, formatting style, and implementation style

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hello Codeforces team,

I would like to clarify the similarity reported for Problem 2275A.

Both "c0der_paul" and "error502" are my own Codeforces accounts. I previously participated in contests using "c0der_paul", but my rating was continuously decreasing because I was unable to solve many problems during contests. I then created the "error502" account and started participating mainly in Div. 3 and Div. 2 contests.

The submissions mentioned in the report are from my own accounts. Therefore, the similarity between them is not because I copied another contestant's solution. The code/approach was reused from my own solution.

I understand that maintaining multiple accounts and participating in contests this way may violate Codeforces rules. I apologize for not understanding the rule properly. I wanted to clarify the situation honestly and ask you to consider this explanation.

Thank you.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Dear Codeforces team,

Please pay attention

My account — reroru — was blocked in round 1125 of Codeforces (Div 3). I’m not a frequent visitor to the site, but I’ve participated in contests and I follow the rules. During this contest, I came across an llm implementation in one of the tasks, decided to have a bit of fun, and even left a comment in the code explaining the error in the hidden query.

Please take a look at my solutions; I wrote the code myself, without any help from AI. I’m to blame, I understand everything — it was silly to joke like that. You can ignore these competitions, but I would like to ask you to return the account I used to solve problems when I was just starting to study at the university.

I apologize for creating a second account; I didn’t have any other way to contact you. Also, I’m sorry for the English — I’m using a translator, and my English is rather poor.

»
2 weeks ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Where is the editorial?

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

can anybody help and answer, why my solution on C problem got TLE (2 secs) with PyPy, but passed with Python3 (<200ms)? There is O(N) solution, numbers are not so big (-10^4<x<10^4), so what's the problem?

https://codeforces.me/contest/2275/submission/393593678

»
2 weeks ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

D is a little bit hard to implement than usual don't you think?

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I am writing to request a re-evaluation of my submission 393603719 for problem 2275G, which was flagged by the anti-plagiarism system.

I solved this problem completely on my own. I would like to provide a brief explanation of my approach and implementation:

1. MST Reduction:
I calculated the total sum of all edge weights (S), sorted the edges, and used Kruskal's algorithm with an iterative DSU to construct the Minimum Spanning Tree. I stored the MST edge weights in an array (w) along with their prefix sums (P).

2. Binary Search per Query:
For each query (x), I performed a binary search over the MST edge weights to determine the appropriate number of edges contributing to the answer, based on the condition involving (w[i]) and (x).

3. (O(1)) Answer Evaluation:
After determining the required index, I used the prefix sums and the resulting value of (k) to calculate the answer directly using the derived formula:

[ \text{Ans} = S — P[\text{lo}] — x \cdot \frac{k(k+1)}{2}. ]

The overall approach is based on reducing the problem to MST edge weights followed by binary search and prefix-sum calculations. Since Kruskal's algorithm, DSU, fast input using sys.stdin.buffer.read().split(), iterative find, binary search, and prefix sums are standard techniques, independently written solutions can naturally share similar implementation patterns.

However, the particular derivation, combination of these techniques, and implementation of my solution were done independently by me. I did not copy the submitted code from another contestant.

I would therefore kindly request that submission 393603719 be manually re-checked and that the plagiarism flag be reconsidered.

Thank you for your time and consideration.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I would like to clarify the plagiarism/similarity warning regarding my submission 393626811.

I solved the problem independently and did not copy or communicate with any of the contestants whose submissions were flagged as similar to mine. I understand that there are substantial structural similarities between my submission and other submissions, but the techniques used in my code come from standard competitive-programming methods, techniques I had already used before, and a publicly available Codeforces blog that predates the contest.

First, my code uses an SPF sieve with a maximum value of 10^6. This value comes directly from the problem constraints, since the given numbers can be as large as 10^6. The SPF construction was also not something I obtained from another submission. My earlier submission 393170864, submitted before this contest, already contains an SPF array and essentially the same sieve construction:

spf[i] = i;

followed by iterating from i*i and assigning the smallest prime factor when spf[j] == j.

Therefore, the use of an SPF sieve in my submission was consistent with a technique I had already used in my own previous code.

Next, in my shuru() function, I assign a random 64-bit value to each prime using:

mt19937_64 temp(chrono::steady_clock::now().time_since_epoch().count());

I did not obtain this initialization from another participant's submission to this contest. I had previously encountered this standard initialization in a public Codeforces blog published years before this contest:

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

Thus, the use of this particular random-number-generator initialization has a public source that predates the contest.

The hashval() function then factors each number using the SPF array and XORs the random value corresponding to a prime whenever its exponent is odd. This is the standard prime-factor-parity idea required for this problem: a product is a perfect square exactly when every prime occurs with an even exponent. Therefore, representing the odd/even parity of prime exponents using XOR gives a natural hash representation for the square-free part of a number.

After calculating these hash values, I take prefix XORs. Equal prefix XOR values correspond to a subarray whose combined prime-factor parity is zero, which means its product is a perfect square. I then sort the hash values and use lower_bound and upper_bound to count occurrences of each prefix value. I had already used binary-search functions such as lower_bound and upper_bound in my previous competitive-programming submissions, so this was also a technique I was already familiar with.

Overall, I acknowledge that my implementation has substantial structural similarities with other submissions: SPF sieve, random values assigned to primes, XOR representation of prime-factor parity, prefix XOR, sorting, and lower_bound/upper_bound. However, these are natural components of the standard solution, and several of these techniques were already part of my own previous competitive-programming experience. The randomized hashing initialization was something I had encountered in a public Codeforces source that predates the contest.

I am therefore requesting a manual review of my submission and the similarity warning. I am happy to provide my previous submissions and the above public source as evidence of how I arrived at these techniques.

  • »
    »
    2 weeks ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    you also getting WA on test 27, Same to me, do you know what's causing this problem?

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I have been wondering why I wasn't rated for this competition. I don't remember registering it for unrated though. Can someone tell me why l wasn't rated

»
2 weeks ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

Hello,

I received a plagiarism notification regarding my submission 393620350 for problem 2275E in Codeforces Round 1125 (Div. 3).

I would like to request a manual review of this case, because I developed the solution independently during the contest.

I would like to explain my thought process in detail: 1. First, I observed that since the path starts at vertex a1 and in each move, the path goes from a->b->a->b. So it should be end with b vertex. 2. Then, while manually tracing possible paths on small examples, I noticed a property: once the path takes a diagonal step from some vertex a[i] to b[i+1], a valid path creates a zigzag pattern each time and ends with b[i] 3. This led me to realize that fixing the ending vertex b[i] can say the full path. The left side is kinda parallel segment, and right side is kinda zigzag. 4. From this observation, I divided the path into two parts: pref[i]: the weight of the path from a1 to a[i]. suf[i]: the weight of the path from a[i] to b[i], which is a zigzag. 5. The maximum possible route length can be calculated as max(pref[i] + suf[i]). 6. After I had established this structure, I derived the corresponding recurrences directly by following the edges of these paths. In particular, the order of terms in my suffix recurrence shows the order in which I traced the vertices by hand along the zigzag path.

After receiving the notification, I looked the other participant's submission (393592636). I acknowledge that both submissions use the same algorithm and solution method. However, I found this solution independently, without copying or collaborating with the other participant.

I would like to point that I have consistently used a similar C++ coding template and implementation style throughout my competitive programming journey. My previous submissions on my account, Ardayan, demonstrate recurring habits in variable naming, function structure, input/output handling, and overall code organization. My implementation of this problem follows these established conventions.

I would also like to say that I am also participating competitions on informatics actively, so I am studying algorithms hard for a really long time.

I understand the importance of fair competition, and I respect your efforts to enforce these rules.

However, I believe that this similarity resulted from two implementations of the same algorithm, rather than any violation of the competition rules.

I request that my submission and previous coding history be reviewed manually. I believe that you will understand me.

I can also provide any information you want for the review.

Thank you for your time and consideration.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

editorial??

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hello,

I received a plagiarism/similarity warning for my submission 393602957 for problem 2275E, which was reported as significantly coinciding with submissions by kri_param and amanpolai.

I want to clarify that I independently derived and implemented my solution. I do not know either of these users and did not copy or obtain my code from their submissions or from any private/shared source.

My approach was to consider the two possible ways of connecting the elements at each position and split the resulting structure at every possible position. I used suf[i] to store the maximum contribution from the suffix starting at i, with the transitions

suf[i] = suf[i+1] + w(a[i], b[i+1]) + w(b[i], a[i+1]).

I then maintained the contribution of the prefix separately in pre and tried every possible split position m, taking

pre + suf[m]

as a candidate answer. The scoring function gives 2 when the two compared values are equal and 1 otherwise.

This is how I derived the solution myself while solving the problem. I was not aware of the other submissions and did not use their code.

My submission was made before the submission by amanpolai [only include this if the timestamps have been verified]. I would appreciate it if the submission timestamps and direction of similarity could be considered.

I am happy to explain my derivation in more detail or provide any available evidence of my solving process if necessary.

Thank you.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Request for review of automated plagiarism flag on problem 2275C (Submission 393606594)

Hello Codeforces Team and Round Coordinators,

I received an automated plagiarism notification flagging my submission 393606594 (Studeo) for problem 2275C against wheat0910 (393566710) and D.KAIN001 (393617690).

I wrote and derived this solution completely independently during the contest. The high token/AST similarity is a deterministic coincidence enforced by the mathematical invariants of the problem statement.

1. Mathematical Derivation & Invariant Uniqueness

The problem examines pairs of valid subsegments of length 5 over indices $$$0 \le i \lt n - 4$$$ (total $$$m = n - 4$$$ segments).

For a subsegment starting at index $$$i$$$, the required validity condition directly reduces to the sliding invariant:

$$$v[i] = a[i] + a[i+2] - a[i+4]$$$

Because this algebraic combination uniquely defines whether two independent subsegments share equal invariant signatures, any optimal solution is fundamentally constrained to compute:

$$$v[i] = a[i] + a[i+2] - a[i+4]$$$

There is no mathematically alternative way to represent this 3-term invariant without adding artificial computational overhead.

2. Combinatorial Pair Counting & Overlap Exclusion

To count all pairs of segments $(i, j)

Unable to parse markup [type=CF_MATHJAX]

satisfying the equality $$$v[i] = v[j]$$$: 1. Unrestricted Pair Counting: We aggregate occurrences in a hash map cnt[v[i]]. The total number of identical pairs is given by the standard combinatorial formula:
$$$\sum \binom{\text{count}}{2} = \sum \frac{\text{count} \times (\text{count} - 1)}{2}$$$
  1. Invalid Overlap Adjustments: Problem conditions restrict pairs from conflicting at overlapping offsets. Due to the step size of 2 in the triad structure, the only invalid collisions occur when:
  • Adjacent overlap at offset $$$+2$$$: $$$v[i] == v[i+2]$$$ where $$$i + 2 \lt m$$$
  • Adjacent overlap at offset $$$+4$$$: $$$v[i] == v[i+4]$$$ where $$$i + 4 \lt m$$$ Subtracting these invalid instances sequentially from ans via if (i + 2 < m && v[i] == v[i + 2]) ans--; and if (i + 4 < m && v[i] == v[i + 4]) ans--; is the direct, minimal, and canonical way to adjust the combinatorial sum.

Because the logic consists of fewer than 15 lines of core transformations, any competitive programmer using standard conventions (a, v, m, cnt, ans) will produce an identical Abstract Syntax Tree (AST).

3. Structural & Architectural Discrepancies (Evidence of Independent Work)

When comparing the submissions side-by-side:

  • My Submission (Studeo — 393606594):
  • Architecture: Non-modular; the entire logic is written linearly inside int main().
  • Header: Universal #include <bits/stdc++.h>.
  • Data Structure: std::unordered_map<long long, long long> cnt (Execution time: 281 ms).
  • I/O: Standard std::endl, without custom fast I/O setup.
  • Flagged Submission 1 (wheat0910 — 393566710):

  • Architecture: Modular structure separating logic into void solve() and main().
  • Headers: Explicit granular imports (<iostream>, <vector>, <map>).
  • Data Structure: Ordered std::map<long long, long long> cnt (Execution time: 78 ms).
  • I/O: Configured with ios_base::sync_with_stdio(false); cin.tie(NULL); and outputs "\n".
  • Flagged Submission 2 (D.KAIN001 — 393617690):

  • A direct variable-renaming clone of wheat0910 (retaining the exact void solve() design, cin.tie(NULL), and comment structure, simply mapping m -> total_triads, v -> love, cnt -> freq, i -> x).
  • My code shares no lineage with their modular template.

Given the rigid mathematical identity leaving zero degrees of freedom, the trivial implementation length, and the clear difference in template/container architectures, this flag is a false positive.

I kindly request the round coordinators to review submission 393606594 and reinstate the verdict from Skipped to Accepted.

Thank you for your time and assistance!

»
2 weeks ago, hide # |
← Rev. 2  
Vote: I like it +3 Vote: I do not like it

Could you mention first solvers of each problem please ?

I liked problem F a lot it was the first problem I solve during the contest

Upd: Thank you very much <3

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

wow first time being in top 5, great contest btw

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I would like to clarify the plagiarism flag for submission 393623515 for the problem 2275F . The system flagged my code as similar to another user's submission 393603577.I would like to clarify that i did not copy or leak my code anywhere and do not know the user.I have used my standard personal template that i use in every problem.

My implementation uses an SPF sieve to factor each value and compute its squarefree kernel. While processing the array, it maintains the set of primes whose exponents are odd in the current prefix product. It counts prefix kernels that are at most 1e6, then sums the counts matching each input value’s kernel. This follows from the fact that a number has an odd number of divisors exactly when it is a perfect square. Therefore, the product of an input value and a prefix is a square exactly when their prime-exponent parities match.

The similarity is just because both went for the exact same approach to track the prime parity using a standard SPF sieve and toggle the primes in a set. Because we are multiplying the primes in the set to form the prefix core,I had to add a break condition to prevent the product from overflowing.

If you look at the actual implementation details, they are clearly written by different people:

  • I added a custom pruning check (if(s.size() <= 7)) before multiplying, which the other code doesn't have at all.

  • I used an unordered_map and processed the prefix parity in a single pass.The other submission used an ordered map and split the counting and evaluation into two completely separate loops.

I request to please manually verify my submission. I can also share more evidence if required.

Thank You.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hello Codeforces Team, I would like to clarify that HasanBit and Jahid22 are both my own accounts. I was not aware of the rule regarding multiple accounts. I solved the problem using HasanBit and mistakenly submitted the same solution from Jahid22.

I sincerely apologize for this mistake. I understand the rule now and will use only one account in the future. Thank you for your understanding.

»
2 weeks ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

I am writing to request a re-evaluation of my submission 393618359 for problem 2275E, which was flagged by the anti-plagiarism system for similarities with submission 393612064.

I wrote this solution completely independently offline during the contest on VSCode. The similarities in solutions is just because we thought of the same approach.

Let me briefly explain my thought process. 1. The route must alternate rows and has exactly one point where it switches direction. 2. Compute the cost of the default path turning at column n, then shift the turn left one step at a time, updating the total by weight(a_k, b_k) — weight(a_k, b_(k+1)). 3. The maximum total encountered during this sweep is the answer.

However, the particular derivation, combination of these techniques, and implementation of my solution were done independently by me. I did not copy the submitted code from another contestant, nor did I code online where it could have leaked unintentionally.

I would therefore kindly request that submission 393618359 be manually re-checked and that the plagiarism flag be reconsidered.

Thank you for your time and consideration.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

It was one of the best contests ever!!!