
Hello Codeforces!
The series of Educational Rounds continues thanks to the support of the Neapolis University Pafos.
Educational Codeforces Round 194 (Rated for Div. 2) will start on Sep/08/2026 17:35 (Moscow time).
This round will be rated for the participants with rating lower than 2100. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest, you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally.
You will be given 7 problems and 2 hours to solve them. I hope everyone participating finds interesting problems for them to solve.
I would like to express my gratitude to Mike MikeMirzayanov Mirzayanov for creating Codeforces and Polygon, two platforms which made conducting programming contests and preparing problems for them much more convenient. Also big thanks to testers: awoo, FelixArg, Alenochka.
Our friends at Neapolis University Pafos have a message for you:
Planning to apply for the Computer Science and Artificial Intelligence (CSAI) program at Neapolis University Pafos?
JetBrains Youth Clubs can help you prepare.
🤖 AI Club is a chance to explore one of the core areas you’ll study in the CSAI program. You’ll work with AI topics, strengthen your understanding, and get more experience before university.
➗ Math Club helps you sharpen the mathematical problem-solving skills you’ll need for the program. There’s also a direct application benefit: participation in the Math Club can give you 30% of your entrance test mark for the Computer Science and Artificial Intelligence BSc supported by JetBrains Foundation.
Both clubs are designed for high school students with a strong interest in STEM who want to challenge themselves and prepare for the next step.
👉 Join JetBrains Youth Clubs: AI and Math
Good luck in solving the problems! See you at the contest.








Why aren't any comments here
The brother asked a very beautiful question
i really wonder what is kuro's name irl>.<
It's on the profile their name is "Sleeping early instead of CP makes a better life." just like my name is "virtual rating 1637"
Yeah, just like how my irl name is "we're no stranger to love"
PS: My full name is "we're no stranger to love, you know the rules, and so do I". My dad is Rick Astley btw
My mom is Rick Astley, does that mean we're related?
WHAAAAA---
Of course it's Tobiichi Origami
Probably because many can't compete in weekday rounds
Hope to gain tiny delta and stay at Specialist
I hope i hit expert again
orz
meow:<
Thanks everyone for participating in Educational Codeforces Round 194 [rated for Div. 2]. Although it was initially difficult to understand from the editorial when I first participating in Codeforces contests. However I found that once I got used to it, the explanations felt very easy to understand, accurate, and highly academic.
We should read the hint and solution before reading code (Sorry for my bad English)
Will unrated registration be enabled?
Is pashka taking a Youth Coding Camp this year?
Best chance to reach 2100
qypywppu
guys whats the difference between edu and normal rounds besides on how the ranks are decided
Educational round use extended ICPC rules. There are no point distributions. There are two factors that determine one's rank:
Details here: https://codeforces.me/blog/entry/133094
Good luck everyone!;)
thankkss, u 2 |3
good luck everyone
Another Contest W000000000000000000000000000000000000000000000000000000000000000000000W
#1 is here guys... compete for #2 :)
GOOD LUCK GUYSSSSSS.
Thank you to the orginasors for you support
another dopamine releasing match
I failed D :C Yummy round tho :)
Problem $$$D$$$ was an annoying casework implementation + the even length = 2 and even length = 4, 6, 8,... case. Very annoying to think and implement. But still wow how 2k people solved it?
$$$A, B, C$$$ were good problems. Thanks for the round.
I thought problem $$$D$$$ only has 4 answers: -1, 1, 2, 3?
Oh, yes. After I solved the problem in a really messy way I realized it. This was my submission.
can you explain D pleasee, i got absolutely fried onit :/ Also I loved A,B,C too!
What I did was check if the first element is 0 or there are two consecutive 0's, if so, then print -1.
Then check if there was +- or -+ somewhere, if that's the case the answer is at least 2. Then the only way for it to be 3 is to be the structure +--+ or -++-.
If there wasn't any +- or -+, then if there is any 0 at an odd position then the answer is 2. This is because if every element is -1 or 1, then the parity will be odd, even, odd, even, odd, even, odd, etc.
Hope my explanation is helpful.
omdd is it just casework noo :C I also saw the first 0 or consecutive 00 and even thought like maybe i binary search the max jump, ALSO TYSM for explaining it! :)
By observation, the answer will be only [-3, 3]. Just dp all the 7 state.
There is no need for such casework in D. You can check my submission 389942640
I don't use casework. Just DP with offset to avoid negative index. 389914922
Does Educational Contest more difficult than other normal contests? I feels like i usually struggle with Educational Contest problem many times, while other's contest problems with the same divisions are probably easier for me. Well for me it makes the contest more "educational"
in theory, no, they shouldn't be harder than div2, ( for some people are easier ), but for me personally edu rounds feels more like "you either already solved a similar problem or good luck finding the solution in less than a hour".
Solved only A, B and C :(
deng i did A only :[
same
Fuck. I solved E just 3 min after the contest.
Amazing contest, had a lot of fun solving the problems!
can anyone explain B. is it just me or B is just a bit harder
fried of mine get this really easy sol
i found something crazy. I use a map to count the frequency of the y%x and if the frequency is bigger than some number it stays the same but i dont know why
in the contest i use the third test case to find this cool thing
3 8 6
8 % 3 == 2
9 % 4 == 1
10 % 5 == 0
11 % 6 == 5
12 % 7 == 5
13 % 8 == 5
14 % 9 ...
15 % 10 ...
16 % 11 ...
17 % 12 ...
... maybe wrong ?
so after i found this i make bold assumptions if the frequency of result after mod is bigger than some number the mod result will same :) and i do this and ac this problem :)
Hope no one succeeds in hacking my submission :)
upd : i ac :O :)
actually i think i should do some proof or math to find the that special number
if you want to know read this:
after 2*x > y, the remainder will always be the same for y%x as they both only increase by 1 and x will never divide into y evenly after that. Not the best proof but that's how I thought of it.
thanks :O
specifically, the remainder is staying the same also after 2*x>y since both x and y are increasing by 1.
And regardless of how big k is, it won't take more than 10**6 iterations for 2*x > y since initial x and y are bounded by 10**6. Need some algebra for the proof.
(y + i) mod (x + i) d = y-x => y = x + d (d + x + i) mod (x + i) => d mod (x + i)
If x + i > d => d-x < i < k, then every remainder is d and we can count it in O(1). For 0 <= i <= d-x, we can use a loop to calculate this in O(y).
It's a math problem. The obvious solution is to just calculate $$$\sum_{i=0}^{k-1} (y + i) \% (x + i)$$$ directly, but unfortunately $$$k$$$ is too large to make this run in time. To speed this up, make a few observations.
First, the problem statement guarantees that $$$x \le y$$$ initially, and incrementing both $$$x$$$ and $$$y$$$ at the same time preserves this property, so $$$1 \le (y + i) / (x + i)$$$ for all $$$i \ge 0$$$.
Second, $$$(y + i) / (x + i)$$$ strictly decreases as $$$i$$$ increases, and reaches $$$1$$$ in the limit.
Third, when $$$1 \le (y + i) / (x + i) \le 2$$$ then $$$(y + i) \% (x + i) = y - x$$$, and the same holds for all indices greater than $$$i$$$.
The solution is to simulate steps until $$$y/x \lt 2$$$ or equivalently $$$y \lt 2x$$$ and then we know the remaining terms in the sum are equal to $$$y - x$$$ so we can use a closed form to calculate their sum.
Note that it takes at most $$$y - 2x + 1 = \mathcal{O}(y)$$$ steps to reach this point, and since $$$y \le 10^6$$$ this is fast enough.
Here's a simple Python solution: 389975890
Good Range of Problems.
Great contest!
hein
Please help me to understand why y-x will be answer for all x>y-x ?
Note that $$$y \% x = y - x \lfloor \frac{y}{x} \rfloor$$$ (this is just the definition of the modulo operator).
When $$$x \le y \lt 2x$$$, then $$$1 \le \frac{y}{x} \lt 2$$$ and $$$\lfloor \frac{y}{x} \rfloor = 1$$$, so $$$y \% x = y - x$$$.
Got it Thanks !
Can someone explain why did this submission 389899382 got AC in contest but WA after system testing? It wasn’t hacked btw
Edit. NVM I’m dumb af
Editorial?
I surpasses the 1200 barrier after this contest still it showing newbie even I have rating more than 1200.
lol, why did it say rule violation , i solved A,B,D they are all skipped?
Hi team, I need some guidance on what kind of rules can be violated during competition and to be careful ?
Where's the Editorial?
Hi MikeMirzayanov[user:MikeMirzayanov],
I participated in Educational Codeforces Round 194 (Div. 2) under the handle vintage404. All four of my submissions for this round have been marked "Skipped":
I wrote every solution myself and did not communicate with anyone or copy any code during the contest. Since A-C are fairly standard problems, I understand similar approaches can end up looking alike, which may have triggered a false positive in the similarity checker.
I'd really appreciate it if you or someone from the team could take another look at these submissions. I'm happy to walk through my approach for each problem if that helps verify originality.
Thanks for your time.
Request for manual review — Educational Codeforces Round 194
Hello,
My submissions were marked as skipped due to a rules violation, and I would like to request a manual review.
Submission IDs:
389910044 389893178 389890366
I wrote the problem-specific solutions myself during the contest. I did use a pre-existing C++ boilerplate template containing standard headers, fast I/O, macros, generic vector input/output functions, and the solve()/main() structure.
For transparency, this template was generated with assistance from Gemini before the contest. It contains no problem-specific solution logic. The algorithms and problem-specific code in the three submissions were written by me.
I am providing the template for the coordinators to review:
I would be grateful if the coordinators could manually review the submissions and the reason for the rules-violation flag. I am happy to explain my approach to each problem or provide any additional information needed to verify that the solutions were written independently.
Thank you.
--
Hello Codeforces coordinators,
My submissions in Educational Codeforces Round 194 (Contest 2260) were marked as Skipped due to a rules violation.
I would like to request a manual review of my submissions, as I believe this may have been a false positive.
Contest: Educational Codeforces Round 194 (2260) Handle: reetabratam Problems: A,B,C Submission IDs:389901686, 389911269, 389932459
I wrote my solutions independently during the contest. I did not copy another participant's solution or share my code with anyone during the contest.
For each problem, I developed the solution based on my own understanding of the problem. I am also able to explain the algorithm and implementation of each submission if necessary.
I understand that Codeforces needs to enforce its rules and detect copied or otherwise suspicious submissions. However, since I believe my submissions were written independently, I would be grateful if the skipped status could be reviewed manually.
I am happy to provide any additional explanation regarding my solutions, development process, or reasoning if required.
Thank you for your time and for maintaining a fair competitive programming environment.
Best regards, reetabratam
same
Hello, I noticed that my submission for Educational Codeforces Round 194 were skipped, citing rules violation. I am writing to appeal this, because I solved the problem questions myself (A, and B), and have not used any AI tools, or copied anyone's code, and without any outside assistance.
My handle: Vex42 Skipped submission IDs: 389896999 389911779 389943910 389944343
I believe they were falsely flagged due to my template (its boilerplate, including many headers, etc) and because I tried my hand at problem D, that was because I did not know about Bitwise, XOR etc of problem C, and had recently studied prefix sums, so i tried problem D.
My approach to the problems A. Since we need to make the last and first questions easy, firstly i should determine if 1st and last questions are already easy, if so, we don't need to make any swaps, 0 ans. And for swapping, we need atleast 1 other easy question (if only 1 of first and second is hard), or 2 easy (if both are hard). So for this i thought that counting the num of easy while reading would be convenient. And I created 2 bools, for tracking if first and last are easy or difficult, I matched that with number of other easy questions count available to tell the minimum number of swaps required. Then printed the answer
B. I kept all the variables x, y, z as long long to avoid integer overflow (even though x and y are within range, i felt it was safer). For counting number of projects Monocarp has to do, i though simply adding (b%a) in a for loop would be straightforward, But after a while i noticed nested loops and that it running over a billion times (k till 10^12) will be too slow (that was the reason for my "this for loop is too slow" comment, which i wrote before optimizing the code.). So i tracked the pattern for b%a for a few numbers and noticed that remainder became constant when a became greater than b/2, so i decided to put condition to break the loop when a > b/2 and simply added the remaining k-i elements (they are constant, y-x) and then print it
After solving B, i saw problem C, it was from XOR, bitwise, which I have not studied yet, so i skipped it. Then i tried to solve problem D, it seemed doable, but i got confused with alot of "if, else" statements, and got wrong answer twice on my 2 submission attempts
I kindly ask for a manual review of my code, thank you so much
same
I want to clarify the coincidence detected for problem 2260A.
I have two Codeforces accounts,
tarunishandtarun488, and I mistakenly submitted the same solution from both accounts during the contest. Both accounts belong to me, and there was no copying from another participant.I understand that submitting the same solution from multiple accounts during a contest violates the Codeforces rules. I apologize for the mistake and understand that any penalty Codeforces considers appropriate is up to the organizers.
I will make sure this does not happen again.
D got me this round. Still stuck on it and waiting for the editorial.
there is not enough time for me to solve D (crying, i know how to do!)
sorry ,but my English isn`t very well.
No it is absoluetly perfect:)
thank you :)
.
Hello, my submissions in Educational Codeforces Round 194 have been marked as Skipped (Rules Violation), and my rating has decreased as a result. My solutions were written by me during the contest, and I did not copy or share solutions or use outside assistance. I also don't know which specific rule my submissions were found to violate. Could you please clarify the reason for the violation and manually review my submissions? Handle: Sonu2208 Problems affected: A, B, D
.
Same
Great contest excellent problems thank you very much!
Hey, I wanted to tell that my verdicts were skipped in the contest. First I searched on reddit/google what this means. And after finding that I can comment here for the request. I kindly request to please check that my solutions were not plagiarised or anything. They are authentic, please consider this.
Hi, I would like to request a manual review of the similarity flag between my submission JesusSend (me) / 389915412 and satyamdhal / 389950304.
I did not copy satyamdhal’s submission or communicate with that user. One important point is the submission timing: my submission 389915412 was submitted at 18:19:29 on September 8, while satyamdhal’s submission 389950304 was submitted at 19:30:28, more than an hour later. So I could not have copied the source that the system is comparing mine against.
I understand why the automatic checker found similarities. Both programs use the same compact mathematical characterization, so some distinctive conditions inevitably appear in both, especially:
s[0] == '0' || s.find("00") != string::npos
the parity check for a zero,
s[i] == '0' && i % 2 == 0
and the two exceptional patterns:
"+--+" and "-++-".
However, the actual program structure is noticeably different.
My submission is built around a separate solve() function. For each test case I use early returns:
if (...) { cout << -1; return; }
then I construct a Boolean called one, scan the whole string to decide whether cost 1 is possible, and explicitly do:
if (one) { cout << 1; return; }
Only after finishing that test do I check "+--+" and "-++-", and then directly choose between 3 and 2.
In satyamdhal’s submission, the entire test-case logic is written directly inside main(). It uses continue to move through the outer while (t--) loop rather than returning from a separate solver. More importantly, its decision order is different: it checks "+--+" / "-++-" before running its Boolean scan, and its Boolean ok is finally used through:
cout << (ok ? 1 : 2)
whereas my program first completes the cost-1 classification and returns immediately if it succeeds, then separately handles the 3/2 cases.
So although several conditions are necessarily similar, the control flow is not a line-for-line copy:
My structure: impossible → scan for cost 1 → return 1 → check exceptional patterns → 3/2.
Submission 389950304: impossible → check exceptional patterns → continue with scan → output 1/2. **** The variable organization is also different (one in mine and ok in the compared submission), as is the separation between solve() and main(), the use of return and continue, and the placement of the final classification.
BledDest I am not arguing that the two sources have no similarity. They clearly implement the same short characterization, and I understand why an automated comparison highlighted them. What I am asking is that similarity alone not be treated as proof that I copied satyamdhal/389950304, particularly when my submission predates that submission, as I did not cheat in any way.
Could a contest administrator please manually review my code — JesusSend/389915412 against satyamdhal/389950304, including the timestamps and the complete source/control flow, and reconsider the flag if the evidence does not support direct plagiarism?
I would appreciate a human review rather than a decision based solely on the similarity checker.**** Thank you.BledDest
Hello Codeforces Team,
I would like to respectfully request a review of my submissions from Educational Codeforces Round 194 (Rated for Div. 2). My submissions were marked as “Skipped” due to a rules violation, and my rating was affected as a result.
To the best of my knowledge, I participated in the contest independently and followed the contest rules. I did not communicate with other participants, share my code, or intentionally use another participant's solution.
I therefore kindly request a manual review of my submissions and the reason for the rules-violation flag. If the submissions were incorrectly flagged, I would be very grateful if they could be reconsidered and my rating restored.
I fully understand and respect the importance of maintaining fair competition on Codeforces. I am also willing to provide any explanation or evidence regarding my solutions if required.
Handle: pavanj123
Thank you for taking the time to review my case.
I'm sad cus I didn't participate :(, ngl one of the best rounds in a long time (C was a bit hard tho)
My solutions to problems from Educational Codeforces Round 194 (Contest 2260) have been marked as skipped due to a rule violation. I was surprised to see this, as I wrote both solutions myself during the contest and, to my knowledge, did not break any contest rules. No information was provided to me about which rule was violated or why.
I would like to request a manual review of my solutions and clarification on the reason for the rule violation.
Handle: bhavya25155 Submission IDs: 389898625 (Problem A), 389951461 (Problem C)
Both submissions passed all tests with an OK verdict, so I don't believe this is related to solution correctness. I'd appreciate it if this could be looked into.