Hello, Codeforces!

We are excited and pleased to announce that Codeforces Round 1117 (Div. 2) will be held on Aug/17/2026 17:35 (Moscow time). This round will be rated for all participants with rating below $$$2100$$$. You will be given $$$2$$$ hours to solve $$$6$$$ problems and some problems will be divided into subtasks.
All problems were authored and prepared by egorka5opka, oblememan and me.
We are extremely grateful to these wonderful people:
- Akulyat for coordinating the round and assistance in preparing problems;
- Um_nik for preliminary review of the round;
- Our testers: 300iq, __baozii__, Tizz1e, Friendiks, _icy_, Wileyne, Megnis, omsincoconut, _istil, AksLolCoding, madlogic for their time and effort in testing the problems.
The score distribution is below.
$$$500-750-1250-1750−2250−(2750+1000)$$$
GLHF!
UPD1 For those who were affected by the incorrect constraints on problem D and wish for the round not to affect their rating, please leave a comment stating "I don't want the round to be rated for me" in the "Ask a question" section found on the main contest page under the problems.
This applies only to those who were genuinely affected, meaning you must have received a TL (or any other suitable verdict) for that problem.
UPD1.1 Requests are accepted until Tuesday, August 18, 2026 at 12:00UTC (please note the timezone).
The rollback will be done after that.
UPD2 Editorial
UPD3 Winners and First to solve
Official participants:
| Place | Participant |
|---|---|
| 1 | Payea |
| 2 | azizs |
| 3 | mahath_b.1 |
| 4 | lady__hunter |
| 5 | naixinganhuoyyp |
Unofficial participants:
| Place | Participant |
|---|---|
| 1 | Zexistu |
| 2 | maspy |
| 3 | PiGoat |
| 4 | potato167 |
| 5 | xl123 |
First to solve:
| Task | Participant |
|---|---|
| A | veizxz__ |
| B | wangzeyu2013 |
| C | Zexistu |
| D | Gouransh06 |
| E | IBACKFORREVENGE |
| F1 | NDesku |
| F2 | hungcubuso1vn |








Auto comment: topic has been updated by pskobx (previous revision, new revision, compare).
Trash competition! Why are so many people upvoting it?
effort. it may be bad, but the authors probably spent a lot of time and hardwork
you are right
Wow, short announcement. And also, what a cute *wait what is this animal*
Bobr kurwa!
Looks like capybara, but it isn't
Beaver... Bobr kurwa!!!
Beaver
Why this announcement is too short?
I think pskobx is a little lazy
Auto comment: topic has been updated by pskobx (previous revision, new revision, compare).
Btw,do you have a third hand to click the picture?
Bobr kurwa
cool pfp
thank you you too!
lol i was rushing the keyboard just to write that
excited!!my first time to join
i'm stealing your pfp
O.O
First contest after the ECPC qualifications, hoping for a strong comeback!
First time as a red tester :D
Hope to become expert!
Noup , not when every newbie solves 4+ problems
So cute that animal is!
Hope to increase my max rating :)
might participate
pskobx the link text is "Codeforces Round (Div. 2)", should be "Codeforces Round 1117 (Div. 2)" :D
ugh Contest starts at 22:35, and I have to get up at 6:30 tomorrow.
Hope A is easier than my last contest :)
first time read the whole announcement lol
What should I pay attention to when I participate in Codeforces for the first time?
Constraints
nah constraints are not that important, if you meet a problem where $$$n ≤ 10^5$$$, just use backtrack since you only need 1 or 2 super computer to AC...
... I tried to solve problem with SegTree(Div. 3 A, forget which one). Then i see the Constraints.
Why tf do u need seg tree for div. 3A???
When you earn Hammer, everything seems like Nails.
That's true and common.
After I learnt FHQ-Treap, I used it everywhere even the problem only requires Fenwick Tree...
How did he know?
It wasn't a prediction, it was a warning. You didn't listen.
Try to get a brute force solution for the earlier problems since the constraints are more forgiving get good at solving a , b then try for c and so on and so forth
Rickroll
HOW DID I FALL FOR IT QWQ
I felt immense suffering from falling for your unforeseeable rickroll. Don't have to be so brutal like that, man... Be more obvious next time pls.
Oh ok. I'll try to be more obvious next time. Sorry for being so brutally honest
What's the approximate difficulty level?
div 2 is largely not recommended for beginners maybe solve a and try for b you can still give the contest if you dont care about rating
Im not sure but sometimes div2 seems like for beginners. In div3 i can solve 4 problem and get -30 -40, in div2 i stable solve at least 2 task and get +10, +15
Most complete beginners will probably solve A, maybe B
That's absolutely true.Because l never solve C during the contest:(
Try solving more 1200+ problems and less gray problems
any recommendation on bit manipulation, i m stuck on that topic, i just cant solve question like this. T-T
in div2
A is 800-900
B is 900-1200
C is 1200-1500
D is 1400-2k
(of course this isnt always true but mostly is)
ABC Speed run!
finnaly contest
o kurwa bober ‼️‼️
time to derust again, wish everyone +Δ :33
first contest let's see how this goes...
less goo hope to get +delta
+1 Nice Contest fr hope to see this type more contest rather than just abc greedy greedy greedy ts was very gud
:)
banger update on D at last minute, ruined my plans to attempt it .. lmao !!
I wasted a lot of time and got a lot of penalties on problem D, it was really a bad experience :(
This is perhaps the lowest-quality contest I've taken in the last few months.
Agree with all the statements here. Just a quick question, since you say F1 was trivial. I thought of a very simple solution, which was that you should never skip a platform, and you should just go as far as possible. The implementation would be quite difficult (making sure it doesn't TLE, a whole bunch of things go into it), but is this the correct answer?
no, you can just use a segment tree and do an $$$O(x^4)$$$ dp inside the merge function
OHHHHHHHHHHHHHHHHHHH That's way simpler lol
i think typical F1 was just segtree storing [5][5] matrix of the cost of going from one of prefix points to one of prefix points of next block. This is segtree-compatible and the zone in between is compressed in many similar jumps anyway.
Lol C was harder for me to implement
Actually it doesn't even require tree processing. You can disable every incoming edge into the marked vertex but one. The choice of that one should be done so it doesnt have a marked indirect parent, Well you can discard the one with smallest depth. Considering the constraints on tree it's as easy as "output all the vector $$$a$$$ but its smallest element.
B not annoying to implement, just compare $$$a_0 + n$$$ against $$$b_0 + m$$$ (this imo is B div 2 level of idea that makes implementation not annoying). Not sure which part of A is annoying (like, just have a set of first letters?) but reading it was not enjoyable for sure.
I don't think A or B is hard to implement,especially B,
if(a[1]+n>=b[1]+m)is OK.and E is just this https://codeforces.me/contest/1912/problem/A (l = [-a1, b1, -a2, b2, ...]) with a little bit different question but that doesnt change much just a little more annoying impl
so the only good problem isnt original at all, damns
also F2 is pretty stupid you just need to abuse q=10^4 and compress all [l,r] without queries into single node and just run F1 code... joke problem 387470313
the only diff is merge function allowed to be x^4 for F1 and for F2 must be x^3, but thats just one prefix maximum added
ngl this is The weirdest contest i have done in my life...
Ciszej, proszę, ciszej. Teraz Bartek nam pokaże, jak wkur*ić participants!
When is the next contest.... :sigh: again have to w8 long
4 tles on d because of incorrect constraints wtf??? still hopefully +delta but wow
Super boring problems
how could you, what will the beavers think D:
My sympathy towards the beavers to become victims of such problem statements
wow semi-rated round
can they even do that ? i've never seen it lol
Good problems but the problem statements were really bad and hard to understand the problem.
The problem statements were barely understandable. It would have been beneficial if a bit more effort had been put into writing more precise (and grammatically correct) statements.
TBH this is probably the most challenging contest I have ever taken part in(E was so so good), GGWP!
ReadingForces
How to slove D? I'm too fool to solve such problem :<
Trash.
The statements are difficult to understand.
how long until we can submit? i think i just had 1 line written wrong on E smh
Problems are interesting,and beavers are very CUTE!!!!
Bad problem statements, and changing D constraints in the last 20 minutes is so dumb.
E was a good problem. Enjoyed solving it.
C is soooo weird. I solved it in a minute, then I said it's impossible, It's C, and my "dumb" solution won't work, then wasted more than 10 minutes trying to disprove my solution
C is easier than A
Feeling blessed I didn’t participate :>
I might lose pupil in this contest. Time to turn graytist off
What a trash round!Every problem is trivial and it only need your code skill not your mind.
Any solution on C? I guess a greedy and it got passed.(that is sort a and output a[2:n]) I think it is bad but I cannot hack it.....
I think this is similar to what I did:
If 1 is a den, output every den that isn't 1. Else, from a leaf, traverse towards the root, and remove the camera from the den closest to the root.
thx.my code accept.How amazing!I cannot believe it's C
You should print the parent of every node except the one of minimum depth. Since
p[i] < iyour solution is correct.thx.I can slove C just because good luck bless me >_<
Although I eventually passed problem D, even so, it cannot compensate for the RE caused by my incorrect range setting due to the wrong constraints in problem D, and the resulting penalty time.
In this regard, I condemn the review work of the problems for this round. :(
I already had the topological ordering set up for C before I checked the statement and saw that p_i < i. Unlucky
Shame that stuff happened with D that affected me and that the problem was so tedious, because I actually think C is a really good problem and E looked very interesting
from the last 7 to 8 constest i was able to solve only A (first question) in div 2 when i move to problem B i get complwetely stuck .... can anyone suggest what to do improve from this position... any suggestion willl be very helpful
just do 900-1400 rated problem(select randomly, and take 2+ hr in each question to brainstom them)
Please check the code for Problem C in the editorial, code attached is of different problem.
Edit: also O(1) solution is given in editorial for problem B but complexity mentioned is O(N).
You need $$$O(n)$$$ complexity to input the arrays too.
lol, my template makes me forget that! submission
Very fun contest, first time solving C + almost solved D
never have i ever wanted to downvote a problem in the editorial more; I like the concept but not the framing of C
question A felt harder than B .
the problem statements were hard to understand for both A and B. Also, I think the sample input and sample output given in problem A were made just to confuse beginners (sadly, I was one of them T-T)
The answer for C was obvious, but too easy to be true
Nice problems C and D Authors, please make problem statements shorter and use AI to make them grammatically correct, they were difficult to understand.
Can someone please explain why these didn't get accepted? A . 387418900 C . 387449079
make this contest unrated please
You have returned before all the strings are inputted in A. This may cause a misalignment of the input in the later test cases.
Thank you! What about C?
std::vector::resizeonly fills the extra values with its second parameter, and keeps the old values don't change. So yourdepthisn't totally initialized in multiple test cases.btw I learned this from GPT just now :)
Thank you so much
Problem statements ❌ Preragraph ✅
problem D: forgot x,y <= 1e14, so x*y will overflow :)
Wasting time on D just to adjust my code for the new constraint in the last minute :(
You didn't solve in last minute tho? And your code have no hard-coded stuff that would be affected by that constraint.
missed the contest bruh i hope the next one is on saturday
I think contest is getting a lil bit more criticism like problems were good yea i know long statement and constraints issue on D but that does not means you just start commenting "bad contest..." if constraints really effected you then just make it unrated for you. guys chill...
i agree and though some things could have been better i don't quite think it deserves this hate
If you are trying to understand the optimal strategy for E.
Busy Beaver, you can think of it like an RPG city-building game where your goal is to use greedy block merging and a min-heap to grind for cash and build the tallest skyscraper possible. You start with a small amount of carrots and need to complete profitable construction "quests" across various sites before dumping all your accumulated wealth into a single building. Since some individual floors make a profit while others lose money, you first merge any unprofitable floor with the floors directly above it until the combined block yields a strictly positive net profit, creating a "quest" with a specific peak money requirement to survive construction and a total net payout at the end. Once you have these strictly profitable quests, you throw the first available one from every building into a min-heap sorted by their entry requirement and greedily complete the cheapest ones you can afford. Because every quest is profitable, your bank account snowballs, allowing you to unlock and add the next quests for those buildings into the heap until you are either too poor to afford the remaining ones or the heap is entirely empty. Having reached the absolute maximum wealth possible in the game, you then take your massive pile of cash and simulate buying the remaining unbuilt floors of each partially-constructed building one by one until you go completely broke, simply keeping track of which building reaches the highest floor.
This entire process efficiently groups the floors and processes the optimal path in $$$O(\sum m_i \log N)$$$ time, which easily passes the two-second time limit!
To mathematically solve the "Busy Beaver" problem, you must model the construction process using four core formulas applied in a single continuous workflow. First, every individual floor $$$i$$$ has an upfront cost $$$A_i$$$ and a completion reward $$$B_i$$$, meaning its net profit is calculated as $$$P = B_i - A_i$$$ and its base money requirement to start construction is $$$R = A_i$$$. Because some floors lose money ($$$P \le 0$$$), you must mathematically merge them with the floors directly above them into a combined block; when joining a lower block (with requirement $$$R_1$$$ and profit $$$P_1$$$) to an upper block (with requirement $$$R_2$$$ and profit $$$P_2$$$), the combined net profit is simply the sum $$$P_{new} = P_1 + P_2$$$, while the new combined minimum requirement becomes $$$R_{new} = \max(R_1, R_2 - P_1)$$$ because you need enough starting capital to afford the first block and also enough to cover the second block's cost after accounting for the first block's net cash change. Once all floors are merged into strictly positive profit blocks ($$$P \gt 0$$$), you use a min-heap to repeatedly check if your current total money $$$M$$$ meets the cheapest available block's requirement ($$$M \ge R$$$), and if so, you build it and update your wealth to $$$M_{new} = M + P$$$. Finally, having reached your mathematical maximum wealth from these profitable groups, you simulate building the remaining individual floors one by one by checking if $$$M \ge A_i$$$ and updating your money to $$$M_{new} = M - A_i + B_i$$$ while simply tallying the total floors built for each building to find the absolute maximum height.
Love cp
I don't want the round to be rated for me
abc is too easy,d is bad,e is too hard!shit contest!!
Top 20 user color statistics:
Gray: 3, Green: 1, Cyan: 1, blue: 3, purple: 4, orange: 3, Red: 5.
All kinds of colors. Everyone have chance to reach top (with AI)
With all due respect, this is the worst contest I have ever participated in, and I genuinely feel that I wasted two hours of my time.
First, almost every problem statement was extremely difficult to understand. If the problem setters cannot express themselves clearly, could they please refrain from including background stories? For most of the problems, I had to read the statements over and over just to understand what they were trying to say. Take problems A and B, for example. They are supposed to be the easy problems, and the actual thinking involved is honestly trivial to the point of being boring. Each one took me only about two or three minutes from the moment I actually understood the statement to getting accepted, yet I had to spend even more time just reading the statement. That is clearly not a reasonable allocation of time.
Second, the necessary requirements and constraints in the problems were not clearly stated. For B, the statement should have emphasized that when the height is 0, the process does not end immediately; rather, it may move to the next position. (I honestly cannot even understand why B had to be designed as shown in the figure; what difference do the two sides facing each other make to the actual problem?) For E, it should have specified what to output if no floor can be built at all. In previous CF contests, such details were emphasized very concretely and clearly, but this contest felt as if a rough draft had been published.
Third, for F, the problem requires almost no thinking beyond the algorithm itself. As long as you know the relevant algorithm, it takes almost no additional thought at all. Placing such a problem in the final position is, in my view, extremely inappropriate.
Agree.
A and B: Just reading comprehension, even leetcode problem is better than this.
C: A brain teaser tree problem, with even no tree structure needed.
D: Data structure with tons of corner cases to handle. And wrong parameter range ruin this.
E: Best problem in this contest, but yes, need to specify if no floor can be built at all. I make a WA 2 because of this, example are not shown.
F: Template problem.
Only D and E are acceptable (If have error have been made in the problem). I also notice that very few testers invited. That's maybe the reason why quality of problems are too low.
come onnn set some contests please :)
who else was feeling it and decided to use binary search on problem A for no reason :P
wdym binary search for what?
My submissions in Codeforces Round 1117 (Div. 2) have been marked Skipped after a similarity warning for my submission 387431930 to Problem 2257D.
The warning says my solution significantly coincides with submissions from ypizarroza (387437351), RishavRaj895 (387453906), Honoured_bun (387456605), and sh3r1ockd (387457480).
I want to clarify that I solved the problem independently. I don't know or have any communication with any of these users, and I did not see their solutions during the contest. I only checked their submissions after receiving the warning.
There are some similarities in the core logic, but the implementations, variable names, and coding styles are different. I genuinely believe this is an independent solution.
Could the admins please manually review this case? My contest submissions have been skipped because of this, and I would really appreciate a review.
Thank you.
Hello. Regarding submission 387451968 for problem 2257E, I did not copy from, communicate with, or have access to the submissions of any of the listed participants. I understand that Codeforces detected significant similarity. I do not currently have evidence of a specific pre-contest public source that would satisfy the common-source exception, so I am not claiming one. I would appreciate an individual review of my case if possible. Please let me know if there is any additional information I can provide.
Hello Admin and Contest Coordinators,
I received an automated plagiarism system notice regarding problem 2257F1 for my submission 387464478. I would like to request a manual review as my solution was written completely independently.
The similarity flagged by the automated tool is solely due to the standard textbook Segment Tree template skeleton (1-based indexing using build/update/query functions), which is widely used across competitive programming platforms like VNOI, CP-Algorithms, and GeeksforGeeks.
However, the core problem-solving logic and implementations are completely different:
Leaf Matrix Construction (make_leaf vs crealeaf): My code calculates explicit cell indices (entry_cell and exit_cell) and distance bounds, whereas the other submission computes remaining lengths (rlen) with negative checks.
Matrix Merge Operation (merge vs com): My code uses a 3-loop setup with constrained index bounds (in_B <= x — 1 — out_A), while the other solution uses a 4-nested-loop iteration over all combinations.
Query Handling: The query functions differ in range-checking logic and identity matrix construction.
Since the Segment Tree framework is standard boilerplate, it is natural for the AST structure of the tree operations to overlap, but our actual algorithmic logic for problem 2257F1 is distinct.
I kindly ask the contest coordinators to take a look and manually re-evaluate my case. Thank you for your time!
Dear Codeforces administrators,
I recently received a notice stating that my submissions in contest 2257 — Codeforces Round 1117 (Div. 2) were skipped because of a rules violation. However, I am not aware of having violated any rules during the contest.
I would like to kindly request a manual review of my submissions by an administrator or a human reviewer. I believe there may have been a mistake in the automated detection, as I did not share my code with anyone, use any unauthorized tools, or intentionally break any contest rules.
Could you please provide more specific details about what the violation was? I am fully willing to cooperate and provide any information needed to clarify the situation.
Hello,
I received a plagiarism warning for my submission 387441207 for problem 2257C, which was matched with submission 387426626 by Matoteteto.
I would like to request a manual review. I wrote this solution independently during the contest and I do not know or communicate with the other participant. I did not share my code with anyone during the contest.
My submission: https://codeforces.me/contest/2257/submission/387441207
Matched submission: https://codeforces.me/contest/2257/submission/387426626
In this solution I should basically print the beaver dam numbers as I can directly detect whether the beaver reached a dam by placing a camera on a path between it and its parent I need to print n-1 dams as if the beaver is not present in these n-1 dams we can directly say that it is present in the last dam, we also cannot print 1 as 1 is the root node and doesnot have any parent so therefore I sorted the array and then printed the dam array from second element. I believe the similarity occurred because we must basically sort the array and print the array from the second element it is not very complicated and many people can write the same solution.
My coding style/template can also be seen in my previous submissions: 387448202 387433229
I would be grateful if the submissions could be manually reviewed.
Thank you.
-10/10 Never write a contest again, but if you do then I’ll register
I don't know about you, but the username "IBACKFORREVENGE" seems a little suspicious
Also, their verdicts and problem order are sus too. I don't know but it'd be nice for his submissions to be rechecked.
seems like an experienced programmer who made a new account what's sus about it?
Rollbacks when?
Thanks everyone for participating in Codeforces Round 1117 (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)
Very good problems in the contest.