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

Автор Hamed_Ghaffari, 6 недель назад, По-английски

Hello, Codeforces!

We are exited to invite you to participate in Codeforces Round 1124 (Div. 1) and Codeforces Round 1124 (Div. 2) which will be held on Sep/26/2026 17:35 (Moscow time).

The round will be rated for participants from both divisions. You will be given 2 hours and 30 minutes to solve 6 problems for each division.

The problems are authored and prepared by _R00T, eren__, sweetweasel, and me (Hamed_Ghaffari).

We would like to thank:

The scoring distribution will be added soon.

We hope you enjoy the problems.

Good luck and have fun!

UPD1: The scoring distribution is released:

  • Div. 1: $$$500 - 1000 - 1750 - 2250 - 2750 - 3250$$$;
  • Div. 2: $$$500 - 1000 - 1500 - 2000 - 2750 - 3250$$$.

UPD2: Editorial

UPD3: Congratulations to the winners!

Div. 1

  1. Ormlis

  2. tourist

  3. Elysion

  4. jn_275

  5. turmax

Div. 2

  1. YerzhanU

  2. -Fm2-

  3. NiklasPlugin

  4. zhude

  5. kumod-Kumar

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

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

We have so many contests rated for Division 1 recently, wow

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

    in English: But the contests always begin at 22:35 in China.I have to sleep at that time. By the way,do you know a web called Luogu?

    по-русски: Но соревнования в Китае всегда начинаются в 22:35. В это время я уже должен спать. Кстати, ты знаешь такой сайт под названием Luogu?

    中文: 但在中国,比赛总在22:35开始,我那个时候得睡觉了。对了,你知道一个叫洛谷的网站吗?

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

دسسسسسخوش آقا

Hamed and the squad orz

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

orz contest + squad

آقا به‌به

(wish i could test tho)

»
6 недель назад, скрыть # |
← Rev. 2  
Проголосовать: нравится -160 Проголосовать: не нравится

This comment is deleted.

»
6 недель назад, скрыть # |
← Rev. 20  
Проголосовать: нравится -60 Проголосовать: не нравится

Rev. 20

»
6 недель назад, скрыть # |
← Rev. 4  
Проголосовать: нравится -11 Проголосовать: не нравится

Since when am i tourist
edit: if you hover over "You" it shows "Tourist You"

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

1123 had first 2 question easy ones, I can tell this one gonna be hard.

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

As a participant, hope to get small delta, to be one point away from Expert (cuz i will lose it after 1123)

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

bah bah benazammm :)

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

Gl everyone!

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

Finally an Iranian contest :)

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

hi guys i am back after a long break should i participate directly into this one or wait for div 3

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

i really want to participate in a contest but why are they all at night

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

hiiiiii

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

ig div 1 is ok

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

The point values still aren't up, and it's 2h30 for 6 problems in both divisions. Last night A was worth 250, so I'm not assuming this one starts the same way. Good luck tonight.

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

The whole format is bad, 7 problems is just too many problems.

Topcoder fromat was the best 1h 15 minutes for three problems.

This is more quantity over quality.

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

Letssss go!! 2 div 2 contests one after the other

Please someone host a contest before 10 oct for div 2,div 3 ;)

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

I can watch Minecraft LIVE after the contest ends!!

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

yay!

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

Excuse me, but where is the score distribution?

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

I am glad with such frequent contests thanks to authors and Codeforces team!!!. I hope I will reach rating 1700 after this contest. Good luck to everyone

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

gotta try div1, expecting to get blown to hell (ok i can't)

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

it will be bombastic

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

hoping to reach pupil atleast!!!!

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

به‌به سوالا عالی بوددددددد (Nice problems)

orz

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

Speedforces

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

There're 2 pruple in Top 5, amazing.

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

bruteforces lol

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

on problem C, my greedy algorithm worked for pretest 1 and then failed at pretest 3 :/

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

Epic battle greateric vs d1C except its not an actual epic battle and just d1C murdering me

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

O(nlogn) solution for div1 C gets TLE because of huge constant ...

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

$$$B, C, D$$$ all guess.

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

ik i suck ass but wtf

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

Solution sketches for div2A-D (I didn't get cooked):

hiding so I dont clog up comments

A few criticisms (div2):

  • Constraints for B are bait, I TLEd because I thought you could just check all pairs, might be my fault for rushing but idk
  • D was piss easy I was just laughing at the solution, feels super overengineered and artificial
  • Epic speedforces, huge gap between D and E, seems like div1 is also speedforces as a consequence of an easy div1e
  • »
    »
    6 недель назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    i followed same approach for C. Still got wrong answer on pretest 2 :)

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

    D. Using the properties of XOR and a quick brute force, we realize we can just maintain the count of numbers divisible by 3 or 5

    Can you explain more? I used a segment tree but apparently that's overcomplicating it.

    Constraints for B are bait, I TLEd because I thought you could just check all pairs, might be my fault for rushing but idk

    You literally could though? Example: 392253234 and this isn't even doing anything smart like caching the results of Next().

    • »
      »
      »
      6 недель назад, скрыть # ^ |
       
      Проголосовать: нравится +3 Проголосовать: не нравится
      1. We can brute force all possible numbers that can be made from the XOR of numbers in seperate code and we see it's all numbers divisible by 3 or 5, then we can brute force a bunch of XORs from those and see that it never changes — this group is closed under XOR (sorry if I'm not using the right terminology). It's not too hard to see a construction where every number that can be XORed into being divisible by 3 is properly XORed.
      2. I guess I just TLEd because I used python, now that I think about it $$$n^2 \log^2 n$$$ should've passed with $$$n = 1000$$$
      • »
        »
        »
        »
        6 недель назад, скрыть # ^ |
         
        Проголосовать: нравится -8 Проголосовать: не нравится

        log^2 with 1 million is borderline even in C++, especially if one of the logs comes from RBTree since chasing pointers is slow

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

          But the O(log^2) part isn't accessing the set. The set itself is at most O(log n) in size, so inserting is O(log log n).

          The overall runtime complexity is then O(n^2 log^2 n) but in terms of memory accesses it's O(n^2 log n log log n), plus since the sets are so small, they should hopefully fit in cache.

          Besides this, in Python the set is based on a hashtable, and in fact the same solution passes, if only barely: 392255487

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

            Even n log n with sets has gotten me close to borderline in the past so I'm not super faithful in borderline stuff with sets lol

            For python if you don't lock down your hash function it's literally h(x: int) = x so it's pretty fast (against non-adversarial inputs)

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

(Div.1 B) Accepted: 648 Tried: 648

I'm curious whether such thing happened before.

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

Hi, I have a question. If let's say a problem is worth 300 points and I have 7 wrong submissions before a good one, do I end up with negative points on the problem?

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

What is the idea behind E?

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

Div1C totally destroyed me T T.

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

The gap between Div.1 B and Div.1 C is too huge.

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

That C question ruined my evening

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

The sample in D is too weak D:

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

Is it just me, or was E too easy for its position

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

Why is the time limit for problem E so tight that I only get TLE after performing one extra convolution???

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

D2E is too difficult...

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

I think E ca be soled with a similar method to last F2 use a 01 trie for max value just like last F2 then cartesian tree w..small to largee

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

I think Problem C has weak test cases.

look at this, 392233470

also, so many other solutions

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

Why did it not get TLE in 392213825

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

how to solve div 2 c?

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

Please check the submission #392192020... it is hanging in the pretest, and somehow not getting counted in the final result...

UPD: Now Fixed! Thanks for all the help and attentions!

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

guessforces + speedforces = best combo

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

Nooooooo! I thought my C problem was fine, but it got hacked, and looking again, it turned out to be wrong. Then my D problem popped out just 4 minutes after the contest! Two and a half hours is still too short /ll

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

Thnak U for the Very GOOD contest

az hamegi sepas gozaram awli bood ^_^

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

بابا باریکلا

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

392239828 Div2 E >> is it week tests or i can't proof why it's not N^2 worst case when some prefix appear so much

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

Reporting a suspected judging discrepancy: submission 392241459 got TLE on test 8, while a byte-for-byte identical solution (same language, verified char-by-char) — 392242967 — got Accepted for the same problem. Was there significant judging machine variance during this round? Would appreciate a look/rejudge if possible. Please look into this MikeMirzayanov,Error_Yuan,Um_nik

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

    This is clearly cheating

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

      Not sure what part of this reads as cheating to you. To be clear about what happened:

      I submitted my own solution during the contest, using my own approach — it got TLE. After the contest ended, I compared it with a friend's Accepted solution to understand why mine failed. Comparing solutions after a contest is not cheating — plagiarism during a live round is; post-contest review of already-locked-in verdicts is normal debugging practice. The resubmission of his code under my account was done after the contest was over, purely to test whether the TLE was account/machine-specific — not to gain rating or credit for the problem. No rating or standings were affected by that resubmission.

      If you have an actual technical explanation for why identical code (same language, same compiler, verified byte-for-byte) gave TLE for me and AC for two others, I'd genuinely like to hear it. That's the point of this post. If you don't, calling it "cheating" without addressing the actual verdict discrepancy doesn't help anyone here.

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

    I think he deserved this 'Accepted' 3,000 years ago.

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

    C++17 and C++23 are different languages. There can be significant difference in running time on those languages, especially because C++17 is 32-bit and C++20/23 is 64-bit.

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

full of random observations, no real topic or problem

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

Div 2 D is the worst Div 2 D I have ever read. Two stupid observations and the problem is solved.

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

Div 2 B >>>>>>>> C. Solved C, had an idea about B but the its implementation was lengthyyyyyy. Can anyone give their ideation for B

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

Got -ve delta after scoring nearly 4200 in common rank list and 5200 in final list while being already at grey level...........am I the only one who is experiencing that gaining delta became very difficult as compare to last year ........ earlier years scoring these rank at pupil gains me delta......... earlier I was >1300 rated ....now even not a pupil...........

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

Easiest Div 2 D I've ever seen and then a complete roadblock of a Div 2 E. Very weird contest.

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

It's just me or D1E's statement seems extremely confusing...

I just opened D1E's statement, and I spent like 10 minutes understanding it. Please, just give me a formal statement...

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

Rubbish contest!!!

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

as usual a lot of cheaters. and nobody ban them.

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

I'm curious why this approach can pass

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

i dont even know who my solution matched with?? i got one person's id i dont even know who they aree?

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

Will I lose points if I enter the correct answer twice?

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

My submission to problem D has been found to coincide with the submission of qvox177/392224975. Please note that this is a simple coincidence, and I do not know that guy. You can check my older submissions in order to see my code writing style. Also, the code was too small in length, so it got matched.

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

Hello, I received a coincidence warning for Problem 2269D. My submission (392224313) was flagged as matching TioYo (392206792), whom I do not know.

This is a false positive. Because the optimal solution relies on a minimal implementation using __builtin_popcount and basic point updates, there is very little room for structural variation, leading to identical abstract syntax trees. I also see other users in this thread reporting the exact same false positive for Problem D.

Please review this manually. Thank you!

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

Hello, my submission(392190907) for the problem D has been warned to coincide with the submission of Tejas57(392203720), whom I do not know.

Please note that this is a false positive, because the optimal solution relies on the basic bit_count property and some point updates, and there is very small formation for the structural variation, leading to the identical submission.You can also check my older submission as well to see my writting style.I also see other users in this regards reporting the exact same false positive for the problem.

Therefor please check this . I assure you I do not violate any rules regarding this.Also in past I did not violate any kind rules like this.

Thank You!

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

hard for beginners

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

Regarding the plagiarism/coincidence warning for submission 392205425

Hello,

I received the plagiarism warning concerning my submission 392205425 for Problem 2269D – What a SauSaGe! It's All Meat.

I would like to clarify that I wrote the solution myself during the contest and did not copy or obtain the code from the users mentioned in the warning. I did not communicate with them or use their submissions.

My usual workflow during programming contests is to use the CodeChef online compiler/IDE to write and test my code. During this contest, I opened the CodeChef compiler and wrote my solution there. While developing it, I manually entered the sample test cases given in the Codeforces problem statement into the CodeChef input section and repeatedly ran my own code to test it.

Once I arrived at the solution and confirmed that my program produced the expected results on the provided sample tests, I copied my own code from the CodeChef editor, went to the Codeforces submission page, pasted it, and submitted it. I did not copy code from another contestant or from a solution source. The way I approached the problem was by looking at the parity of the number of set bits. Initially, I was missing this observation and my first implementation didn't give the expected result when I tested it against the sample cases. I went back to the operation and tried to understand what actually changes when we XOR a number with the allowed values.

While testing it, I noticed that all the allowed XOR values — 3, 6, 9, 12, 15 — have an even number of set bits. This made me realize that XORing with any of them doesn't change whether the popcount of a number is even or odd.

From there, I realized that I only needed to keep track of how many elements currently have an even popcount. For each query, I first removed the contribution of the old value, replaced it with the new value, and then added the contribution of the new value. After making this change, I ran the sample tests again and got the expected results, so I copied my code from the CodeChef IDE and submitted it on Codeforces.

This is also why my final implementation ended up being quite short.

I was honestly surprised when I received the coincidence warning. I understand that the plagiarism system has detected similarities between the submissions, but I did not copy or use the other contestant's code.

I would really appreciate it if the flagged submissions and their submission histories could be reviewed manually. I am also happy to provide any information I have about how I developed and tested my solution during the contest.

Thank you for taking the time to look into this. And lastly the questions of this contest was too good especially the last one i cannot solve during contest , excited for more such contests upcoming and good questions

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

    Post the other users/submissions that your solution coincided with, so we can check how similar they are.

    Your AI-generated sob story contains nothing to exonerate you. “I didn't do it!” is what cheaters always say.

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

      The submissions mentioned in the warning are: fibonacci_6869 — 392205425 rules39 — 392214299

      I have pasted the code below so that the similarity can be checked.

      I just wanted to explain how I actually came up with and tested my solution during the contest. I am not asking anyone to simply take my word for it. I would just appreciate it if the similarity could be checked properly and, if necessary, reviewed by the contest organizers.

      I did not copy the other user's code.

      My submission: ~~~~~

      include

      include

      using namespace std;

      bool even(int x) { return __builtin_popcount(x) % 2 == 0; }

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

      vector<int> a(n + 1); 
      int c = 0; 
      
      for (int i = 1; i <= n; i++) { 
          cin >> a[i]; 
          if (even(a[i])) { 
              c++; 
          } 
      } 
      
      cout << c; 
      
      for (int i = 0; i < q; i++) { 
          int p, x; 
          cin >> p >> x; 
      
          if (even(a[p])) { 
              c--; 
          } 
      
          a[p] = x; 
      
          if (even(a[p])) { 
              c++; 
          } 
      
          cout << " " << c; 
      } 
      
      cout << "\n";

      }

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

      int t; 
      cin >> t; 
      
      while (t--) { 
          solve(); 
      } 
      
      return 0;

      } ~~~~~ The other submission (rules39 — 392214299): ~~~~~

      include

      include

      using namespace std;

      bool has_even_popcount(int x) { return __builtin_popcount(x) % 2 == 0; }

      void solution() { int n, q; cin >> n >> q;

      vector<int> a(n + 1); 
      int even_count = 0; 
      
      for (int i = 1; i <= n; ++i) { 
          cin >> a[i]; 
          if (has_even_popcount(a[i])) { 
              even_count++; 
          } 
      } 
      
      cout << even_count; 
      
      for (int i = 0; i < q; ++i) { 
          int p, x; 
          cin >> p >> x; 
      
          if (has_even_popcount(a[p])) { 
              even_count--; 
          } 
          a[p] = x; 
          if (has_even_popcount(a[p])) { 
              even_count++; 
          } 
      
          cout << " " << even_count; 
      } 
      cout << "\n";

      }

      int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); int t; cin >> t; while (t--) { solution(); }

      return 0;

      } ~~~~~ I did not copy their code or use their submission during the contest. I will be grateful if the submissions and their submission history to be checked by the organizers. Personally by looking at the code and variables of username alphabetical has used ai by looking at the variable names especially , although not blaming or pointing as cheated to that username alphabet but kindly check my ones.

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

        Please use

        // code blocks
        

        to post code. You can also just link to the submissions: 392205425 and 392214299.

        I'll point out that the two submissions are structurally identical, with the only differences being: whitespace, minimal renaming (even <=> has_even_popcount, c <=> even_count, solve <=> solution) and a tiny change in the for loops i++ <=> ++i.

        By itself, this could have been a coincidence considering the solution logic is fairly straightforward. But there is much more obvious evidence that you both cheated, either by collaborating or getting your answers from a third party.

        For problem A, B, and C, both you and alphabetical use a template that contains:

        #include <bits/stdc++.h>
        
        int main() {
            ..
            int t;
            if (cin >> t) {
                while (t--) {
                    solve();
                }
            }
            ..
        }
        

        What's fairly unusual is the if (cin >> t) part, which isn't wrong, but it's interesting that you both use it. That shows you collaborated or just happened to use the same template.

        The smoking gun is that for problem D, you both switch to the following template instead:

        #include <iostream>
        #include <vector>
        
        int main() {
            ..
            int t;
            cin >> t;
            while (t--) {
                solve();
            }
            ..
        }
        

        Note #include directives changed and the if-statement around cin >> t was removed, despite neither of those changes being necessary.

        Changing your template in the middle of a contest is a little strange in itself, but why would you both decide to independently switch templates for problem D, in exactly the same way? There is no explanation for this that doesn't involve code sharing.

        Sorry, you're a cheater.

        For alphabetical it's even more obvious if you look at his solving times:

        Problem A: 11 minutes.
        Problem B: 9 minutes.
        Problem C: 50 minutes and 9 attempts (!)
        Problem D: 8 minutes.

        Not only did he solve problem D faster than A or B, he solved it faster than tourist and the majority of division 1 contestants did. If you're going to cheat, at least try to make it believable.

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

I received a plagiarism/coincidence warning regarding my submission 392200578 for problem 2269A, which was reported as significantly coinciding with submission 392200119 (hello_985).

I would like to clarify the circumstances behind my submission because I genuinely solved the problem myself during the contest and did not copy the other contestant's solution.

Before this contest, I had been learning basic competitive programming techniques and binary exponentiation. In particular, I watched the following publicly available YouTube lecture before participating in the contest:

https://www.youtube.com/watch?v=w6Jw2fsoNn4&list=PLxgZQoSe9cg0-p9RHvaf32XoFEHT_2tj2&index=5

At approximately 1:54:54 in this video, binary exponentiation is explained using a recursive approach. The basic structure shown there is to divide the exponent by 2, recursively calculate the smaller power, and then square the result, multiplying by the base once more when the exponent is odd.

This is the reason my submission contains the following kind of implementation:

int findpow(int a,int b) { if(b==0)return 1; else if(b==1)return a; int x=findpow(a,b/2); int ans=0; if(b%2==0)return x*x; else if(b%2==1)return x*x*a; return ans; }

This was not code that I obtained from another contestant during the contest. It was an implementation of a technique that I had already learned before the contest from the publicly available lecture mentioned above.

I also want to point out that binary exponentiation is a standard competitive-programming technique, and the recursive implementation naturally has very little variation when written in a simple form. The use of basic variable names such as a, b, x, and ans, together with conditions such as b==0, b==1, b/2, and b%2, can therefore result in a substantial textual similarity between independently written implementations.

The rest of my solution was based on my own understanding of the problem. I derived the cases for k==1, k==2, n>k, and n==k myself and used the power function to calculate the required powers of 2. In particular, my contest submission contains:

if(k==1) cout << findpow(2,n); else if(k==2) cout << findpow(2,n-1)+2; else if(n>k) { d=n-k; cout << findpow(2,d+1)+2*(k-1); } else if(n==k) { cout << n*2; }

These expressions were part of my own solution to the problem and were not copied from the other flagged submission.

I understand that Codeforces uses automated systems to detect suspicious similarities and that even an unintentional coincidence can be reported. I am not disputing that the submissions may have similarities. My point is that there is a reasonable and verifiable explanation for at least the significant common structure: I had already learned and used the binary exponentiation technique from a source that was publicly available before the contest.

I am therefore providing the exact source and timestamp so that the origin of this part of my implementation can be independently checked:

YouTube lecture: https://www.youtube.com/watch?v=w6Jw2fsoNn4&list=PLxgZQoSe9cg0-p9RHvaf32XoFEHT_2tj2&index=5

Relevant timestamp: approximately 1:54:54 — binary exponentiation.

I would respectfully request that my submission be reviewed with this pre-contest source taken into consideration. I am willing to provide screenshots or any additional information necessary to establish that I had access to and learned this technique before the contest.

I want to make it clear that I did not intentionally copy submission 392200119 or use another contestant's code during the contest. The similarity in the implementation of binary exponentiation arose from using a standard technique that I had already learned beforehand, combined with a simple implementation and basic variable names.

Thank you for taking the time to review the circumstances of my submission.

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

    Who are you kidding with this?

    First, this isn't a case of of just some “textual similarity”. Submissions 392200578 and 392200119 are literally byte-for-byte identical. The odds of this happening for any nontrivial implementation are tiny to begin with.

    Second, there are lots of details in the code that should provide some "entropy" even if the basic idea is the same:

    1. The first two #include statements are followed by a space, the third one isn't.
    2. The first two "cout<<" statements are followed by a space, the other two aren't.
    3. findpow() includes two unnecessary/unreachable statements: int ans=0; and return ans;

    These are small inconsistencies that you would expect a human to introduce naturally when writing code, especially in a hurry. But the question is: what are the odds that a second person independently introduces the exact same inconsistencies in the exact same places, resulting in code that is, again, not just broadly similar because it's based on the same idea, but 100% byte-for-byte identical?

    And to top it off: the timing is suspicious. The two solutions were submitted 43 minutes and 12 seconds and 44 minutes and 17 seconds into the contest respectively. That's surprisingly close together for solutions that took you so long to cook up. Are we to believe that both of you failed to come up with a solution for 40 minutes, and then you both just happened to solve it independently within 1 minute and 5 seconds from each other, with exactly identical code?

    Putting these facts together it's pretty clear you are lying: you and the other guy did not come up with these solutions independently. Most likely a solution was leaked halfway through the contest and you both submitted it blindly without even attempting to obfuscate it.

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

Hello,

Please manually review the coincidence warning for my submission 392203910 to problem 2269E. It was compared with MiladGolshani’s submission 392223758.

I wrote my solution independently. I do not know MiladGolshani, and I did not see, share, or discuss their code during the contest. The solutions may use a similar approach. Please review the complete codes and my earlier submissions.

I submitted at 20:56:58 IST on September 26. The compared submission was made about 57 minutes later, at 21:54:17 IST. I used CodeChef's online compiler to run my code. I did not use ideone.com or another public paste site.

Please reconsider the flag. Thank you.

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

    Typical Indian cheater :) Is it even a surprise?

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

      Did you look through both complete codes? I use a lambda inside main, while the other person uses a separate function and passes the arrays to it. I calculate the masked prefix XOR values wherever I need them, while they calculate those values beforehand in a key array. I also use < in the left stack and <= in the right stack, while they do the reverse, so we handle equal maximum elements differently. In the backward scan, I use n+5 when there is no second position, while they use -1. To exclude a subarray of length one, I check the distance between the endpoints and then check the second position. They instead switch to the second position when the first gives a subarray of length one. I also submitted earlier, at 20:56:58 IST on September 26, while their submission was at 21:54:17 IST, which is 57 minutes and 19 seconds later. I wrote my solution independently, and I’m asking for both complete codes and the submission timeline to be reviewed. Could you explain which parts led you to that conclusion?

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

Hello Codeforces team,

I would like to honestly explain the situation regarding the matching submissions between my accounts, Shifat_X and RIS_AlmostAC.

Both accounts belong to me. I recently reached Pupil on my main account, Shifat_X, and I created RIS_AlmostAC because I did not want to participate in that contest using my main account. During the contest, after solving and submitting the problems from RIS_AlmostAC, I made the serious mistake of submitting the same code from Shifat_X as well.

I now fully understand that transferring or resubmitting code between two accounts during the same contest violates the contest rules, even when both accounts belong to the same person. I sincerely apologize and take full responsibility for this mistake. I am not claiming that the matching detection was incorrect. However, there was no intention to copy another contestant, share solutions with anyone, manipulate the standings, or gain an unfair advantage over other participants.

Shifat_X is my main and long-term account, and maintaining its submission history and solving streak is extremely important to me. The problems were genuinely solved by me during the contest. Therefore, I sincerely and strongly request that, if technically and administratively possible, the solved problems on Shifat_X be restored from Skipped to Accepted so that my genuine solving record and streak are not permanently affected.

If a penalty is necessary, I respectfully request that any action be applied to RIS_AlmostAC instead of Shifat_X. I am fully willing to stop using RIS_AlmostAC for contests and use only Shifat_X in the future. I kindly ask you to give me one opportunity to correct this mistake and preserve the accepted submissions and streak of my main account.

I understand that the final decision belongs entirely to the Codeforces administration, but I would be deeply grateful if you could reconsider the penalty on Shifat_X, restore the genuinely solved problems as Accepted, and restore the associated solving streak if possible.

I assure you that I have understood the rule clearly and that this will never happen again.

Main account: Shifat_X Secondary account: RIS_AlmostAC Flagged submission on Shifat_X: 392199354 Matching submission on RIS_AlmostAC: 392199205

Thank you very much for taking the time to review my explanation and request.

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

Respected Codeforces team , I am really sorry , I used both of my accounts for submitting code which violates the community rule.

I am sorry for my mistake , I wasn't aware (my fault altogether — really sorry for that) and in future, I will follow the codeforces rules and guidelines . I will never give you any chance of complaining and will maintain utmost integrity henceforth .

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

Cool

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

Good d.

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

If you want something for a non-standard contest, this is probably the best option you can get.