I am extremely delighted to invite you to participate in my first solo round, Codeforces Round 1050 (Div. 4), starting on Sep/13/2025 17:35 (Moscow time). There will be $$$7$$$ problems to be solved in $$$2$$$ hours and $$$15$$$ minutes.
The format of the event will be identical to Div. 3 rounds:
- ICPC rules with a penalty of 10 minutes for an incorrect submission;
- 12-hour phase of open hacks after the end of the round (hacks do not give additional points)
- after the end of the open hacking phase, all solutions will be tested on the updated set of tests, and the ratings recalculated
- by default, only "trusted" participants are shown in the results table (but the rating will be recalculated for all with initial ratings less than 1400 or you are an unrated participant/newcomer).
We urge participants whose rating is 1400+ not to register new accounts for the purpose of narcissism but to take part unofficially. Please do not spoil the contest for the official participants.
Only trusted participants of the fourth division will be included in the official standings table. This is a forced measure for combating unsporting behavior. To qualify as a trusted participant of the fourth division, you must:
- take part in at least five rated rounds (and solve at least one problem in each of them),
- do not have a point of 1400 or higher in the rating.
Regardless of whether you are a trusted participant of the fourth division or not, if your rating is less than 1400 (or you are a newcomer/unrated), you may choose to participate rated or unrated.
PLEASE NOTE the rule restricting AI use. If you are caught using AI in an unorthodox manner, either by us manually or detected automatically, YOUR ACCOUNT WILL BE TERMINATED and your entire family will be sent to my basement (which has no toilets available). We will be actively scouring submissions and terminating rulebreakers.
I would like to thank the following individuals for making this contest possible:
Myself for coordinating the round
.Vladosiya for russian translations.
reirugan for improving the statements.
The following testuwuers: Proof_by_QED, reirugan, -firefly-, Filikec, Friedrich, mathtsai, __baozii__, Non-origination, chromate00, SpyrosAliv, Intellegent, Dominater069, Hori, RobinFromTheHood, pop, yse, Vladosiya, Lechaa, beaten_by_ai, macaquedev, catgirl, kingbass, tin.le2, ByteRaider, Trace_X1729, AksLolCoding, expertaq, kwant, santaclaus67, akane646, Hana05, .Habiba., apollo07, shuniko, Jteh, avighnakc, nifeshe, Edeeva, Eikyu, wuhudsm, and temporary1.
I know it has been a while without a division 4, so GLHF!








damn div 3 div2 div1 div 4 all happening in span of less than a week.good times
Div 1 was an illusion.
Contests are hosted so frequently this month, I feel like I’m on a treadmill of contests. At this point, Div.4 is just a training ground for speed typists, not programmers.
We should bring Nitro Typists here.
What's your wpm by the way(Just asking)
around 70 wpm
nice
XD
as a tester, omg we actually have div4 testers wow
__baozii__ orz
A tester, or a testuwuer :)
testuwuer :)
haha
urban dictionary
As a tester, this is the first contest I’ve tested, and I recommend to participate as the problems are really high-quality.
how can i be a tester or problem setter in any official contest
Yeah, same question. Can anyone help? I am new on Codeforces.
so __baozii__ is forced to test div 4 too?
yes he is trapped in my attic with no windows. It’s where all of the testers are.
I don't think I want to be a tester anymore
I didn't see your name on the tester list.
Sooooooo are you a tester? If you aren't, how did you say "anymore"?
I wanted to be a tester.
I even asked how to be one in the past.
Don't want to be a tester anymore
__baozii__ is cursed to test all rounds
I cursed
No, He is cursed by the admin
I am !admin
I think this is
TrueM_Abu_Bakr_Shahid but I think this is False
so he is admin?
Damkiller bro he is not the admin
As a tester
I agree
As a tester, I tested
it ain't tester anymore, it's testuwuer
As a tester, this is my first time that I tested all the problems.
uh nice... ig they will be easy like an avg div4
Mandatory Shit comment:-
HI CHAT
Hana05 .Habiba. so proud of you my friends :3
As a tester, I'm feeling special for being the only grey tester in this round.
As a tester, you’re fake grey.
Not a gray anymore
How many problem you solved?
-1
As a tester, Testing is very fun, especially if the problems are awesome like in this round.
Not enough action in the video, use Subway Surfers next time
As a tester, this is the most balanced div4 contest.
As a tester, you should participate in USACO ...
What if we aren't in USA? :D
You can still participate
How?
Just make an account and set ur country as something else
Ah, alright, thanks
.
As a testuwuer, I am extremely delighted to participate in cry's first solo round's testing.
delighted or forced? O-o
As a tester, my eyes get offended when I check the testers.
As a testuwuer, I am a person who tests codeforces contests.
insanely right
orz
as a div4 tester, this is a round.
Is that every contest __baozii__ is a tester ;-;
Excited to see everyone enjoy the problems—we testers had a lot of fun solving and breaking them! GLHF and big thanks to cry for an awesome first solo round!
As an unrated participant, I subbed to this YT channel
Miku mentioned
Another brainrot contest? :)
As a tester, I tested. Also, tin.le2 orz
Please testers verify the problem statements we don't want this first div4 contest in a while to be unrated !!
OH I GET IT THE TESTERS' ORDER WAS RANDOM BECAUSE THEY WERE PACKED IN cry'S BASEMENT WITH NO WAY OUT. IT'S ALSO DARK THERE SO YOU CAN'T SEE THE COLORS.
omg it's all coming together
I just want to see my family again D:
hey look im a snail
orz
As a participant, this is my first out of competition Div. 4 round.
And I wanna ask, is there a "Welcome to Nod-Krai, Codeforces!" round?
Fact: Onle 4 of the testers are of Division 4.....
aHn my beloved
First div 4 in a while!
what the sigma
Another contest of cry to make me cry xD T-T
I am so excited to face my first ever Div.4 contest. While facing only 4 Div.3 contests, I heard about it. I really wonder why it is not taking place anymore. Finally I am so happy to see this coming. For new coders like me, it's really a very welcoming thing. I would like to invite my offline friends to this too. Highly appreciated.
We need a cry plushie!!!
Also, good luck to everyone, and orz to cry for creating a great(-probably :D-) contest.
So sad I can't participate live but I'll make sure to look at it right after.
Maybe even 100% who knows :)
hope i will become pupil in this round.
give some break dude .
cry remember to add the statements for the m1, m2, and m3 sites. A few days ago, I couldn’t find the problem statements there!! thanks in advance
hope to reach pupil!
miguuu
Wait I only participated in 3 rated contests so wont I be included in the official rankings?
According to my experience, cry's div4 can be seen as div3.
:cry: 😓
hope my rating increase...maybe 1000 this time
Time for changing the rank.✌✌
I want my rank less than 1000
peak announcement vid
codeforces just muted me for 48 hours because of troll comments
but, NOBODY CAN STOP ME UNTIL MY ACCOUNT GET BAN.
This is cool.
I think this is the first Announcement that doesn't contain this line:
MikeMirzayanov and KAN for the great platforms.
As a 1398 , I hope get to 1400+ this div 4
Also!
All the best you can do it!!
Love you bro! :3 veery goo explanation :3 >.<
If I don’t get a green tick in under 2 minutes on A, I’m retiring.
retire
lovely fufu saint fufu
As a contestant.. give me pupil to be rated in this round :(
probably the best kind of invite you can get these days
after 5 months of waiting:
This round will be destroyed by my superior skills
Good luck
Thank you !! same to you
Wish I could join but sadly I can't :(
Good luck
I hope i can solve 4 problems at least!!!(It must be)
Its div 4 and my inner me!
I want to join the contest when I see MIKU, but I can't get rating ):
Please put F and G in the correct order next time
skill issue?
probably but F was def harder than G
What even is being asked in G ?? . Tried to make sense of the first test case for 30 mins and just gave up.
Though F was very easy probably easier than E . IMO
Need to pour acid in my eyes
g(a) to represent the maximum value of f(a)
Read this over and over again as
g(a) to represent the minimum value of f(a)
Hello cry,
I recently participated in contest Codeforces Round 1050 (Div. 4), and my account HARI_PRASAD_2003 has been disabled. I would like to clarify my situation in hopes of avoiding any misunderstanding.
I have been an active Codeforces participant, with experience solving problems in Div-2 contests recently and consistently practicing to improve my skills. During this contest, I used my personal pre-built code snippets for input/output handling and basic templates. These are tools I developed myself to write code efficiently and do not give any unfair advantage in solving the problems.
The contest problems were within my skill level, and I solved them using my own knowledge and coding ability. I want to emphasize that I did not copy solutions from anyone else. I am concerned that my use of personal templates may have caused my activity to appear suspicious.
I sincerely apologize if my approach caused any misunderstanding. I fully respect Codeforces’ contest rules and the integrity of the platform, and I would greatly appreciate guidance on resolving this issue.
Thank you for your time and consideration.
— HARI_PRASAD_2003
Bro didn't mention he suspiciously named all the variables after Naruto characters lmfao. https://mirror.codeforces.com/contest/2148/submission/338413153 https://mirror.codeforces.com/contest/2148/submission/338423412
Thanks to the Coordinator, for the chance to get a quick back to Green..!
Div4 > Div3
problems were very very beautiful !
especially E, F
How did you solve F? I did an O(n*k), getting TLE
I did brute force sorting and picking the first one
i have solved 5 problems in my first time, clapsQwQ
this contest was suprisely easy, I solved 3 problems usually I solve 1 or 2
I am registered unrated in this contest, but the asterick is not showing!!
The contest is still running. I just submitted a solution :|
F >>>>>>>> G
Nice round. My first time solving all problems in reverse order :)
F please someone, I might have had a breakdown had I made another wrong submission
Notice that there can be at most sqrt(k) different lengths of the strings.
Let's say we already chose a minimal prefix of the resulting string. Let's pick a continuation via bruteforce which will run in O(n + k) (just go through all strings and choose the smallest possible continuation).
There will be at most sqrt(k) iterations as when each iteration ends we get a prefix which is of greater length than before and has the same length as one of the strings in the input. Therefore there won't be any more than sqrt(k) iterations
My solution did something similar but it ended up not giving TLE can you tell me why: https://mirror.codeforces.com/contest/2148/submission/338467466
I think probably due to the use of multiset. It is pretty slow in general. And in the worst case I think it add a logarithm to the complexity, so your solution has a complexity of O(n * log(n) * sqrt(k)). Which is slow for the constraints of the problem. Especially given the fact that multi-set has a bad constant multiplier.
But it didn't give TLE
Ah, sorry, I'm bad at reading
here is my implementation of the idea: https://mirror.codeforces.com/contest/2148/submission/338531982
how did so many people solve E, i found it somewhat hard for div 4
CHATGPT!!
For a given (l, r), the subarray (a[l, r]) is awesome if and only if the following condition holds:
where $$$\mathrm{freq}_{[l,r]}(x)$$$ denotes the number of occurrences of $$$x$$$ in the subarray $$$a[l,r]$$$, and $$$\mathrm{freq}_{[1,n]}(x)$$$ denotes the number of occurrences of $$$x$$$ in the entire array $$$a[1,n]$$$.
For each $$$r$$$, we maintain the leftmost $$$l$$$ such that $$$a[l,r]$$$ is awesome. Notice that as $$$r$$$ increases, $$$l$$$ is monotonic non-decreasing. Therefore, we can maintain $$$l$$$ using the two-pointer technique.
Hmm I maintained rightmost R instead of L,
maintaining leftmost L might have cleaner code
Hey guys any idea why my solution for F passed, even though it runs in O(k^2logn):
https://mirror.codeforces.com/contest/2148/submission/338467466
why is my code failing for problem F?
https://mirror.codeforces.com/contest/2148/submission/338499475
Start from Column 0 , find the smallest element in that column and add the rest of the row to the answer , then increment the column to ans.size() .
You are not checking the minimum element for a particular column .
but isn't this what I'm doing in both comparator functions? first I'm looking for the best starting row from the comp function, then after that row I'm sorting the rest based on the ending of that best row from the first sort, and I'm filling the ans vector with what's remaining from the current best row
because they didnt put the most common corner case into the preliminary tests
The problem G I did an O(n*sqrtn*logn) getting TLE.How to solve it?
precompute the factors
Beautiful contest, beautiful problems !!
Fun problems! Great round :)
The competition requires a good header image, and Miku gave me motivation.
G = "John's Last Wish" ... too dramatic for USACO
Can anyone tell me why my code is failing on F. https://mirror.codeforces.com/contest/2148/submission/338500676
Lexicographic order may change when first few characters are omitted. Try this.
ok got it thanks for the help
Thanks for the round! I thought F was particularly fun as Div. 4 problems go. I wasn't as big a fan of B; it felt like the bulk of the difficulty came from (a) reading and understanding the problem and (b) making sure to read in the arrays even though they don't affect the answer, rather than outputting N and M and returning after each test case.
Literally i spent 15 minutes doubting my solution because of not using the elements lol
B is a fun thought provoking problem for div 4.
Can anyone hack my solution, don't know why it passed even though it is O(k^2logn) for F:
https://mirror.codeforces.com/contest/2148/submission/338467466
It is actually $$$O\left(\left(\sum k_i\right)^{3/2}\log n \right)$$$. The number of iterations of your while loop is $$$O(\sqrt{\sum k_i})$$$, because there are at most $$$O(\sqrt{\sum k_i})$$$ different length, and each iteration is $$$O\left(\left(\sum k_i\right)\log n \right)$$$.
can someone please explain G's given examples?
damn this contest was too good to be div 4
Thanks for the interesting contest! Especially for the explanatory image in problem C. It became much clearer))
Tnx for this div.. we beginner's want more div 4 .
why don't i get a rating TwT
Video Step by Step Solution of A-E in C++ — https://youtu.be/ty5y1geayPI
when will we get the ratings?
Great contest. Wish codeforces would do something about the false alarm crawling issue. It really makes hacking rounds a lot less fun.
338476097
Host div 3 and div 4 contests on alternate weeks One week div 3, the next week div 4
During the contest, the server experienced frequent downtime. I had to attempt submitting problem D 6–7 times because I kept encountering the "Verifying you are human" page repeatedly. It took almost 10 minutes just to submit a single problem. I am certain there was no internet issue on my end — everything else was working smoothly except Codeforces. Please look into this issue and try to fix it.
how to report a cheater? :v
If you discover a cheater just report it to the CF Cheater Database:
https://cf-cheater-database.vercel.app/
This post litterally in 2050, but instead of minecraft parkour they should change to squeeze slime
When will the ratings come?
Is this contest is unrated or Rated ?
Amazing contest! The problem set felt fresh and well-prepared, and the balance across the problems was nice. Big thanks to you and the testers for the hard work. Please keep making more contests like this!
Why did my solution for Problem B refuse? When I submitted my solution (not AI) it was accepted.
I couldn't participate :(
Codeforces page wasn't loading.
thank for the amazing contest!
why it counted as unrated for me?
bro sameeeeee
I crying real hard
solved 4 questions for the first time
but got unrated
mine got rated. you?
Hi, I solved Problem F within the time, but why didn't I get the rating for Problem F? Please check my submission
codeforces round 1050(DIV 4)
i registered as usual 2 days before the contest. entered the contest solved 4 questions, was very very happy that rating will go up.
my friends rating was updated but mine not.
what did I do wrong ? where did I clicked and when did i clicked please tell me.
now if I go to profile->contest and selects unrated only, contest 1050 shows up.
i was on the moon yesterday thinking my rating we go up, Now I want to die.
is there anyway to get me back in the list ??
what do I do now ? please help.
That was an amazing contest with truly inspiring problems!
hey look im zhongli satoru
miku!
It will be very helpful for newbie like us if you take div-4 contest more frequently .This helps us to know our place and boost our confidence.
i submitted same problem twice.they accepted my last submission.
In 5 minutes you solved 8 problem and again in 3 minute you solved 4 problem.! is it normal ?
Those don't look like in-contest submissions, so it doesn't really matter. More importantly, why are you posting someone's personal information? Delete this now (and don't edit it, since previous revisions are still avaliable.
Is problem E. solvable in Python? My submission passed during the contest but was TLE on test #10 after system grading. I tried reimplementing the editorial's C++ solution in Python and it still times out.
I wonder why when I check others' submitted code after the competition, it shows "N/A"?
Hello cry and contest coordinators, I would like to appeal regarding my submission (ID: 338500507) for problem 2148G. I solved the problem completely on my own during the contest and did not share my code with anyone. I understand that the checker found similarities with other submissions, but this problem had a fairly standard approach, and I also use a personal template which might make my code look similar to others like the code I used for BIT.
I did not knowingly upload my solution to any public place or share it with anyone. If there was any unintentional leakage, I sincerely apologize and will make sure this does not happen again.
I kindly request you to review my case. Thank you for your time and understanding.
Hello cry, regarding solution 338495910 of Round 1050 (Div. 4):
I wrote the solution for 2148D myself but unfortunately, I made the mistake of sharing it outside my account, which led to its re-submission. This was poor judgment on my part, and I did not intend to cheat. I understand CodeForces rules forbid any leakage. This is my first violation, and I will ensure it never happens again. I kindly request leniency.
Dear Codeforces team,
I recently received a warning regarding suspected similarity for my submission to this problem. I want to respectfully clarify that I wrote my solution independently without sharing or copying from anyone. The approach I used is a standard one for this type of task, which may explain why another participant’s code looks similar.
I have great respect for the Codeforces rules and would never intentionally violate them. I kindly request you to review this warning once more, as it affects my account’s reputation. I assure you that I always participate honestly and with integrity.
Thank you for your time and for maintaining a fair contest environment.
— legendayush9937 Problem submission:338489115 Problem :2148D
Subject: Appeal Regarding My Submission (ID:338478831) for Problem 2148E
Hello Codeforces contest coordinators,
I would like to appeal regarding my submission (ID: 338478831) for problem 2148E. I want to clarify that I solved the problem completely on my own during the contest and did not share my code with anyone.
I understand that the plagiarism checker found similarities with other submissions. However, this problem had a fairly standard approach, and I also use a personal template (including common structures like BIT), which might have contributed to my code appearing similar to others.
I did not knowingly upload my solution to any public place or share it with anyone. If there was any unintentional similarity, it is purely coincidental, and I sincerely apologise if it caused concern. I will also make sure to be extra careful in the future.
I kindly request you to review my case. Thank you very much for your time and understanding.
Best regards
Hello, I would like to clarify regarding the coincidence issue for Problem 2148C. The other participant whose code matched with mine (handle: nishat07) and I (handle: NaqeebIR) are both CSE students at Uttara University. We have studied courses together on phitron.io and have worked as teammates for a long time, so naturally our coding style and structure became quite similar.
However, during this contest we did not share any code, and we were not connected at all. If we had shared code, our submissions and solved problems would have been identical, but in reality, we even solved different sets of problems.
So, the similarity in style is due to our background and training, not because of code sharing. I kindly request you to reconsider my case. Thank you. NaqeebIR
Hello,
I would like to sincerely clarify regarding the notice on solution coincidence. During the round, the Codeforces IDE was not working properly for me, so I had to quickly use Ideone to test my code. Unfortunately, I wasn’t aware that Ideone’s default settings make the code publicly accessible. This might have led to unintended visibility of my solution.
Also, the problem’s logic itself was fairly straightforward, so it’s very natural for different participants’ solutions to look similar even without sharing. I can assure you that I did not intend to violate any rules, nor did I share or copy code. It is purely coincidental, and any exposure through Ideone was completely unintentional.
I kindly request you to please reconsider and remove the plagiarism flag from my submission. I will make sure to never use a public IDE again during contests and will strictly follow Codeforces rules going forward.
Thank you for your understanding.
Best regards, dsarika2422
Hello, I would like to respectfully clarify regarding the warning on my submissions. Both accounts mentioned — 338461757 (alt account) and 338469312 (main account) — belong to me. I did not copy from any other user.
During the contest, I was stuck on the while loop part of the problem. I had the full idea and approach in mind, but due to nervousness, I was struggling to implement that loop correctly. I explained my idea to AI and it generated a working code snippet. Just to check, I submitted that from my alternate account first (338461757), and later from my main account (338469312).
The idea and overall implementation were my own — I only took small implementation help to be more confident. I misunderstood and thought that using AI for minor implementation help was allowed in contests. I now realize that submitting from an alternate account and using AI in this way was a mistake.
I sincerely apologize for this incident. It will never happen again. I fully respect the rules of Codeforces and will strictly follow them in future contests.
Thank you for your understanding.
In problem E
I’m having trouble figuring out how binary search could be applied here. Could someone please explain or share an outline of how this problem can be solved using binary search?
Hello, I did not violate any rules. My solution 338435377 was flagged as matching with SH..A..MS/ 338444402, but this similarity is purely coincidental. In competitive programming, many problems naturally lead to standard approaches and similar code structures, so partial matches are not unusual.
I never shared my code, nor did I copy from anyone else. I only use my private compiler/IDE and never upload solutions to public platforms, so there is no chance of leakage from my side. If my solution had actually been “unleashed,” then many participants would have copied it — not just one. The fact that my code only matched with a single user strongly indicates coincidence rather than misconduct.
This accusation is unfair and damaging to my reputation. Penalizing me without clear proof would be unjust. I therefore request a proper and fair review of my case.
Best regards, Shameer_Gondal
cry
Dear Codeforces Team,
I received a plagiarism warning for my submission 338461336 in problem 2148E.And system msg told me to explain . I would like to clarify my situation.
I did not share my code with anyone, nor did I take it from anyone. I was not aware of sites like ideone.com, and I never made my code public during the contest. This is a normal approach, many participants independently wrote solutions with nearly identical logic and even similar variable naming. I checked two pages of standing just , for example, the following submissions have the same structure and flow:
Fei2077 – 338451504 (same logic, uses array instead of vector)
shiinfinite – 338455856
BPENSYJPIZQ – 338497682(This code also match)
a_marzouk – 338533992
_sous# – 338642166
This demonstrates that the similarity is due to the common nature of the solution, not code sharing.And these participants are experienced, and I do not believe they tried to submit my code.
I sincerely respect Codeforces rules and never intend to violate them. I kindly request that you review my case and please guide me into this...
Thank you very much for your time and for maintaining fairness in contests.
Best regards, blckhat
Problem F reference:
when the next div-4 contest will happen?