| Gusty Garden Galaxy — Mahito Yokota, Super Mario Galaxy |
Hello, Codeforces!
IceSerpent and I are pleased to invite you to Codeforces Round 1085 (Div. 1 + Div. 2) on Mar/08/2026 17:35 (Moscow time)! While some of us will be turning our clocks an hour forward for daylight savings, our theme will turn it way back to the 2010s.
You will be given $$$8$$$ problems to solve in $$$3$$$ hours. Note that some of these problems are further divided into subtasks. Some of the problems may be interactive, so please read the guide for interactive problems if you are not familiar with them. The scoring distribution is as follows:
$$$\ \ \ \,$$$
$$$\ $$$
$$$\ \,$$$
$$$\,$$$
$$$\quad\ \ \ \ \,$$$
$$$\quad\ \ \ \ \ \,$$$
$$$\ \ $$$
$$$\qquad\ \ \ \ \ \ \ \,$$$
$$$\qquad\quad\ \ \ \ \ \ \ \ $$$
The problems of this round were authored by IceSerpent and myself, awang11. In addition, we would like to thank:
244mhq for his excellent coordination of the round and translating the problems to Russian;
Um_nik for pre-reviewing the round;
flummoxedfeline for providing beautiful illustrations;
our army of testers, for their invaluable feedback and eagerness to testsolve: Um_nik, shcal, awesomeguy856, Extile, Noobish_Monk, __baozii__, Amazed, SomethingNew, awoo, -firefly-, ink31930, nik_exists, chromate00, cduckling, madlogic, Hori, misteg168, Dominater069, errorgorn, defnotmee;
and of course MikeMirzayanov and KAN for the Codeforces and Polygon platforms.
UPD 1: The scoring distribution has been released!
UPD 2: Editorial is released at https://mirror.codeforces.com/blog/entry/151886. Hope you enjoyed the round!
UPD 3: The results!
Div. 1 + 2
First clears
A. LeonVir, 00:01
B. ksun48, 00:09
C. Golovanov399, 00:11
D. PelicanPilot, 00:16
E1. liaoyanxu, 00:14
E2. Ayush79, 00:33
F. littleju, 00:34
G. ainta, 01:25
H1 + H2 + H3. ecnerwala, 02:31









Auto comment: topic has been updated by awang11 (previous revision, new revision, compare).
As a tester, I loved the problems and wish y'all the the best of luck when participating!
Hope to be one step closer to Specialist.
Galaxy.
Samsung Galaxy S25
what did I just see (your avatar)
By the way, I'm one of the organizers for the upcoming MIT Informatics Tournament! If you're interested, check out https://mitit.org/ and https://mirror.codeforces.com/blog/entry/151788.
Hope to increase my rating.
As a tester, this round is memorable. I encourage you to participate.
Auto comment: topic has been updated by awang11 (previous revision, new revision, compare).
Hope this 2010s contest doesn't make my rating 2010
Hope this 2010s contest does make my rating 2010
same man, same
As a tester, I tested
Good job, artist! ❤️❤️❤️❤️
Good luck!
I wish good luck for all who will participate in DIV1 + DIV2 and I wish that all participants will show great results and Thanks for awang11 for this DIV
whats hogrider doing lol.
good luck for everyone
750 — Mario (Super Mario Bros)
1250 — Toppat clan(?) (Henry Stickman)
1500 — Swampy (Where's My Water)
2250 — Pokeball (Pokemon)
(1750 + 1000) — Hog Rider (Clash Royale)
3250 — Fire Nation (Avatar The Last Airbender)
3750 — Strike Class Symbol (How To Train Your Dragon)
(3250 + 1000 + 1500) — Bowser (Super Mario Bros)
Imagine bro got his/her prediction right.
bro will have the CIA running against him
Hog rider might be Clash of Clans (It was added there in 2013 and to CR only in 2016)
hmm yeah you are right, the silhouette might be from clash of clans, not clash royale. i play CR, not COC, so that was the first thing that came to mind :P
Toppat clan reference makes me feel old
Looking forward to being goomba stomped yet again
With brainrot slop taking over the internet nowadays, it will be wonderful to visit the brainrot-free past.
While neither time was necessarily better for its own reasons, I believe the time before 2020 was better for people who knew how to enjoy life and not feed off the shit humans create
Only legends can hear the voice line
Good times
HOG RIDER!!
man thats like 20 questions that crazyyyy
As an interactive enjoyer I hope this contest will be very orz
"our theme will turn it way back to the 2010s" , i feel so old.
is that A Hat in Time?
hope to become a candidate master in a few months
Hope to become candidate master in a few weeks :)
Hope to become candidate master today
It seems that you won't become candidate master today :p
Excited for my first Codeforces round with a 2010s theme! Good luck everyone!
why not 1st of April?
i hope many indians don't participate today (due to world cup final) and i get better ratings for once.
oh wait, I'm the one of those who're watching !!!
hope I reach expert again.... -_-
what is this bro? only like 2000 people solved b and it was still less than c somehow. smh.
World cup final and no obvious cheaters among top ranks, WHAT A DAY !!
Didn't any of the testers fail B? It seems like the round wasn't tested at all.
How did you do C bro, can you please help me with that question?
Here is what I tried: I brute forced the best position for first drain and calculated rem array where rem[i] represents remaining water at that index, then my final answer was the sum of water drained by the first drain + max (sum of consecutive non-zero rem[i]). It fails on 3rd pretest.
My dumb O(m*log(m)*l) simulation solution. Probably smth like that is expected solution. my sub
I have done something close to this. But couldn't be done in time...
I was really dumb enough to not think of reducing the sample space for an increase when the remaining flashlight actions are reducing.
Why couldn't you just use deque instead of vector if you are trying to get O(m*l)?
What the fuck is this problem B? And why is C so much easier???
m*l<=2e5, you can just brute force over it at O(ml*log(m))
How is C easy? I've thought it for all of the contest. And still can not figure out a better solution than O((n^3)/4)
I'm not saying C is easy, but it's more straightforward. You can compute in O(n^2) how much water you drain from column j by putting a drain in column i. With this information you can bruteforce all pairs in O(n^2) with prefix sums (you split the drainage in the maximum column between the two drains).
Wow, I didn't think of splitting from the maximum in between, I was trying to find a way to reduce O(n) in traversing elements between the drain and choosing left or right from them,
You don't even need the prefix sums: when you pick column c1 for the first drain, you can try c2 from (c1+1) to n in order, keeping track of the maximum value seen in between.
Python code: 365916824
was F's solution finding the minimum ranks you need to remove so that all cards of same color appear in right order in the hand?
B and C should've been swapped
Congrats Team India on winning the world cup , congrats team !!
B felt so tough... but C and D were such a nice problem!
B wasn't bad but it's definitely not 2B difficulty
Me forced to write O(n^2) solution knowing that there exist O(n*log(n)) solution or better: This is not elegant, but because of limited contest duration, I will write this non elegant solution x_x"
Auto comment: topic has been updated by awang11 (previous revision, new revision, compare).
wtf is this contest? like, ok, div1+div2 is harder than div2, but this harder ? man i must be dumb
div1+div2 contests aren't supposed to be harder, they're just div1 + div2 merged into the same contest
that's crazy XD, usually at least 5k-6k can solve b
because today's B is also significantly harder as well
Can somebody tell how to do C?
Best answer would be either taking only a single point (this is quite simple) OR take two points. For 2 points case we can just maintain a prefix + suffix sum for each index. Suppose we took $$$(i,j)$$$ such that i < j, then $$$j$$$ can never cover any extra water other than what $$$i$$$ has already covered to its left... similarly it goes for the right part as well. The only thing now left is to check the amount of water collected in the middle of $$$i$$$ and $$$j$$$... upon observation one can see the water collected will fall from a mountain (increasing then decreasing) shaped structure, and the peak would be any index in b/w $$$i$$$ and $$$j$$$ denoting the max. height in between.
So, final answer = $$$PRE[i][1,i] + SUF[i][i+1,ind] + PRE[j][ind+1,j] + SUF[j][j+1,n]$$$
Thanks, I also saw tutorial, and now I feel kinda stupid for missing that simple max between i and j condition.
Was B like ternary search on the number of animatronics to use?
Like my reasoning (playing for the animatronics): at each time it makes sense to improve the least improved animal within some set. Each time beam kills the most advanced animal.
you are almost correct, the thing is you increase the min(r + 1, m)th monster's danger(in reverse sorted array) where r is your number of flashlights remaining. so like you keep decrementing the number of monsters you are dealing with
oh, I see, very nicely put, thanks!
very depressing contest, way too hard after a
i agree
I think I'm doing div1 instead of 1+2
how to solve B?
I might be completely out of touch, but that did not look similar to typical div1+div2. I had a feeling of solving a regular div1 tbh (which might be my personal skill issue). A seemed not that simple as A usually are, B is just what? (i couldn't figure out what can be a good approach even, there is a counterexample for everything). D-E seemed interesting and not that more difficult than B.
What I did not figure out is why C is quadratic limits? After you've precalced answer for each single cross, putting 2 crosses is as easy as taking lca-ish point between two crosses, which is basically a point that is in the overlap, and can be processed bottom to top with merging segments and getting max, so $$$O(n \alpha)$$$ solution is definitely possible, and maybe even linear.
we are 2 with the same skill issue then... <3
What I did not figure out is why C is quadratic limits?because that would be way too hard for CThis would be a strong case for C1/C2 then, or D1/D2. Like, after B i don't feel second part of C is too complex.
For each single cross, won't it take O(n) time to precalculate?
way too hard lol
This lunatic jumped directly into H1 after passed A, B, C only because H1 is an interactive problem and didn't know why got MLE
and almost the same solution as tutorial QAQ
hey, looks like someone was streaming the contest live on youtube. https://www.youtube.com/watch?v=s4hMy4E_MaQ while solving
don't link to the person streaming it, cf can't really do anything about it, and are already aware of it.
seven hells man
Problem B made me quit the contest, shifted to problem C and got flabbergasted, and then I started watching the cricket world cup cuz why not?
Can anyone prove that using greedy algorithm twice in problem C is correct? My code is accepted but I cannot prove its correctness.
Let's say if you choose the ith, jth columns contain drains and i<j.
Then all you have to do is find a peak k such that i<=k<=j.
Then it breaks down to get drained(1,i) + drained(i+1,k) + drained(k+1,j) + drained(j+1,n)
The terms at above expression can be calculated in O(n*n) just by iterating forward and backward for each index.
For me, the toughest part is finding that peak within my setting. lol
thank you~
I will say A < C < E < F < B < D . Seem that the parity of problem id strongly affect its hardness.
I think that A<C<E<B<D<F.
The constraints for E1 are fake. So annoying, I had to resubmit because of it. Assertion $$$a_i \le 1e6$$$ does not failed.
Can someone reject this my submission?
It's easy to hack https://mirror.codeforces.com/contest/2207/hacks/1169658
my first div 1 + 2....don't think I'll be participating in another one!
Thank you for brilliant problems! Please marry me
AhmetKaan was disabled after this contest. Who decides these? What should be done to undo this? I can assure you that he did not cheat
The admin decided that, and how do you prove someone not cheating? Do you have the recording of him doing the entire contest?
Who is the admin? Is it Mike or someone from this contest's team?
Definitely Mike and also some people that mentioned in this blog post too!
But you don't answer my question yet, how do you gonna prove someone not cheating?
Its impossible to prove if someones cheating or not if there is no screencast. I think they disabled him because his last few performances were really good. I admit it might look suspicious, but you can not oversee that he has been a fair competitor for 7 years and virtually everyone in Turkey will vouch that he didnt cheat.
I am sorry to hear that, can you explain this timestamp and why he switched D -> E1 -> D -> E2 -> D rapidly?
Because it's been his strat since at least this september(We were in the same room during contests in late september and after contests he would always talk about how his strat makes things better)
The strat is whenever he sees a roadblock in a problem, he switches to next problem and tries to solve it, and in the meantime hopefully the break makes him unstuck on the current problem.
I cant just prove he isnt cheating but maybe disproving the reasons for the ban can be done.
He is the message from our beloved admin: https://mirror.codeforces.com/blog/entry/151895#comment-1352440
best div round in my life (i mean best tasks)
Finally ecnerwala became #1 on Codeforces
Despite of regular practicing not able to solve single problem in the contest. I am not understanding why I am not able to think the solution in the contest any one can guide me please
Everyone goes through this. Just keep participating in contests regularly and try to solve the problems afterward. Do some brainstorming first, then look at the hints and compare your logic with them—just make sure you don't simply memorize the solution.
i think this is the only way just got little demotivated
Auto comment: topic has been updated by awang11 (previous revision, new revision, compare).
Today's div(1+2) was much harder than previous any I attended :(
Why there were only 6000 participated this contest? Any particular reason?
The problems were great, but the placement could be better.
https://flip-flop-flip-flap.skysound7.com/
music is the best
constraintforces
I demand a serious action on these people who are doing this . I came across a youtube stream which was sharing codes during live contest as for proof here is the link to stream Cheaters
Hi, can we please do something about tickcross.y?
This guy has cheated to gain literally around 500 rating over the past two div 1s (you even mention him as a top performer in your post here).