voventa's blog

By voventa, history, 11 months ago, translation, In English

Hello, Codeforces! 👋👋👋

Codeforces Round 1032 (Div. 3) will start at Jun/17/2025 17:35 (Moscow time). You will be offered 8 problems with expected difficulties to compose an interesting competition for participants with ratings up to 1600. However, all of you who wish to take part and have a rating of 1600 or higher, can register for the round unofficially.

The round will be hosted by rules of educational rounds (extended ICPC). Thus, solutions will be judged on preliminary tests during the round, and after the round, it will be a 12-hour phase of open hacks. After open hacks all accepted solutions will be rejudged on successful hacks.

You will be given 2 hours and 15 minutes to solve the problems.

Note that the penalty for the wrong submission in this round is 10 minutes.

Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by link, this is a compulsory measure for combating unsporting behavior. To qualify as a trusted participant of the third division, you must:

  • take part in at least five rated rounds (and solve at least one problem in each of them)
  • do not have a point of 1900 or higher in the rating.

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.

I would like to express my gratitude to:

Good luck! 🔥🔥🔥

Editorial!

  • Vote: I like it
  • +224
  • Vote: I do not like it

»
11 months ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

hoping to get positive delta!!! (from a warrior race)

»
11 months ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

Hope this will be a great round :XD

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

So, it won't be rated for participants like me, as I have only participated in 3 rated rounds!?

»
11 months ago, hide # |
 
Vote: I like it +16 Vote: I do not like it

Only two div. 3 people tested?

»
11 months ago, hide # |
Rev. 3  
Vote: I like it +9 Vote: I do not like it

hope to reach $$${\color{green}{pupil}}$$$

$$${\color{cyan}{and}}$$$ $$${\color{orange}{good}}$$$ $$${\color{red}{luck}}$$$ $$${\color{purple}{everyone}}$$$ $$${\color{blue}{!!!}}$$$

P.S: not today :(

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

hoping to get positive delta!!! (Recover from last Div 2):)

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Don't make D too hard__

»
11 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Hoping to reach a specialist in this contest.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hoping to solve 5 questions for the first time.

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

.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Score distribution?!?!?

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hoping to reach specialist in this round

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

i hope it goes well

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hoping to become a pupil :3

»
11 months ago, hide # |
 
Vote: I like it -21 Vote: I do not like it

As a tester, I have a proof that upvoting this comment will lead to positive delta. But the proof is too long to fit the margin.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Just don't make D harder than E.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

hoping to 1. not get a minus rating change 2. reach pupil 3. solve 3+ problems in this contest(my best record is 2, A and B)

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Is that round also can suit for people that unrated? Or i need to wait for div.4 round?

»
11 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Omg finally my first unrated div3

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Good luck to everyone! Hope to reach Cyan and no one enter cry's basement in this contest.

»
11 months ago, hide # |
Rev. 2  
Vote: I like it +9 Vote: I do not like it

Hope to become div 3 unrated in this contest

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

hope to reach pupil

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

As a tester, I wish you all good results on this great round!

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hoping to reach pupil this time

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

First ever contest, I don't know shit about anything

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

good luck everyone

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Yo! This is going to be my first contest!

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

let's gooooo!

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

hope to reach pupil

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I just want 5 AC in this contest.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

expect to expert

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

My first contest! Wish me well

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

The internet in Iran is terrible due to the conditions I hope I don't have any problems posting.

»
11 months ago, hide # |
 
Vote: I like it -6 Vote: I do not like it

When I tried to upload my solution to the 3rd problem I got a "Sorry, you have been blocked" message. I tried and it is now blocking sending in solutions for previous competitions too. I tried to find info on the "help" page, but nothing useful. Anyone know whom to write to, and/or why this would happen?

»
11 months ago, hide # |
 
Vote: I like it -16 Vote: I do not like it

bruuhhh div 3 also becoming harder

»
11 months ago, hide # |
 
Vote: I like it +13 Vote: I do not like it

Contest with perfect level wise problem

»
11 months ago, hide # |
 
Vote: I like it +14 Vote: I do not like it

Good contest, had fun!!

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

how to solve D

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

    if u know bubble sort the problem becomes super easy, that is doing swaps of adjacent elements and passing it through the passes as many times as req to sort the array, just apply this process on array a and b and then just count the number of elements which are greater in array a and swap it with corresponding element of array b

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

      wait seriously nvm then, i did a similar thing where i sort the array like this:

      1 3 5 ...
      2 4 6 ...
      

      but somehow got wrong answer in the contest, so i just assumed im going beyond 1709 operations. turns out it's just a slight mistake in the code -_-

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

    Sort both arrays using bubble sort, then if a[i] > b[i] swap. I was able to prove this during the contest. 324898354

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

    Use bubble sort , one thing i found more useful is

    normally we say that bubble sort takes n^2 time complexity but in real it takes max (n)*(n+1)/2 in question n was max 40 so for the both the arrays this will pass

    initial i thought that 2 (for both array )* n^2 (i assumed that bubble sort is n^2) operation will need and i was confuse to solve it later i realized bubble sort requires less then n^2 operation

    it is very very good problem , you can check my submission

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

      actually im really just more worried about going beyond 1709 operations. Bubble sort did immediately come to mind but won't it take like n*n-1 oh my fuckin god i forgot to divide by 2!!! i forgot to divide by 2... that's why i thought max operations might take 40 * 39 * 2 = 3120 -_-

»
11 months ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

did anyone else do a randomized solution for $$$E$$$?

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

One of the nicest contest I have been in, my first time solving 5 problems in a Div 3 round.

»
11 months ago, hide # |
 
Vote: I like it -17 Vote: I do not like it

such a boring and uninspiring round. i felt like i was doing a codechef round smh. had the solution for F just couldn't be bothered to write it. i really dont know how any problems from C-F were accepted as actual problems, really disappointing

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

HOW TO SOLVE C?

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

    For every row and column, keep the count of maximum element in it. If you are able to find such r, c such that max_count[r] + max_count[c] — (a[r][c] == max_element) is equal to total count of max element, you can reduce maximum by 1, otherwise you cannot.324845173

»
11 months ago, hide # |
 
Vote: I like it +26 Vote: I do not like it

Beautiful problem H!

»
11 months ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

Was it just me or was C more difficult than D and E...

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I think I won't be able to participate in the codeforces contest until further notice The internet speed here is terrible and it takes 5 minutes to get to any page (due to the war) Goodbye codeforces!

»
11 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

nah top 100 div 3 of this contest, 70 cheaters, 30 smurfs

»
11 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

hope all AI-cheaters will get banned

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Couldn't figure out why this fails on test2 in F: https://mirror.codeforces.com/contest/2121/submission/324900759

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Is there a solution to E without dp ? If so please explain it If not can u explain the dp solution

  • »
    »
    11 months ago, hide # ^ |
    Rev. 2  
    Vote: I like it +5 Vote: I do not like it

    Not sure what the dp solution is. I did it as follows:

    Start comparing digits of l and r from most significant to least significant and find the longest common prefix. The number x will need to have the same digits here. If the length of this common prefix is p, then 2*p is added to ans.

    Now for 1st mismatch in digits of l and r, if digit.r > digit.l + 1, then we can construct x with no more common digits to l and r. In this case 2*p is the final ans.

    Otherwise, there are 2 cases:

    1. assign digit.r to x. For all the immediately following 0's in r, x's digits will also be 0. If number of following 0's are q, then q+1 is added to ans.
    2. assign digit.l to x. For all the immediately following 9's in l, x's digits will also be 9. If number of following 9's are r, then r+1 is added to ans.

    So ans = 2*p + min(q+1, r+1)

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

    A purely greedy / constructive solution in O(number of digits): 324911040.

  • »
    »
    11 months ago, hide # ^ |
     
    Vote: I like it +9 Vote: I do not like it

    I solved it without dp It wasn't a hard problem but there were a lot of small points! I hope this code helps you:

    int ans=0;
    bool khosh=false;
    
    for(int i=0; i<n; i++) {
      if(res1[i]==res2[i] && khosh==false) {
        ans+=2;
      } else if( abs(res1[i]-res2[i])==1 && khosh==false) {
        ans+=1;
        khosh=true;
      } else if( res1[i]=='9' && res2[i]=='0' ) {
        ans+=1;
      } else {
        break;
      }
    }
    

    n is the number of digits and res1, res2 are the input numbers that I received as strings

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

    see my Solution Purely Greedy we st

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

    Solution to E purely greedy 324948524

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

    Here is my solution using DP. I am not sure if it is optimized properly, but it got accepted.

    The goal is to minimize:

    f(l, x) + f(x, r)

    We solve this using digit DP. The DP state tracks:

    • The current digit index
    • The digit chosen at this position
    • The state of x relative to l and r

    DP State Definition

    dp[i][d][s]: Minimum matches when

    • i: Current digit position (from most to least significant)
    • d: Digit placed at position i
    • s: Current state of x:
      • 0: Equal to l only
      • 1: Equal to r only
      • 2: Equal to both l and r
      • 3: Strictly between l and r

    Base Case

    At the most significant digit p:

    • If l[p] == r[p], we initialize dp[p][l[p]][2] = 2
    • If l[p] != r[p], we initialize:
      • dp[p][l[p]][0] = 1
      • dp[p][r[p]][1] = 1
      • For digits in (l[p] + 1, r[p] - 1), set dp[p][d][3] = 0

    Transitions

    Loop from position i = p-1 down to 0, and try all digit/state transitions:

    1. From state 0 (equal to l only):

      • Stay in 0 if current digit is l[i] (add +1)
      • Move to 3 if digit > l[i] (add +0 or +1 if digit also equals r[i])
    2. From state 1 (equal to r only):

      • Stay in 1 if digit is r[i] (add +1)
      • Move to 3 if digit < r[i] (add +0 or +1 if digit also equals l[i])
    3. From state 2 (equal to both l and r):

      • If l[i] == r[i], stay in 2 and add +2
      • Otherwise:
        • Move to 0 if digit is l[i] (add +1)
        • Move to 1 if digit is r[i] (add +1)
        • Move to 3 if digit is between (add +0)
    4. From state 3 (strictly between):

      • Any digit is allowed
      • Add +1 if digit matches l[i] or r[i]

    Final Answer

    Minimum of all values dp[0][d][s] over all digits d and states s

    Implementation Code: 324944536

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I enjoyed solving problem E and F, great contest

»
11 months ago, hide # |
Rev. 2  
Vote: I like it +19 Vote: I do not like it

Problem G : codechef

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

found C to be harder than D and E.May be ,I tried broote force

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

Had a lot of fun with problems F, G, and H. Thank you!

On a separate note, my solution to H was with lazy segment tree. Could somebody please tell me a cleaner idea? And, apart from that, my G uses three segment trees (well, four to be precise, but that was because I went crazy there for a sec), so a cleaner idea would also be appreciated.

  • »
    »
    11 months ago, hide # ^ |
    Rev. 3  
    Vote: I like it +11 Vote: I do not like it

    I did G as follows:

    Define a function g(l, r) as the minimum of frequency of 0 and 1 in s[l...r]

    f(l, r) + g(l, r) = r-l+1 It is easy to find summation of f(l, r) $$$-$$$ g(l, r) over all (l, r). For the given string, keep a prefix array p with p[i] = number of 0's in s[1...i] $$$-$$$ number of 1's in s[1...i].

    f(l, r) $$$-$$$ g(l, r) = abs(p[r] $$$-$$$ p[l-1]).

    The rest is just computing sum of abs(p[x] $$$-$$$ p[y]) over all (x, y) which can be done by sorting p.

  • »
    »
    11 months ago, hide # ^ |
    Rev. 2  
    Vote: I like it +16 Vote: I do not like it

    For problem H: You can extend standard LIS algorithm for this question whose implementation is very simple (just 3-5 lines of code using multiset).

    Submission link: https://mirror.codeforces.com/contest/2121/submission/324947588

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

      Great

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

      I have a small doubt in understanding the problem statement, for k=2 do we need to consider just {a1,a2} or {{a1,a2},{a2,a3}....} set of all subarrays of length 2 ?

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

        We only need to consider prefix of original array for each k. If k = 3 then consider only one subarray [a1, a2, a3].

  • »
    »
    11 months ago, hide # ^ |
    Rev. 2  
    Vote: I like it +18 Vote: I do not like it

    I have a divide and conquer solution for G

    Solution
    Code
    • »
      »
      »
      11 months ago, hide # ^ |
       
      Vote: I like it +1 Vote: I do not like it

      My solution was fully inspired by yours — I learned a lot just by trying to understand it.
      But I didn’t fully understand what’s actually going on in the divide and conquer part.

      But, but, but... I think I’ve come up with a version that’s better — or at least easier to understand !

      You used this formula:

      max(a, b) = (a + b + |a - b|) / 2

      That gave me an idea — why not just start by adding the total sum of all possible substring lengths, which is:

      n * (n + 1) * (n + 2) / 6

      Then I realized, we just need to add the sum of all absolute differences of the prefix balances, which reminded me of a classic LeetCode problem —
      “Sum of Absolute Differences in a Sorted Array.”

      So even though I didn’t directly understand your approach, the idea you shared still helped guide me in the right direction. Thanks for that!

      Here’s my code: 325253633

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I think Vicfred cheated in this contest. He cheated in past contest, i wrote a blog about it.

https://mirror.codeforces.com/blog/entry/143816

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I bricked problem F with sparse table and binary search... Turns out I don't have enough time sadly.

»
11 months ago, hide # |
 
Vote: I like it -20 Vote: I do not like it

The quality of problems is getting worse day by day. Not a single problem were interesting.

»
11 months ago, hide # |
 
Vote: I like it -11 Vote: I do not like it

A B AND C had no ideas u just read the problem and figure out the implementation , specially that C one i couldn't figure out how to implement the code for 1.5 hours xD

bad div

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

For problem F, can someone explain why am I getting TLE with this code though I used binary search?

Code
»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

why does this approach for F not work? what to change in this to make it work? Submission

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Problem G was nice!!!

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Good Contest!!

»
11 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

The first div 3 contest that went good : )

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

My first div3!! Looks I need to work on my implementation skills. Able to find core idea of solution but not the right way to implement it. Enjoyed the contest nonetheless.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

me solving F be like I need sparse matrix no wait there is no need.no wait I need it,ohh yeah it can be done without spare table

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

    exactly same here, wasted a bunch of time because of lacking experience.

    It can be solved by sparse table or without one also can. I've done both but... after contest))

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

why am i still unrated :(( newbie problem

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Any body complete F with two pointers and hash map? My submission: 324893774

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I have register for this contest and my rating is below 1600. I am able to solve one problem but my rating is not updated(not even negative delta).I can see people ,who didn't solve anything, on leader board . I have register this contest as rated only . Am I doing something wrong ?

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

    No you are doing nothing wrong. You may not be able to be on the official standings as you have to attempt 5 contests successfully. As for rating change, wait for few more hours it will get updated. They haven't been rolled out yet

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

why the contest rating have not made any changes in already existing rating of mine? is the issue with someone else as well, it is not even showing in the graph as well

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

    you have to wait for the system testing to finalize the rankings then it will be reflected on your account

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Some of these cooked me ~

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Something wrong in the contest its showing Current standings and even though the contest ended yesterday and it is displaying the previous version of it.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

When do we get div-4 contest ,since it was expected to be held in the current month??

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can anyone help me with C ?

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

    The idea is this: consider the maximum value in the grid, call it $$$X$$$, and look at all of the cells which have value $$$X$$$. If it is possible to choose a row and column that encapsulate all of these cells, then that becomes the optimal choice and the answer is $$$X - 1$$$. Otherwise, the answer is $$$X$$$.

    There are a few ways to do this; the important part is NOT writing a $$$O(N^2M)$$$ or $$$O(NM^2)$$$ solution. If you do, you'll TLE to test cases with large $$$N$$$ or $$$M$$$, respectively.

    My solution takes advantage of one property: assume that we can encapsulate all of the cells containing the value $$$X$$$. Pick any one of these cells (it doesn't matter which) — we will have to use either its row or column in the optimal choice. Assume we use its row; consider the set of cells with value X not on this row. If they all belong on the same column, it works. Otherwise, it doesn't. Swap the rows and the columns for the other case. Since there are at most $$$NM$$$ cells containing the maximum value X, this solution runs in $$$O(NM)$$$ time. You can check my solution for implementation.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I solved 3 problems and i remember seeing the third problem as accepted, but now it shows "In queue" Is there something wrong? Also, the ratings haven't been updated for my account either. Should i reach out somewhere?

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

why it is taking lot of time for system testing?

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Why is it taking too long for system testing?? Just test those who are official participants :(

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Pretest case should be more strong enough for problem C.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hi Folks,

This is my first contest ever and at the moment I am unrated. I solved 6 out of the 8 questions in this round. Can I expect some kind of rating after this?

Thanks

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

    Na , u can not expect

    you'll be receiving a penalty because you cheated during this round using AI... really well done dude

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

when will ratings of this round will come??

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Such a nice contest it was in terms of the problems given. Hopefully, I also got what I aimed for.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

hoping to get positive delta!!!

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

here after long time , has cf changed something? i am not able to view other code for submissions.

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

    You still can; just go to the leaderboard, find a user's row, then Ctrl + click on a cell in that row to see the results. From there, you can click once more to find the original submissions.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I think the two hacks I made on C were test cases 9 and 10... and holy moly so many people got TLE on 10. I'll take it :)

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Unable to upsolve G if u can anyone explain the approach

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

when is the editorial coming?

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

voventa why no thanks to 74TrAkToR?

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

when will we get the tutorials?

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

problme -c

 vector<vector<int>> ar(n, vector<int>(m));
    int global_maxi = 0;

    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < m; j++)
        {
            cin >> ar[i][j];
            global_maxi = max(global_maxi, ar[i][j]);
        }
    }

    vector<int> row_max(n, 0);
    vector<int> col_max(m, 0);

    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < m; j++)
        {
            if (ar[i][j] == global_maxi)
            {
                row_max[i]++;
                col_max[j]++;
            }
        }
    }

    int max_rows = 0, max_cols = 0;
    for (int x : row_max)
    {
        if (x > 0)
            max_rows++;
    }
    for (int x : col_max)
        if (x > 0)
            max_cols++;

    if (max_rows == 1 || max_cols == 1)
    {
        cout << global_maxi - 1 << endl;
    }
    else if (max_rows == n && max_cols == m)
    {
        cout << global_maxi - 2 << endl;
    }
    else
    {
        cout << global_maxi << endl;
    }

can anyone help me debug this code?

i wanted to stick to the logic of max in each row , col and their count.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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?

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Appeal for submission 324913320 – Problem 2121F **** Hi Codeforces team,

I was recently notified that my submission 324913320 for problem 2121F has been flagged for plagiarism due to similarity with other users' solutions.

I want to clarify that I do not know the other participants involved, and there was no sharing or copying of code. I wrote the solution completely on my own during the contest.

The approach I used is based on a common pattern I've seen in similar problems on platforms like LeetCode, so it's possible others used a similar idea. That might explain why our code structures look alike.

I did not use any public IDEs (like ideone with public access), and I didn’t upload or share my solution anywhere.

I really value Codeforces as a platform and always try to follow the rules. If needed, I’m happy to explain how I arrived at the solution or provide my thought process to support this.

Please consider reviewing this again. I genuinely did not engage in any dishonest behavior.

Thanks for your time, SLASH_27 Submission ID: 324913320

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Dear Codeforces team, I would like to clarify the reason behind the similarity between the solutions submitted under the handles mohamedhamdy4490 and hamdymo_93 for Problem 2121C. I was using two different accounts, and I submitted the same solution from both without realizing that doing so would be considered a violation of the contest rules. I had no intention to gain an unfair advantage or to engage in dishonest behavior. It was a mistake on my part due to a misunderstanding of the rules, and I now understand that such actions are not allowed, even if the same person is operating both accounts.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hello Codeforces team,

I have received a message regarding the similarity of my solution (ID: 324907250) to problem 2121E with many others.

I want to clarify that I did not share my code with anyone, nor did I copy from any source. I only wrote and tested my code using the CodeChef IDE directly on a problem page (https://www.codechef.com/problems/SUPINC) using the default "Run" feature. I did not save the code, and I was unaware that simply running it on their platform might make it publicly visible.

I now realize that this might have unintentionally exposed my code to others. I sincerely apologize for this and assure you that it was not intentional. I will strictly use only private or local IDEs for all future contests.

Thank you for your understanding.

(Handle: 2023eeb1258)

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hello, Codeforces Team. I am writing to respectfully appeal the plagiarism judgment on my solutions for problem 2121E (submission 324872446) and 2121G (submission 324893225) from the recent contest. I was very concerned to see the notification that my code was flagged for similarity with user Srishanth_07. I want to explain the reasons for the similarity. For Problem E: My solution is based on a very standard Digit DP on a range [L, R] template. The state dp(index, tight_left, tight_right) is a classic approach to this type of problem and is taught in numerous public competitive programming resources, such as tutorials on CP-Algorithms, GeeksforGeeks, and various YouTube channels. I learned this technique from these common sources and applied the standard template to solve the problem. The core structure of my code is therefore very similar to anyone else using this standard algorithm. For Problem G: For this problem, my solution uses a prefix sum array to keep track of the balance of '0's and '1's, which is also a common technique. The final answer is derived from a mathematical formula based on the properties of these prefix sums. While this is more problem-specific, it is possible that my logical reasoning and mathematical derivation were similar to other contestants, which could lead to similar-looking code, especially in the calculation part. I want to sincerely assure you that I did not collaborate with any other user or copy any solution during the contest. The similarity arises from using well-known, standard algorithmic templates and common problem-solving techniques. This incident has been a serious lesson for me. I understand the importance of maintaining code originality and developing a unique coding style to avoid any suspicion of plagiarism. I will be much more careful in all future contests. I would be very grateful if you could review my case. I am willing to accept any penalty if my explanation is not sufficient, but I hope my account will not be blocked. Thank you for your time and understanding. Sincerely

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

    I got same message twice in my first account. so i created this . I became pupil then my rating rolled back for 1029 and 1032 round.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Appeal for "My solution 324842333 for the problem 2121C significantly coincides with solutions of 1 Other", I was quite surprised and shocked seeing the mail, totally unexpected. I had submitted my code at 8:45 (IST) and then continued to code with my other problems and finishing the final one at about 10:07 (IST), All my solutions have a laid out consistent writing style, with significant inspiration from youtube tutorials and video lessons. I still can't figure out how my this other person, who submitted the problem about more than an hour later, got it same as mine, even though his solution looks like it's been directly off GPT. Please take a look at it and provide a solution. Thank you for your time and understanding.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it
Hello Codeforces Administration,
I am writing regarding the plagiarism flag on my submission 324828250 for problem 2121E, which was found to be similar to a submission by user Noodl3.

The reason for this similarity is that the problem is a standard application of "Digit Dynamic Programming". The solution follows a very rigid and well-known template that is publicly taught in numerous competitive programming tutorials and resources.
This standard template dictates the entire recursive structure, the state variables, and the transition logic. When two programmers independently apply this public template to the problem, the resulting code will naturally be almost identical in structure.

The similarity is a consequence of the problem having a single, standard solution path, not of any collaboration. I can assure you I have no connection to Noodl3 and wrote my solution entirely on my own.

I am happy to provide any further clarification needed to resolve this. I take the rules of fair play on Codeforces very seriously and thank you for investigating this matter.

324828250

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

0

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

so my rank in this contest increased from what it was before. This is probably because of the rollbacks. So when will the changed ratings come?Or will they not change?