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:
- Error_Yuan for coordinating the round.
- Um_nik for preliminary reviewing and testing the round.
- AmShZ, N_z__ for red testing.
- AKprinceofpersia, Arpa, Dindin, Mhn_Neek, misteg168, mohammadsam, msab3f, narges__ for orange testing.
- Behesht, Behrad., Qazall, kian2009, rafieefatemeh for purple testing.
- SevenAlarm, Srsh, caibyte for blue testing.
- GUM for cyan testing.
- AlirezaBest for green testing.
- qhj0906 for gray testing.
- Alexdat2000 for Russian translation.
- MikeMirzayanov and KAN for the great platforms.
- You for participating!
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
Div. 2








We have so many contests rated for Division 1 recently, wow
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开始,我那个时候得睡觉了。对了,你知道一个叫洛谷的网站吗?
I know,so what? 22:35 is early for Chinese college students lol
My parents always hound me to hit the hay at 21:30 EVERY DAY...Because I'm just in Junior High School and I'm not allowed to stay up late.
دسسسسسخوش آقا
Hamed and the squad orz
orz contest + squad
آقا بهبه
(wish i could test tho)
This comment is deleted.
Are A,B,C more difficult than usual div2?
Maybe (a little!), but it depends entirely on you!
okay but why say this out loud
It doesnt matter because Hamed might change the order of questions because the version that i was solving was a pre-contest. So Ig it doesnt really matter you know..
Are you stupid? Imagine if a tester leaked a contest beforehand and then said "it doesn't matter because the author might change the problems." Obviously it does matter.
I will add more to you comment:
You are trusted by the author with the contest then you leak the contest, then defending yourself by saying “Hamed might change it” That’s genuinely one of the stupidest arguments I’ve seen. You clearly don’t understand what a tester is supposed to do
wth man don't lie and say you don't know that "Easy/not easy" is actually a hint. You, of all people, know exactly why aaa_Pigeon2 got downvoted.
how it can change the dataset of your mind of your contest? but nvm i actually agree and i apologize heavily from the contestants and authors and everyone ig this is a better way and i know how aaa_Pigeon2 was downvoted I completly know the story of hints he gave for every question in one contest..those pictures which were in a chinese messenger app and were translated. He was giving hint about every single question he made. I dont think you can compare this silly mistake i've made with that mistake which he spoiled most of the questions with big hints so..i guess its better to end this situation here.
First time to see testers're downvoted....
Upvote for your hard work:)
Never let this guy test again
To people who complain about "no div3 testers" this is why
Can't author delete this comment? Afaik comments that are about the problems which were posted before/while a contest can be deleted by an admin/author
He warned us about div2E/div1C
what was the comment anyways
Click the arrow on "← Rev. 2" by the upvote/downvote buttons
thanks!:)
I am doubting a pupil is solving to div2E
Next time don't confirm anything
Rev. 20
Rev. 6
Since when am i tourist
edit: if you hover over "You" it shows "Tourist You"
Must have been "you you"
1123 had first 2 question easy ones, I can tell this one gonna be hard.
As a participant, hope to get small delta, to be one point away from Expert (cuz i will lose it after 1123)
bah bah benazammm :)
be nazaret ye khareji ba khondan fingilish che hessi dare?! ;)
mohem nist XD
:))))
Gl everyone!
Finally an Iranian contest :)
hi guys i am back after a long break should i participate directly into this one or wait for div 3
don't wait just jump into "HAWAN-KUND", al the best
i really want to participate in a contest but why are they all at night
hiiiiii
ig div 1 is ok
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.
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.
You do not know anything about CF to talk bro, it is quality + quantity, plus, you can't solve all the problems, just focus on the easier problems, the harder ones are for better people, you can't solve them
I absolutely can just not during contest time. Up to 1800 problems are just not that difficult. (see my last submissions) They just take time.
And the quality of problems are dogshit, some of them are so boring I don't even want to bother.
You got ONE 1700 rating problem bro T-T, also, not all problems are bad, and why can't you get past newbie if you think 1800 are easy?
I need speed, it doesn't matter if I can solve a problem in 3-4 hours if it won't fit in contest time lol.
Yea, so why is the problem bad, you can't just say "I can't solve it in time" and say it is bad
in fact,3/4h for 1800 is toooooooo weak
it's good enough for your mom
so weak
keep gray
I will keep fucking your mom and entire family, ricehead.
just keep gray
shhhh, silence dog
just keep gray
always gray~
ちゃんころ
always gray~
keep gray
ちゃんころ
keep gray always gray~
you should go see a doctor
Definition of Intellectual Disability
Intellectual Disability (ID) is a neurodevelopmental disorder characterized primarily by significant limitations in both intellectual functioning and adaptive behavior, typically appearing during the developmental period (before age 18).
Specifically, it generally requires meeting all three of the following criteria:
Limitations in intellectual functioning This refers to abilities such as reasoning, problem-solving, planning, abstract thinking, judgment, learning, and learning from experience being significantly below the average level for one's peers. It is usually assessed through standardized intelligence tests, with an IQ of approximately 70 or below (the exact cutoff varies depending on the assessment tool and clinical judgment).
Limitations in adaptive behavior This refers to failing to meet the standards of conceptual, social, and practical skills required for one's age and cultural environment in daily life. For example:
Based on the level of support needed, intellectual disability is generally classified as: - Mild - Moderate - Severe - Profound
It should be emphasized that the diagnosis of intellectual disability cannot be based on IQ scores alone; it must also take into account adaptive functioning, developmental history, medical examinations, and environmental factors. Different diagnostic systems (such as DSM-5 and ICD-11) differ slightly in wording and classification, but the core criteria are essentially the same.
Letssss go!! 2 div 2 contests one after the other
Please someone host a contest before 10 oct for div 2,div 3 ;)
I can watch Minecraft LIVE after the contest ends!!
Hopefully end update
omg could it be...?
yay!
Excuse me, but where is the score distribution?
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
gotta try div1, expecting to get blown to hell (ok i can't)
ended up being late by one hour because i was playing cs to kill time
it will be bombastic
hoping to reach pupil atleast!!!!
بهبه سوالا عالی بوددددددد (Nice problems)
orz
Speedforces
There're 2 pruple in Top 5, amazing.
bruteforces lol
on problem C, my greedy algorithm worked for pretest 1 and then failed at pretest 3 :/
++
Epic battle greateric vs d1C except its not an actual epic battle and just d1C murdering me
O(nlogn) solution for div1 C gets TLE because of huge constant ...
$$$B, C, D$$$ all guess.
not d though it was simple bruteforce
c was absolute raigebait for me
ik i suck ass but wtf
Solution sketches for div2A-D (I didn't get cooked):
A. $$$2^{n-k+1} + 2(k-1)$$$, runs in $$$O(n)$$$ if using bitshift
B. The process converges to some cycle quickly so simulate it $$$k$$$ times, I set $$$k = 100$$$, and store the count in a map, $$$O(kn \log^2 n)$$$ unless you use unordered map
C. The process can be split into two parts where $$$k \leq m-k+1$$$ and where $$$k \gt m-k+1$$$. For the first part you can select all numbers in the subarray $$$[k \dots m-k+1]$$$, so we can cut out that subarray and go to the second part. For the second part let the new subarray length be $$$z$$$, we will select the max element of $$$i, z-i$$$ for all $$$1 \lt i \lt z-k+1$$$. Runs in $$$O(n)$$$
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$$$. $$$O(n+q)$$$
E. Nice speedforces round bro
A few criticisms (div2):
i followed same approach for C. Still got wrong answer on pretest 2 :)
Probably just a bug in your implementation, did you try stress testing or just coming up with diverse test cases to make sure it works?
Can you explain more? I used a segment tree but apparently that's overcomplicating it.
You literally could though? Example: 392253234 and this isn't even doing anything smart like caching the results of
Next().log^2 with 1 million is borderline even in C++, especially if one of the logs comes from RBTree since chasing pointers is slow
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
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) = xso it's pretty fast (against non-adversarial inputs)Fun fact: I've been hacked in four problems due to hashing issues in Div.3 when using Python:)
My advice is turning to C++ when you want to use dict or set or Counter in Python, especially in contests with open hacking phases:)
:sob: You can try using sha256 with crypto secure generated salt
(Div.1 B) Accepted: 648 Tried: 648
I'm curious whether such thing happened before.
It never occurred to me to look at #tried during the contest, but in retrospect it's a big hint that guessing works
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?
I'm pretty sure there's a score floor on every problem, so no.
okk, thanks
What is the idea behind E?
idk
But it has m ^ (a[l] ^ a[l+1] ^ ... ^ a[r]), whereas E has m & (a[l] ^ a[l+1] ^ ... ^ a[r])
With ^, you just xor m into the query and use the max-xor trie. With &, the bits where m is 0 don't matter, so the trie can't tell which way to go
Div1C totally destroyed me T T.
The gap between Div.1 B and Div.1 C is too huge.
That C question ruined my evening
The sample in D is too weak D:
Is it just me, or was E too easy for its position
F also easier than usual. The construction was almost obvious (but i didnt really prove number of operations, just added some ifs to make it less).
UPD: nvm, i just figure it out that tests were weak. my solution is not working, and problem is not easy at all. saad...
Na nkt js u.. tbf I rememberwd the 01 trie trick from last f2 so that cpuld be why
Why is the time limit for problem E so tight that I only get TLE after performing one extra convolution???
D2E is too difficult...
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
I think Problem C has weak test cases.
look at this, 392233470
also, so many other solutions
same here with this 392213825
Hamed_Ghaffari
I did it using the same process at first and got TLE 392233470
Accepted code 3922311221.
Removed
Why did it not get TLE in 392213825
how to solve div 2 c?
https://www.youtube.com/watch?v=zCWrKoY4Jec — here is one of solutions (start from 6:52 until ~9:30).
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!
guessforces + speedforces = best combo
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
Thnak U for the Very GOOD contest
az hamegi sepas gozaram awli bood ^_^
بابا باریکلا
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
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
This is clearly cheating
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.
Both submissions which you have linked in your original comment are exactly same, and both are submitted during contest time and both are submitted by 2 different accounts, right melechosher111 ? 392241459 392242967 (Don't use chatgpt for making 2 words statement into 10 words, just write what you want to say in simpler words)
Ok, my bad, these 2 submissions are practice ones, initially i just looked at timing of submissions and thought both were during contest.. i apologise for that,
Coming to why one failed and passed- borhbare using different compilers for submissions, anyways the submission idea is o(n2) which is the main cause
Glad you got it on time
How are you little soap? do you want some fatah_misile?
bro i know you are right but this is not the place
I think he deserved this 'Accepted' 3,000 years ago.
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.
full of random observations, no real topic or problem
Div 2 D is the worst Div 2 D I have ever read. Two stupid observations and the problem is solved.
Glad I’m not the only one who thinks this, the problem just feels like an obfuscation of the solution rather than a real problem
Div 2 B >>>>>>>> C. Solved C, had an idea about B but the its implementation was lengthyyyyyy. Can anyone give their ideation for B
https://codeforces.me/contest/2269/submission/392189319
Actually, if a_i and a_j become the same after x changes, then they will stay the same. Therefore, we only need to make each number change enough times.
Yeah got that.. I was trying to solve the complete essence of the problem. Could have taken the shorter way out =(
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...........
Well yes it is a bit skewed, but if one just genuinely improves and practices harder I believe it is possible to overtake cheaters and get their true rating.
Easiest Div 2 D I've ever seen and then a complete roadblock of a Div 2 E. Very weird contest.
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...
Rubbish contest!!!
as usual a lot of cheaters. and nobody ban them.
I'm curious why this approach can pass
i dont even know who my solution matched with?? i got one person's id i dont even know who they aree?
Will I lose points if I enter the correct answer twice?
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.
I also want to tell that I don't use any kind of online platform like IDEONE or anything.
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!
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!
This is also I want to notify that I do not use any kind of online platform like IDEONE or anything.
hard for beginners
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
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.
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(); }
} ~~~~~ 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.
Please use
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 loopsi++<=>++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:
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:
Note #include directives changed and the if-statement around
cin >> twas 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.
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, andans, together with conditions such asb==0,b==1,b/2, andb%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, andn==kmyself 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.
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:
int ans=0;andreturn 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.
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.
Typical Indian cheater :) Is it even a surprise?
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?
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.
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 .
Cool
Good d.
If you want something for a non-standard contest, this is probably the best option you can get.