Hello Codeforces !!!
I am very excited to invite you to participate in Codeforces Round 1081, which will be held on Feb/21/2026 17:35 (Moscow time)! You will be given $$$\mathbf{2}$$$ hours to solve $$$\mathbf{6}$$$ problems. This round will be rated for all participants with rating below 2100.
This is my first time hosting an official Codeforces round, and all the problems are authored by me. I hope you will enjoy the round.
This round would not be possible without the help of the following people:
- Proof_by_QED for excellent coordination and improving the problems.
- flamestorm and ScarletS for initial coordination of the round.
- Alexdat2000 for russian statement translation.
- All the testers for testing and sharing valuable feedback: __baozii__, YuukiS, N_z__, sammyuri, Ari, Error_Yuan, maomao90, _istil, Markadiusz, nifeshe, prvocislo, cry, temporary1, mwen, ItsNotMeItsYou, Friedrich, fishy15, ApraCadabra, amsraman, AlperenT, efishel, wakanda-forever, chromate00, nyaruhodo, Prashant_10434.
- MikeMirzayanov and KAN for the great Codeforces and Polygon platforms.
- You for participating in this round.
Score distribution: $$$500−1000−1250−1750−2250−3000$$$.
Good Luck & Have Fun !
UPD 1: Editorial
UPD 2: Congratulations to the winners:
Div 1:
Div 2:









As a tester I wish you a lot of positive delta!
as a tester, thanks
as a another tester, thanks
as a newbie, thanks
as a non coder, thanks
Hope I can reach Pupil after this contest.I just saw your profile. I truly appreciate your tenacity. I guess the coding gods will surely have mercy on you someday, and you will rise to Master. To do these many problems is very good.
I am a newbie, but I’m excited to solve and explore problems.
same here
I have my University Exams from Monday still I choose to give This Contest : ) All the best Everyone!
Come on! Everything goes well for you!
I have my University Exams from Monday still I choose to give This Contest :
I hope i will reach CM after this round!
cheater's wont be sent into cry's basement? is it full already?
I suppose we can send them to your basement instead.
Sadly, cry only has enough space to fill the div3 + div4 + USACO + CerealCodes (once that happens) cheaters, and CodeForces isn't paying him enough to host all the other cheaters.
Hope to reach my highest rating!
Congratulations on your first official round! Really Excited !
Congratulations on your first Div2 official contest,Truly inspiring,and excited !
Hello evry body!
Really Exited
Huge congratulations on hosting your first official Codeforces round ! Truly inspiring !!
I came for P=NP, stayed for emotional trauma.
Don't forget to rename your nameless round:
Yeah downvote me all you want, that won't change the fact that I will rank up to expert after this easy round ;)
Why you are so jealous, I know you (who are downvoting) have lower rating than me but this is reality, you can practice all you want and better luck next time ;)
Look at what you've done! My contribution reach negative 2 digits!!!
Now the system only allow me to post four comment for each hour and one post for each 10 minutes because of your idiot single cell brain downvoting me!!!
EDIT: This means that I need to wait ~19 minutes before I could post next comment!
How is ur easy round + expert brother?
It is ruined because of the damn downvoter. I didn't expect the mental pressure affected my performance this much! But nice round anyway, I should be able to solve up to D (given time constraint) if I'm not pressured like this. Better luck next time to me ;)
U didn't expect the mental pressure, but u did write the "that won't change the fact that I will rank up to expert after this easy round ;)". Alright..
Yeah, I did, that was mistake, but I will definitely reach expert rank sooner than you! mark my word ;)
Ahahahaha, I'm not even arguing with u :D Have fun and gl
Nonono, don't give up so soon x) You can prove me wrong again if you able to reach expert before me :D Please make it happen and message me again! Good luck ;)
Actually, I have intent to help, but no one appreciate it, seems that it's easier to become evil than good, alright, no more helping people!
If you don’t want to help because they did not show gratitude, then you never truly wanted to help them, you only wanted their gratitude.
I can't reply you instantly because of stupid post limitation because of negative contribution :(
I didn't want their gratitude, they downvote me, than it means I receive hate for helping people! It's different than gratitude (upvote). Anyway I'm tired to be nice, I'm evil now, I downvoted your comment btw:
sorry but at least you may know a bit about my feeling :')
Good Luck for the round.
So excited for this one
Feeling proud that our alumni are organizing an international-level contest!!
E
It feels illegal to have all of the best testers in your first contest...
Congratulations on your first official codeforces contest !! Really excited for the contest !!!
Planning to start back CP after 4 years gap... Hope this round goes goooood.
good luck everyone :)
Wohooo! Kudos on your first CF contest :D
you lox chyo pishesh eblanka
I cant believe he is graduate of same College as mine **__**
Was the contest shifted? Could have sworn I saw 20th and not 21st
I wonder how to become a tester, that sounds cool.
Hiii its one of my first Div 2 contest and also Kotlin Heroes. I saw that this time Div 2 shares the same time with Kotlin practice, i wanna know if i can join both of the contest or just one only. I would be much appreciate if anyone can answer this for me and also have fun coding :D
You can join both but this 2 hours rated contest is much more important than unrated "kotlin practice" contest that runs for 9 days!
Kotlin Practice is a mashup contest consisting of already known problems, it also runs for 9 days and is unrated. Additionally, I'm pretty sure that while this contest is going on, you won't be able to submit to the Kotlin practice round.
Okiee tysmmmm, have fun coding:D
Congratulations on your First Official CF Contest!!
Really excited for the Contest!!!
Congrats on hosting the round!!
if all goes well i'll be giving div2 after long time. i'll try to solve at least 3 problems today inshallah. Ramadan Kareem
all is not going well, CF got hacked :(
General announcement
This is an Emergency Alert Broadcast by Codeforces.
Some hackers have broke into our beloved website, we are currently investigating this scene.
Some users may not receive this announcement, so write a blog/comment/message to alert those users.
Meanwhile, do not submit any code until further notice.
Stay calm, do not panic.
?
Can 79XD get +100 points for successfully hacked (wa) to CF? Let's figure it out.
Only if he tells (Mike) how he did it.
Hope to get some positive delta after a long time.
If whole cf was hacked were the problems also leaked?
the announcements were caused by someone sending them through a mashup contest, which somehow were sent to all users. all the "hacker" did and could do was send announcements. no problems were leaked, contest should be fine
Yes, don't worry, no issues with the contest
Good, but you don't rename your contest number (1081) fast enough, I get many downvotes because of that :(
YEEEEES
Will this be put off?
Is this round happening like normal or hackers are still here on the website
Bro RAMADAN KAREEM
Hope I can solve problem D and get a high score ! Also best wish for everyone :)
I'm jealous, you can post two comments:
in the span of 2 minutes, but I can't do that because codeforces system is unfair :(
OMG,I don't know about this . This is actually my first and second time to post comments. LOL
Read my blog post about this: https://mirror.codeforces.com/blog/entry/151430
I want to try it again :)
Will this contest happen at its usual time or not? I will take the leave from job if happen else will go for job.
i forgot to registration but its showing Before extra registration how can i register
absolutely no fun
На удивление веселые задачки для первого раунда автора. В том плане что очень необычненько. Хоть и сложно :000
stop graphz pls
A-E were all boring and oppressively uninspired
also E-F gap is insane
The only hard thing in F is implementation
How to solve D?
Think of dp.
dp[v][0] -> Maximum cost of the subtree of node v without doing the operation. dp[v][1] -> Maximum cost of the subtree of node v with doing the operation.
and try to calculate dp[v] from it's children dps.
Using Tree DP. As, for every vertex $$$u$$$ its maximum answer would be either by replacing one of its complete child subtree at maximum depth OR don't move any subtree at all OR use any already altered child subtree of $$$u$$$.
CODE : 363901543
greedy, the best move for node i is move one child of i to leaf of another child of i, or best move of childs of i
Problem E exists on Codeforces with the exact same solution and it is recent, like why ?
Can you link the problem?
https://mirror.codeforces.com/problemset/problem/2113/F
We are aware of this problem, but it seems a bit different to me
https://mirror.codeforces.com/contest/2110/problem/E
The only similarity I see is that both uses Euler circuit. How you model it as a graph is different.
However I agree E is somewhat standard and that similar problem exists.
Excited to know the solution of problem E! Anyone?
Eulerian circuits
Annoying as hell having to keep track of the swaps.
Thanks! I was thinking it will be something with graph, i knew about Euler circuits but couldn't figure it out in short time -.-.
Can E be solved using Greedy Approach? I tried but my code gets Runtime Error :(
Wow is python great for speedforces. I probably would have been fighting one-off errors on B/C the entire contest if i used C++. Got to actually work on problems at my skill level
Problem statement for $$$D$$$ was the worst. Took me so long to even understand the operation.
Can someone take a look at my solution for $$$D$$$? Wrong Answer on test 3. I don't know what's wrong.
i had a similar error with what i was doing in
ans[u] = max(ans[u], ans[v] + sum_a[v])You should use the sum of val[v]+sum_a[v] for all children v, thats because you should still be counting the "default" values for other children
Look what I did
wtf a StackOverflowException in C# results in an Idleness limit exceeded verdict
For problem E one need to bulid a graph with multiedges
a[i] -- b[i](removinga[i] == b[i]) then split it into cycles (i.e. its possible iff all degrees are even). But ahhh no timeHow the heck is my solution failing? 363902357
I feel like it's a pretty simple solution + implementation. Simply check how many times you go through all bullets (i.e. theta) and go through elements, swapping min prefix with max suffix.
It can fail when
max_suf[i] = a[i]. You are then replacing the minimum witha[i], even thougha[i]also stays where it is, thus taking it twice.yeah as above comment mentions you have to add a if condition to swap only if max after current element is greater than min till current element else you dont.
Also here is a failing test case for your solution 4 5 10 1 3 1 1
Expected answer is 3 your solution gives 2.
Yeah that makes sense. I now feel like an idiot xD.
Is my Submission for D recorded or No?? it shows in Queue even though i submitted like 4 seconds before
OH NO I didn't correctly implement problem D, is there a more lightweight implementation approach here?
this is my solution: First, handle the corner case where n <= 2.
For the remaining cases, find a root rt such that deg(rt) > 1. Define jmp_i as the first ancestor of node i (among its parent chain) whose degree is greater than 2, or rt itself.
Then maintain the following arrays:
f[i][0/1/2]: The maximum depth in the subtree when rooted at i / The maximum depth in the subtree of another child of i / The maximum depth in the subtree of yet another different child of i.
g[i][0/1/2]: The corresponding child node indices that achieve the depths stored in f[i][0/1/2].
All of these can be computed in $$$O(n)$$$ time using DP.
After that, for each node i, first jump to jmp_i, Using the preprocessed f and g arrays, brute-force classify into four cases and compute the optimal answer.
Yes, for each node calculate:1.max cost,2.sum of values of nodes in its subtree, 3.depth of deepest node in subtree of that node. Now look, for each node, either we dont do the node shifting op or we shift a child node to deepest node of siblings or we shift a node in subtree of child node within it. All three can be calculated using the 3 things we calculated for each node. Take max of all these cases to find the max score for a node
363903833 I tried backtracking for E (as a last-minute approach) but it got WA2. Can anyone tell me why?
WTF ?
did everyone face long queue issue or only the ones who submitted in m1.codeforces.com?
why can't I make hacks ?
I enjoyed D problem a lot. Tree Dp was good.
ABCDE are perhaps even too easy. Not that I actually got all them solved during contest although :)
flipforces
I couldn't figure out E was
a graph problem disguised as an array problem.
Great problem-setting on this one :)
Am I the only one here got stuck with C and then didn't have enough time to solve D=(((( I had the right idea but not enough time to implement it. E did saved my rating, but I still feel not good since I could have solved both D and E and got positive delta. Hope to come back again in CF Round 1082 :v