yse's blog

By yse, 11 months ago, In English

أهلاً, Codeforces!

cry, Intellegent, and I are really excited to invite you to participate in Codeforces Round 1029 (Div. 3), which will take place on Jun/08/2025 17:35 (Moscow time). You will be given $$$2$$$ hours and $$$15$$$ minutes to solve $$$8$$$ problems.

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.

Note that the penalty for each wrong submission in this round is 10 minutes. Also, note the rule restricting AI use. If you are caught using AI in an unorthodox manner, you will be sent to cry's basement. You don't want that to happen.

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 rating of 1900 or higher at any moment in time.

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).

I would like to thank the following people for making this round possible:

Good luck, and most importantly, have fun!

Edit: Tutorial

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

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

As a tester, the problems are good. I recommend participating.

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

wowee

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

As a tester, -firefly- tested.

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

As a tester, yse held me at gunpoint to test this round.

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

As a tester, I contributed an initial AC solution that was later hacked.

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

as a participant, I hope it's all sunshine and rainbow down cry's basement :D

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

    I've snuck into cry's basement before, here's a list of items I saw:

    • Farmer Nhoj, holding a pitchfork.

    • A big bucket of lactase, which he feeds to his test cases to stop them from getting cheesed.

    • A computer simulating two copies of cry's basement.

    • A stack of problem proposals — one of which reads "It's Mooin' Time IV"

    • A group of people lying on the floor with their limbs spread out, one person standing and putting their arms above their head, to create a triangle pointing to the sky.

    • A chicken jockey.

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

      Have you seen my flying pig down there?

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

      Incidentally, I can confirm that the group of people lying on the floor are the same people who have tested some of cry's rounds in the past (such as the one by SpyrosAliv). Unfortunately, they have since escaped cry's basement and will not be testing rounds anymore.

      AI users will not be treated as well, though... (don't cheat, lest you discover the true horrors of cry's basement.)

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

      Yummy!

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

      As a tester, CHICKEN JOCKEY MENTIONED 🍿🍿🍿🍿🍿🍿🍿🎉🎉🎉🎉🎉🎉🎉🎉🍿🎉🍿🎉🍿🎉🍿🎉🎉🎉🍿🎉🍿🎉🍿🎉🍿

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

      cry is a girl? right?

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

        yes

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

        yes

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

        akasakaR is a GPT cheater? right?

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

          believe it or not this is an account i use for fooling around or when i'm not in the mood for giving a serious contest or i'm at a family gathering or smth(I actually bring my laptop to family gatherings). most of my contests on this acc are from before gpt era, and no, except for the last contest i gave where i submitted G using gpt (i wasn't participating in that contests in my main acc, my friend solved G and i didn't believe that he solved himself so i just gave it to gpt and submitted it), I don't have any other gpt submissions

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

hi

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

Where is cry's basement?

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

Very good!This will be my first time to compete in codeforces!But according to Beijing time(UTC + 8), I have to stay up late. (很好,这是我第一次在CF参加比赛,不过要熬夜,顺便作为某谷谷民暗暗的qp一句)

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

    Although I don't understand why you have received so many negative comments (maybe it's because of the Chinese language? Or Codeforces doesn't like "qp"?), I still have to say that I am also a user of luogu /kkk

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

if only i had gone down by 7 more rating :(

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

I wish we could have a

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

I hope.

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

"note the rule restricting AI use. If you are caught using AI in an unorthodox manner, you will be sent to cry's basement. You don't want that to happen."

The FBI is here to search cry's basement.

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

amazing ^_^ yeah yse and yeah Borhom

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

2 problems at least this time

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

Ok but what if I want to be sent to cry's basement???????

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

As a participant, I hope to reach expert

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

The king in this world joo

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

Hope get Specialist.

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

cry div3 means its a div2, staying newbie man

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

يا هلا

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

wow

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

As a tester

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

As a participant I hope the problemset is amazing , and I reach pupil ^_^

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

As a participant, I am going to cry's basement after this contest.

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

My turn

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

If you are caught using AI in an unorthodox manner, you will be sent to cry's basement.

Could you please elaborate on the specifics of this? Will I be sent via plane, train, or car? If it's a plane or train, will my ticket be paid for? If it's a car, will one be provided or would I have to provide one, in which case would my gas be comped?

Thank you.

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

(☆∀☆)

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

As a first-time tester, this is the best round I have ever tested.

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

Earliest announcement in a while

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

As a participant, I wish you all a "failed system test" and "hacked" free contest

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

How to apply for the post of torturer at the cry's basement

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

glhf guys :Đ ++ratings

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

As a basement, you don't want to use AI then end up in cry's tester.

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

As a tester, I can confirm cry is a Honkai: Star Rail enthusiast and his basement aims to produce free Stellar Jade.

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

Speedforces?

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

Why Sunday but not Saturday?

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

As a person, it would be an Intellegent move to participate in this contest.

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

Hoping that problems will not be hard

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

as a participant, I want to see cry's basement so add another way than cheating plz :/

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

Another cry round! <3

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

cry why did u choose your name in codeforces PS:Do you play Roblox? If yes can u tell me your username? (I won't hack lol)

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

as a tester i am gonna to get so much + delta this time.. i promise...

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

First out of competition div3!!!

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

Wish everyone enjoys an exciting match:)

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

Eid Mubarak :)

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

i have a doubt why i dont see manypeople coding in java? it seems theres enough time given in questions to code in java but alot of people dont do it

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

    Java is a ~4-5 times slow than cpp , so most people prefer cpp over it in cp

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

    C++ is the most popular because it's (one of) the fastest languages, which can be particularly helpful when avoid TLE (time limit exceeded). Python is also decently popular, mainly for beginners, because it's easy to learn. Java's in the middle ground, and while a jack of all trades can be popular in some cases, generally its not used as much (though it's not unused, I do think its still decently popular, but not as much as C++ and python)

»
11 months ago, hide # |
 
Vote: I like it +3 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

Specialist plz

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

as a tester, i tested late so i will miss out on all the contribution :C

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

این دنیا دیگه به درد نمیخوره

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

cry and Intellegent have never disappointed us.

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

Are we are not going to get the problem rating breakdown as in div 2

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

Be careful in this case, the output may be yse.

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

Finally a contest made by cry. Hope to do good in the contest!

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

Eid Mubaraak !

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

excited for the only thing that makes me happy, good luck to all

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

good luck

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

I hope you achieve the best results and wish success to everyone.

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

gl hf

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

Assalamu Alaikum, akhi.

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

my current rating is 1599. finger crossed :3

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

Make sure you done end up in his basement

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

Nice contest. Had fun solving them. Thanks !

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

m2.codeforces.com down for anyone else? for me only question heading were visible but on clicking them the statements were empty.

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

    PS: It was a refreshing contest, as the problems weren't overly ad hoc, unlike the recent trend. I couldn’t figure out the relation for F, but G was easy, standard i will say.

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

C made me cry a lot.

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

I took way longer than necessary on D. Spending the rest of the time on E and probably overcomplicated it as well. Solid problems I suppose though.

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

how do you solve E?

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

    for each index i for array a check if some a[i] exists in odd position relative to i in a OR some a[i] exists at even position relative to i in b,also we need to check for indices greater than.Same for array b.if its true for any array ans is atleast i+1.We can implement it using multiset

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

      As long as the distance is more than 1, the relative position doesn't matter since we can delete one pair

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

What is the idea on problem D? I'm sure its something easy, I just can't solve it (even though I've solved E and F...)

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

    System of equations in 2 variables. So solve it for a[0] and a[1], (ensuring the sol is non-negative integers), then test that sol on all the rest.

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

    Assume there are x first operations and y second operations, then you get two equations:

    a[i] — a[i-1] = x — y (1) a[0] — x — ny = 0 — (2).

    Solve these two equations and check x >= 0 and y >= 0, also check x — y = a[i] — a[i-1] is same for all i.

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

    I first tried to imagine it as a linear equation. And instead of trying to reach 0 from z, I tried to reach z from x and y. Let

    • x = [1, 2, ..., n]
    • y = [n, n-1, ..., 1]

    We want: a * x[i] + b * y[i] = z[i] To solve it, I used z[0] and z[1] to form two equations and eliminate a, which gives a unique formula for b = (2*z[0] — z[1]) / (n + 1). Once b is known, a = z[0] — b * n. Then just check if all values satisfy the equation

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

very nice contest!!!

»
11 months ago, hide # |
 
Vote: I like it 0 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

    C is based on greedy approach. You need to find the first occurrence of the segment going from left to right.

    10
    5 8 7 5 8 5 7 8 10 9
    

    For example, In this testcase, the first segment would be {5}, then keep on adding until you find a 5. The next segment would be {8,7,5} until index 4. Next we need to find a {8,7,5} which is {8,5,7} until index 7. You'd fail to find the next segment, so the answer is 3. The code is efficiently implemented with sets imo.

    You can try this way to solve for this testcase: (Visible testcase 6, answer is 3.)

    9
    3 3 1 4 3 2 4 1 2
    
  • »
    »
    11 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Greedy, in order to add 1 to the solution you want to find all the elements in the last segment.

    So create a vector of sets, and start with the first segment equal to the first element. Then, start moving on the array checking if you saw all the elements in the last segment (while adding elements to the current segment), and every time you saw all elements in the last segment (removing elements in the last set, until its size is 0), you add 1 to the solution and change the last set to the new set, then repeat.

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

    Idea : The first segment contains only the first element. After that, you continue building segments greedily, breaking a segment whenever it includes all the elements from the previous segment.

    Code : https://mirror.codeforces.com/contest/2117/submission/323459167

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

    let take direction from n to 1, the key idea is that each subarray have to be the shortest subarray that have the highest number of distinct numbers from index l to 1 which l is the last index of previous subarray. So initially set l = n and number of possible subarray is your answer

    **sorry for my bad english

    this is my code

    #include<iostream>
    #include<vector>
    #include<unordered_set>
    
    using namespace std;
    
    int main(){
        int t; cin >> t;
        while (t--){
            int n; cin >> n;
            vector<int> vt(n);
            for (int i = 0; i < n; i++){
                cin >> vt[i];
            }
            vector<int> distinctNum(n);
            unordered_set<int> distinct;
            for (int i = 0; i < n; i++){
                distinct.insert(vt[i]);
                distinctNum[i] = distinct.size();
            }
            int last = n;
            int count = 0;
            while (last != 0){
                unordered_set<int> st;
                int aim = distinctNum[last - 1];
                int countdis = 0;
                for (int i = last - 1; i >= 0; i--){
                    if (st.find(vt[i]) == st.end()){
                        st.insert(vt[i]);
                        last = i;
                        countdis++;
                    }
                    if (countdis == aim){
                        break;
                    }
                }
                count++;
            }
            cout << count << '\n';
        }
    }
    
»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

C :(((

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

The rated top 5 are all cheaters? Mike, check and delete cheaters from the score board. And, we need roll back. Codeforces don't need any cheaters.

To cheaters: is using LLMs so interesting? You can't learn any thing from an AC and a good rank. your same large camel code stile and super long AI names are strange!

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

Great Round. Esp for me , C and E.

Any hints for F?

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

    one leaf or 2 leaves

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

    the tree will be always of the form o-o-o-o..-o and then two children emerging out of last o.Else answer will be 0.In simple term there are atmost 2 leaf nodes .Finf their lca and give 1 leaf node value 1 and other 2 and vice versa then construction is trivial

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

    Tree must have not more than 2 leafs. If it has one leaf, it is just 2^n. If two leafs, compute the only point with 2 children (let it be point A), lengths of paths from this point to leafs. Path from root to A can be arbitrary, then you need to be careful to compute variants of paths from leaves to A

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

I don't understand how any author would find it an achievement to write a problem like E. It's so boring and seems to just be a time-waster problem. You could have just left it at no deletions, but you decided to make it cringe. There is also like nothing to learn from it

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

    Personally disagree, the deletions added an interesting part to it (also simplified my solution, though I feel like I'm the only one that applies to).

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

    Yeah ,as you said, atleast if the removal of a(i) and b(i) before operations was not possible , a bit more complexity might have been added , and for time complexity reasons , you might have needed to store the even_pos and odd_pos sets and do binary search for searching of possibililty of making the pair , but because of that operation of removal , ig it was intentionally relatively made easy ..couldnt solve during contest through..I was very slow

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

took so much time on C, glad I moved on to other problems

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

liked the problems, feeling stupid that i overcomplicated c -_-

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

How to solve H?

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

Some ideas for problem G? I tried the following but it gets WA on test 2, don't know why yet:

Insert the edges one by one using the Kruskal/DSU algorithm for MST, but stops immediately when 1 and N gets in the same set. Then, find the mininum and maximum edge in their connected component, and output their difference.

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

D is hard to implement for me ... and I think C and E have similar ideas and difficulties (maybe E even easier?)

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

wth was C test case 2???

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

Speed forces, problems are too easy and boring. During C I looked it and in 10 minuets I was like who the hell cares and gave up on it. The last idea I had on it was to go from the back and have a set of n numbers of the entire input then read until you get n from back. Then repeat the process and count segments.

I could test it out but 50 hour hacking session.

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

What is the solution to F, I have no observation but the tree is a binary tree if ans > 0.

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

    The topology of the tree is much more constrained than a binary tree.

    Hint: how many leaves can there be ? What does that tell you about the number of nodes of degree > 2 ?

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

    The tree need not be binary instead it can have atmost 2 leaves.

    After this, you can start checking for number of possibilities from the leaves and you will find a way to solve it.

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

Is H based on sqrt decomposition? Here is what I had in mind:

  • If f(i) denotes the frequency of an element at index i, we need to maximize difference on function: 2*f(i) — i.

  • We can store maximum answer for each distinct value over queries.

  • To make an update (addition/removal), we maintain blocks of size sqrt(N/logN) over each distinct value. This way when an update happens, we can update all the elements of the block of that value to recompute minimum and maximum: 2*f(i) — i. Also we can keep a lazy offset to compute the changes in answer for each of the other blocks. Once we manage to update each block, we can recompute the distinct value iteratively and update it inside the global maxima set of answers.

Is my idea sane enough?

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

Can someone explain how rankings work in rounds were there is no score distribution ? Is it solely based on problems solved independently of their difficulty ?

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

    Yes ranks are on the basis of number of problems solved

    to settle ties, they are then ranked by penalty(sum of time taken to solve each problem, with +10 for each incorrect submission)

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

Really enjoyed this contest! Thank you :)

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

Why does the author think that 100 line of if else is cool for E, or my implemention is just dumb.

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

Hello , I am actually a newbie to codeforces and was not very much aware of the system , i did registered as rated contest and even solved three problems in the contest ,but it is now showing as unrated for me , can anyone help me and is there anything which i can do to get my rating increased ?? ...

If possible , do consider helping my submission id's are

https://mirror.codeforces.com/contest/2117/submission/323499358

https://mirror.codeforces.com/contest/2117/submission/323470875

https://mirror.codeforces.com/contest/2117/submission/323448302

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

Am I just stupid or E is much much easier than C? Like the whole logic is just 5 if statements... Where as I spent 90 minutes on C and still came up empty.

edit: oh nvm, i'm stupid

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

Did anyone solve the C during the contest....

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

cry amazing contest. The problems were atleast understandable for a newbie like me.

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

so this was my second contest and i did participate as rated will it increase my rating ??

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

I tried to solve D, using the fact that when a[n-1] = 2*a[n], I will do operations only of type 2, and the conditions, a[n-i] = (n-i+1)*a[n] should hold for all i, so first I calculated how many operations of first type are required to get a[n-1] = 2* a[n], apply that much operations of 1st type to the entire array, and then check the condition which I told. But I am getting wrong answer on test 3, can somebody please look into my submission and tell the probable error, https://mirror.codeforces.com/contest/2117/submission/323482331

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

This was Nth time I read problem wrong. For D I spend more than 40 minits thinking we have to convert A(i) to 0 independently and solution for this became like a hell. I can done better but still this was my best contest ever very happy but still I think I am not gona become specialist this time also

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

Omg graph! I am also a Chinese problem author, and i can't believe that one day the Codeforces div3 will be exactly the same as my idea. https://mirror.codeforces.com/contest/2117/submission/323561607

https://ac.nowcoder.com/acm/contest/103864/G This is a problem I prepared about six months ago, it was used for a programming competition for a Chinese university student called the Chuanzhi Cup.

Dramatically, I didn't attend last night's Div3 because I had to review for the final exam. And I have always participated in Div3 from the second to last problem, which was the problem G for last night. It's obvious that I lost the opportunity to get first blood on this problem.

Anyway, I am honored to have the same problem as Codeforces. :)

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

Can we solve D with Binary Search?

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

    Why do you want to use Binary Search, if you can solve it easily using Linear equations with two variables.

    And still if you want to use BS, I would like to know your approach.

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

why i ac D yesterday, but today i saw D is still in queue?

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

Persian Gulf

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

Persian gulf

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~persian GULF~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

great contest

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

when rating update uwu

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

Guys im new in online contests. When i will get my elo? I solved A and B.

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

rating didnt updated?

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

Why haven't I rated this race?

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

hi

does anyone know why did this contest went unrated??

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

is this contest unrated?? or is this unrated only for me how to find out??

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

My rating is less than 1600,why it didn't rate me?

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

Did anybody get ratings for this round?

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

is this an unrated contest ?

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

Well, I have a possibly inappropriate question: Why hasn't my Rating been updated yet... (My rating is below 1600.)

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

Has anyone received their rating yet?

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

Unrated?

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

i didnt get a rating yet, i solved 3/8 problems in the contest.

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

where is my rating, I'm starving. /cry

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

Hello,

I participated in Codeforces Round 1029 (Div. 3) with a rating of 368. I made submissions during the contest and my handle appears in the official standings, but my rating hasn't been updated while others have received theirs.

Could you please check if there was an issue with my rating update?

Thank you.

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

As a tester, Help me figure out why this CPP solution works but not the same python one. CPP: https://mirror.codeforces.com/contest/2117/submission/323463628

Python: https://mirror.codeforces.com/contest/2117/submission/323479416

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

Can someone check why my F solution is giving TLE on Testcase-3, I don't know why it is doing like this. Even some Time-complexity calc showing its O(n). Please help me.

The function is solve6() for F part.(You have to scroll a bit) 323699490

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

    predefine pow(2,n)%mod in some array than try it

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

      Sadly it doesn't work I guess there will be some minor mistake in my code which I am not getting... Anyways, thanks for the suggestion

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

    You pass the adjacency list v by value in the calc() function, which creates a new copy each time you call the function. Pass it by reference and it should pass.

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

      Hell nooo....

      How did I miss this /•|•\ This is so sad and painful at the same time

      Thanks bro for noticing this

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

my rating is still not updated

is everyone's rating updated ??

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

my ratings are still not updated?

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

    It updated, you got a 0 delta (no gain/loss).
    Your performance exactly matched with the expectations of your current rating :)

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

Questions were interesting and was fun to solve

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

I just tried the virtual contest today, these problem were so fun! Really regret forgetting to join the actual contest yesterday :')

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

Dear Codeforces Administration, I hope you are doing well. I am writing to clarify a serious misunderstanding that occurred during the recent contest on my account (ashutosh_iitrpr).

On 8 June, two of my close friends—whom I trusted implicitly—used my credentials without my knowledge or permission. They logged into my account in order to view and copy my code submissions. I only discovered this breach of trust when I received your warning email. Please understand that I didn't personally share my solutions or collaborate with anyone during the competition. I value fair play and have always respected the Codeforces rules. This incident was the result of my friends acting on their own accord, and I had absolutely no intention of violating contest policies. Kindly see to it and not to penalize me for wrong actions of my friends.

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

    Dear Codeforces Team, I am writing to own up to my misconduct during the recent contest on user ashutosh_iitrpr. During the latest div 3 contest , I logged into his account without permission and copied several of his problem solutions. I recognize that my actions constitute a serious breach of contest rules and Codeforces’ honor code. I accept full responsibility for this violation and am prepared to face any penalties imposed by Codeforces. I sincerely apologize to ashutosh_iitrpr, to you, and to the entire community for undermining the integrity of the contest. I assure you that this will never happen again.

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

    Hello Codeforces Administrators,

    I wish to confess that I accessed ashutosh_iitrpr’s account without his consent during the recent div 3 contest. I copied and submitted some of his solutions under his handle, which was wrong and against Codeforces’ regulations.

    I regret my actions deeply and apologize for the trouble caused to ashutosh_iittpt, to Codeforces, and to all fair competitors. I am ready to accept any sanctions you deem appropriate and will ensure such a mistake is never repeated.

»
11 months ago, hide # |
Rev. 3  
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

Dear Codeforces Team,

I am writing to formally clarify that I did not engage in any form of cheating during Codeforces Div. 2 Round 1029. I understand the seriousness of maintaining a fair competitive environment, and I fully respect the platform’s rules and spirit of honest participation.

Throughout the contest, I worked independently and relied solely on my own understanding and problem-solving skills. Any resemblance between my solutions and those of others is purely coincidental and unintentional. I did not communicate with anyone during the contest or use unauthorized resources.

I genuinely enjoy participating in Codeforces contests as a means to improve my skills and measure my growth in a fair setting. Being flagged has deeply affected me, as I value my integrity above any virtual rating or rank.

If required, I am more than willing to provide my code, explain my thought process, or answer any questions regarding my submissions. I kindly request you to review my case and reconsider any penalties applied.

Thank you for your time and understanding.

I solved 4 questions in total A 323418615

include <bits/stdc++.h>

using namespace std;

define all(a) (a).begin(), (a).end()

define vec vector

define pb push_back

define yes cout << "YES\n"

define no cout << "NO\n"

typedef long long ll;

void solve() { int n, x; cin >> n >> x; vec a(n); for (int i = 0; i < n; i++) cin >> a[i];

int left = -1, right = -1;
for (int i = 0; i < n; i++) {
    if (a[i] == 1) {
        if (left == -1) left = i;
        right = i;
    }
}

if (left == -1) {
    // No '1' in the array, segment length is 0
    yes;
    return;
}

int segmentLength = right - left + 1;
if (segmentLength <= x) yes;
else no;

}

int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr);

int tests;
cin >> tests;
while (tests--) {
    solve();
}

return 0;

} B 323415714

include

include

std::vector generate_permutation(int n) { std::vector perm;

if (n == 1) {
    perm.push_back(1);
} else if (n == 2) {
    // No special pattern needed; just output in order
    perm = {1, 2};
} else {
    // Start with 1
    perm.push_back(1);

    // Add numbers from 3 to n
    for (int i = 3; i <= n; ++i) {
        perm.push_back(i);
    }

    // End with 2
    perm.push_back(2);
}

return perm;

}

void solve() { int n; std::cin >> n;

std::vector<int> result = generate_permutation(n);

for (int i = 0; i < result.size(); ++i) {
    std::cout << result[i];
    if (i != result.size() - 1)
        std::cout << " ";
}
std::cout << "\n";

}

int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(NULL);

int t;
std::cin >> t;
while (t--) {
    solve();
}

return 0;

}

32344830 C

include <bits/stdc++.h>

using namespace std;

define all(a) (a).begin(), (a).end()

define endl "\n"

define vec vector

define pii pair<int, int>

define se second

define fi first

define pb push_back

define maxel(v) *max_element((v).begin(), (v).end())

define minel(v) *min_element((v).begin(), (v).end())

define yes cout << "YES\n"

define no cout << "NO\n"

typedef long long ll; typedef unsigned long long ull; typedef long double ld;

const ll mod = 1e9 + 7; const ll mod2 = 1e9 + 9; const ll mod3 = 998244353; const double pi = 3.141592653589793238; const long double EPS = 1e-9; const int MAXN = 1e5 * 5; const int LOGN = __lg(MAXN) + 1; static const int INF = 0x3f3f3f3f;

void solve() { int n; cin >> n;

vec<int> a(n + 1), nxt(n + 2), lst(n + 2);
for (int i = 1; i <= n; i++) cin >> a[i];

int inf = n + 1;
for (int i = 1; i <= n; i++) lst[i] = INF;
for (int i = n; i >= 1; i--) {
    nxt[i] = lst[a[i]];
    lst[a[i]] = i;
}

int pos = 1, cnt = 0;
while (pos <= n) {
    int end = pos;
    while (true) {
        int nn = 0;
        for (int i = pos; i <= end; i++) {
            nn = max(nn, nxt[i]);
        }
        cnt++;
        if (nn > n) break;
        pos = end + 1;
        end = nn;
    }
    break;
}

cout << cnt << endl;

}

signed main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);

int tests;
cin >> tests;
for (int i = 0; i < tests; ++i)
    solve();

return 0;

} D 323441504

include

include

void solve() { long long n; std::cin >> n;

std::vector<long long> a(n);
for (int i = 0; i < n; ++i) {
    std::cin >> a[i];
}

if (n == 1) {
    // For single element, always "YES"
    std::cout << "YES\n";
    return;
}

long long d = a[1] - a[0];
for (int i = 2; i < n; ++i) {
    if (a[i] - a[i - 1] != d) {
        std::cout << "NO\n";
        return;
    }
}

long long denominator = n + 1;
long long y_num = a[0] - d;
long long x_num = a[0] + d * n;

if (y_num >= 0 && x_num >= 0 && y_num % denominator == 0 && x_num % denominator == 0) {
    std::cout << "YES\n";
} else {
    std::cout << "NO\n";
}

}

This is some text.

// this is code
void inc(int pos, int d) {
    for (; pos < n; pos |= pos + 1)
        f[pos] += d;
}

The rest of the te

int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr);

int t;
std::cin >> t;
while (t--) {
    solve();
}

return 0;

}

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

Hello Codeforces team,

I would like to clarify the warning I received from Codeforces regarding solution 323518201 for problem 2117G, which was flagged for significant similarity with other users' submissions.

I want to state that I did not cheat or collaborate with anyone during the contest. I wrote my code myself during the round.

You can see my solution here: https://onecompiler.com/cpp/43m69hfse

The idea of the solution came from a similar problem I had previously seen on Marisa Online Judge: https://marisaoj.com/problem/180

I implemented the solution independently based on that idea. Given that this problem and its concept are publicly accessible, and that many participants may have seen it before, I believe the similarity between my solution and others may be a coincidence due to this common source of inspiration.

I hope this explanation makes it clear that I am innocent and did not break any contest rules.

Thank you for your time and understanding.

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

Hello,

I received a message saying that my submission 323476100 for problem 2117D significantly coincides with many others. I would like to clarify that I coded my solution independently and did not share it with anyone.I did not use or upload it on any public platform.I coded independently using neovim locally so i can provide local code history to support my claim.

---------------------------------------- ~~~~~

include <bits/stdc++.h>

using namespace std;

int main() { int T; cin >> T; while (T--) { int n; cin >> n; vector a(n); for (auto &x : a) cin >> x;

if (n == 1) {
  cout << "NO\n";
  continue;
}

bool ok = true;
long long D = a[1] - a[0];
for (int i = 2; i < n; i++) {
  if (a[i] - a[i - 1] != D) {
    ok = false;
    break;
  }
}

if (ok) {
  long long den = n + 1;
  long long num = a[0] - D;
  if (num % den == 0) {
    long long y = num / den;
    long long x = y + D;
    if (y >= 0 && x >= 0) {
      cout << "YES\n";
      continue;
    }
  }
}

cout << "NO\n";

} return 0;

}

include <bits/stdc++.h> using namespace std;

int main() {

int T; cin >> T; while (T--) { int n; cin >> n; vector a(n); for (auto &x : a) cin >> x;

if (n == 1) {
  cout << "NO\n";
  continue;
}


bool ok = true;
long long D = a[1] - a[0];
for (int i = 2; i < n; i++) {
  if (a[i] - a[i - 1] != D) {
    ok = false;
    break;
  }
}
if (!ok) {
  cout << "NO\n";
  continue;
}

long long num = a[0] - D;
long long den = n + 1;
if (num < 0 || num % den != 0) {
  cout << "NO\n";
  continue;
}

long long y = num / den;
long long x = y + D;
if (x >= 0 && y >= 0)
  cout << "YES\n";
else
  cout << "NO\n";

} return 0; }

~~~~~

These are the two solution,it is totally a coincidence that my solution matched to others.I respect the rules of codeforces please revoke all the actions taken to my handle.

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

    Dear codeforces,

    Please solve it as soon as possible, my contenst is showing skipped. Please correct that!

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

Hi Codeforces team,

I’m very sorry for the trouble my submission 323500727 caused. I honestly didn’t know that using a small helper tool could make my code look identical to someone else’s.

The core idea of the solution was my own. Because it was already late and I was very tired, I let a tool generate some quick boilerplate code and then completed the rest myself. I never copied anyone’s contest code and never shared mine. It seems the same boilerplate appeared in other submissions, so the checker flagged us as similar.

I no longer have the local files (I cleaned my workspace after the contest), but I can explain every step of my solution if needed.

I guarantee this will never happen again. I respect Codeforces and will make sure I do not compromise the fairness and integrity of any future contest, and I am willing to accept any penalty you consider appropriate.

Thank you for understanding.

— MNTEEOKK

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

Hello, my submission for problem 2117C was flagged for coinciding with multiple other submissions. I want to clarify that I independently wrote my solution during the contest and did not share or access any external code or templates.

I now realize that this problem might have had a standard solution pattern that multiple participants arrived at, which could explain the similarity.

I understand and respect the Codeforces rules regarding fair play and will be more cautious in future contests to avoid any unintentional overlap or coincidences.

Kindly review my case. Thank you.

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

**Dear Codeforces team,

I sincerely apologize for the issue regarding submission 323507897 for problem 2117D. I understand that the solution matches with another ID that belongs to me (Compiling_error_404). On the contest day, I made the mistake of submitting the same code using two different accounts – one rated (Compiling_error_404) and one unrated (my main account).

At that time, I didn’t fully realize that submitting the same code from multiple accounts – even if both accounts are mine – is strictly against the rules. I now understand that this violates the Codeforces policy and could be considered multi-accounting and plagiarism.

I promise that I will never repeat such behavior again. I highly value this platform and have learned my lesson. Please accept my sincere apology and consider giving me a second chance.

Regards,
anupomkhan **

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

    **Additionally, in my code submitted from the secondary ID (Compiling_error_404), I kept my usual template which includes my signature comment: // @author: Abdul_Alim // @CF: anupomkhan

    This was never meant to deceive anyone, and I believe it further proves that I was not trying to hide the connection between my two accounts. I just misunderstood the rules regarding using multiple accounts in the same round — especially when one is unrated.

    I hope this clarifies my intentions further. I am committed to fair participation going forward. Thank you.**

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

Hello, I understand that my solution appears similar to another participant’s. During the contest, I discussed some ideas with a friend briefly or shared logic informally without realizing it could lead to a violation.

I now understand this was against the rules, and I regret this mistake. It won’t happen again in the future.

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

s

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

I recently received a plagiarism warning for my submission 323473483 for Problem 2117D in Round 947 (Div. 3). I would like to respectfully clarify that I wrote this solution independently during the contest. I did not copy it from anyone, nor did I share it with others, or use public IDEs or any messaging platforms.

If the system found my solution to be similar to others, it may be because of a common logic path for this type of problem or the use of standard templates and helper functions that I always use in contests.

I’m fully willing to explain my solution logic, reasoning, and step-by-step approach if needed. I also want to share my custom template, which I use regularly in Codeforces contests. It includes common utilities I’ve written for faster coding and reuse:

#define int long long
#define vi vector<int>
#define pb push_back
#define loop(n) for(int i = 0; i < n; i++)
#define read(a) for (auto &i : a) cin >> i;
#define print(a) for (auto &i : a) cout << i << " ";

int BE(int x, int n) {
    if (n == 0) return 1;
    int res = BE(x, n / 2);
    if (n & 1) return x * res * res;
    else return res * res;
}

vector<int> makeprime(int N) {
    vector<bool> isPrime(N + 1, true);
    isPrime[0] = isPrime[1] = false;
    for (int i = 2; i * i <= N; ++i)
        if (isPrime[i])
            for (int j = i * i; j <= N; j += i)
                isPrime[j] = false;
    vector<int> primes;
    for (int i = 2; i <= N; ++i)
        if (isPrime[i]) primes.push_back(i);
    return primes;
}

int countDivisors(int n) {
    static vector<int> spf(1e6 + 5);
    for (int i = 1; i < spf.size(); i++) spf[i] = i;
    for (int i = 2; i * i < spf.size(); i++)
        if (spf[i] == i)
            for (int j = i * i; j < spf.size(); j += i)
                if (spf[j] == j) spf[j] = i;

    int count = 1;
    while (n > 1) {
        int prime = spf[n], exponent = 0;
        while (n % prime == 0) { n /= prime; exponent++; }
        count *= (exponent + 1);
    }
    return count;
}

bool isPrime(int n) {
    if (n <= 1) return false;
    if (n <= 3) return true;
    if (n % 2 == 0 || n % 3 == 0) return false;
    for (int i = 5; i * i <= n; i += 6)
        if (n % i == 0 || n % (i + 2) == 0)
            return false;
    return true;
}



These are utility functions I include to avoid repetitive coding during timed contests. Any similarity is purely coincidental and unintentional.

I value the integrity and fairness of Codeforces contests and request a kind re-evaluation of my case. I assure you that I’ve always played fair and will continue to do so.

Thank you for your time and understanding.

Sincerely, aakarsh_2004

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

I recently received a plagiarism notification regarding Codeforces Round 1029 (Div. 3), where my solution 323442227 for the problem 2117D was marked as skipped due to a match with two other users: "moee" and "shreyansh2605a".

I would like to respectfully mention that my submission (ID: 323442227) was made earlier than both of the others. I did not share my code with anyone, nor did I copy from any external source. I believe it’s possible that the similarity was either coincidental or a result of someone else copying my solution after I submitted it.

The problem in question was a math/number theory task, where it is common for multiple participants to arrive at similar logic or structure independently. Since only two other submissions matched mine, I hope this could be considered a borderline case rather than definitive evidence of misconduct.

I fully support Codeforces' effort to maintain fairness and integrity, and I sincerely request a re-evaluation of this decision based on submission timing and problem type.

Thank you for your time and for all the work you do for the community.

Sincerely,
Shivam
Codeforces Handle: Phoenix_1729

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

Hello, I received a message saying that my submission (ID: 323507467) for Problem 2117C matches many other users' codes. I want to clarify that I did not copy or share my code with anyone. I wrote my solution on my own during the contest. It’s possible that others copied from a common online source, or someone accessed my code without permission. If there's any way I can help verify my work, I’m happy to cooperate. Please consider reviewing this situation. I don’t want to be unfairly penalized for something I didn’t do. Thank you.

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

Hi, I received a message about my solution (ID 323515523) for 2117E being similar to others. I wrote the solution myself, but it’s possible that some part matched with others because I referred to some materials online during practice and may have unintentionally followed a common pattern. I also used an online IDE to test my code, which might have made it accessible to others unintentionally. I didn’t share my code with anyone. I’ll be more careful in future contests. Thank you.

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

How it's possible that you can't fix problem for months and I solve it in hours?

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

I have given this contestant I haave done 2 answers correct but still there is no increment in my rating can anybody help me out

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

NA

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

[user:sumku][contest:1029][problem:D — Retaliation][submission:323473269] Dear Codeforces Team,

I hope you are doing well.

I am writing to sincerely apologize for the issue related to my submission ID 323473269 for Problem 2117D, which has been found to significantly coincide with multiple other submissions.

I want to clarify that I did not intentionally share my code or participate in any dishonest activity. It appears that my solution may have been unintentionally exposed or leaked—possibly through public settings on an online IDE or another medium—without my knowledge. I now realize that even unintentional leaks are treated as rule violations, and I take full responsibility for this oversight.

As a sincere gesture of accountability, I respectfully request that this submission be excluded from rating, and that my other problems in the contest be considered for rating purposes. I accept this as a fair consequence for the situation and assure you that I will be much more careful moving forward.

This incident has been a serious learning moment for me, and I am now fully aware of the importance of safeguarding my code during contests. I deeply respect the values of the Codeforces community and will strictly adhere to the rules in all future contests.

Thank you for your understanding, and I appreciate the opportunity to clarify this matter.

Sincerely, Sumku Submission ID: 323473269