cry's blog

By cry, 14 months ago, In English

I am extremely delighted to invite you to participate in my first solo round, Codeforces Round 1050 (Div. 4), starting on 13.09.2025 17:35 (Московское время). 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:

I know it has been a while without a division 4, so GLHF!

Editorial is Up!

  • Vote: I like it
  • +551
  • Vote: I do not like it

| Write comment?
»
14 months ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

damn div 3 div2 div1 div 4 all happening in span of less than a week.good times

»
14 months ago, hide # |
 
Vote: I like it +15 Vote: I do not like it

as a tester, omg we actually have div4 testers wow

»
14 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

As a tester, this is the first contest I’ve tested, and I recommend to participate as the problems are really high-quality.

»
14 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

so __baozii__ is forced to test div 4 too?

»
14 months ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

As a tester

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As a tester, this is my first time that I tested all the problems.

»
14 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Mandatory Shit comment:-

specialist meme

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

HI CHAT

»
14 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Hana05 .Habiba. so proud of you my friends :3

»
14 months ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

As a tester, I'm feeling special for being the only grey tester in this round.

»
14 months ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

Not enough action in the video, use Subway Surfers next time

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As a tester, this is the most balanced div4 contest.

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As a tester, you should participate in USACO ...

»
14 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

As a testuwuer, I am extremely delighted to participate in cry's first solo round's testing.

»
14 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

As a tester, my eyes get offended when I check the testers.

»
14 months ago, hide # |
 
Vote: I like it +11 Vote: I do not like it

As a testuwuer, I am a person who tests codeforces contests.

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

as a div4 tester, this is a round.

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As an unrated participant, I subbed to this YT channel

»
14 months ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

Miku mentioned

»
14 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

Another brainrot contest? :)

»
14 months ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

As a tester, I tested. Also, tin.le2 orz

»
14 months ago, hide # |
 
Vote: I like it +45 Vote: I do not like it

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

»
14 months ago, hide # |
 
Vote: I like it +50 Vote: I do not like it

hey look im a snail

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

orz

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

aHn my beloved

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

what the sigma

»
14 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

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.

»
14 months ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

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 :)

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

This is cool.

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I think this is the first Announcement that doesn't contain this line:

MikeMirzayanov and KAN for the great platforms.

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

If I don’t get a green tick in under 2 minutes on A, I’m retiring.

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

lovely fufu saint fufu

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As a contestant.. give me pupil to be rated in this round :(

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

probably the best kind of invite you can get these days

»
14 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

after 5 months of waiting:

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

This round will be destroyed by my superior skills

»
14 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Its div 4 and my inner me!

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I want to join the contest when I see MIKU, but I can't get rating ):

»
14 months ago, hide # |
 
Vote: I like it -28 Vote: I do not like it

Please put F and G in the correct order next time

»
14 months ago, hide # |
 
Vote: I like it -28 Vote: I do not like it

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

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Thanks to the Coordinator, for the chance to get a quick back to Green..!

»
14 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Div4 > Div3

problems were very very beautiful !

especially E, F

»
14 months ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

i have solved 5 problems in my first time, clapsQwQ

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

F >>>>>>>> G

»
14 months ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

Nice round. My first time solving all problems in reverse order :)

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

F please someone, I might have had a breakdown had I made another wrong submission

»
14 months ago, hide # |
← Rev. 3  
Vote: I like it +1 Vote: I do not like it

how did so many people solve E, i found it somewhat hard for div 4

  • »
    »
    14 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    For a given (l, r), the subarray (a[l, r]) is awesome if and only if the following condition holds:

    $$$ \text{For every distinct element } x \text{ in } a[l, r], \quad \mathrm{freq}_{[l,r]}(x) \le \frac{\mathrm{freq}_{[1,n]}(x)}{k}, $$$

    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.

»
14 months ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

why is my code failing for problem F?

https://codeforces.me/contest/2148/submission/338499475

  • »
    »
    14 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    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 .

    • »
      »
      »
      14 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      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

  • »
    »
    14 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    because they didnt put the most common corner case into the preliminary tests

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

The problem G I did an O(n*sqrtn*logn) getting TLE.How to solve it?

»
14 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Beautiful contest, beautiful problems !!

»
14 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

The competition requires a good header image, and Miku gave me motivation.

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

G = "John's Last Wish" ... too dramatic for USACO

»
14 months ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

Can anyone tell me why my code is failing on F. https://codeforces.me/contest/2148/submission/338500676

  • »
    »
    14 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Lexicographic order may change when first few characters are omitted. Try this.

    1
    3
    1 1
    2 2 2
    2 3 1
    
»
14 months ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

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.

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can anyone hack my solution, don't know why it passed even though it is O(k^2logn) for F:

https://codeforces.me/contest/2148/submission/338467466

  • »
    »
    14 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    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)$$$.

»
14 months ago, hide # |
 
Vote: I like it +19 Vote: I do not like it

Great contest. Wish codeforces would do something about the false alarm crawling issue. It really makes hacking rounds a lot less fun.

»
14 months ago, hide # |
 
Vote: I like it -22 Vote: I do not like it
»
14 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Host div 3 and div 4 contests on alternate weeks One week div 3, the next week div 4

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

how to report a cheater? :v

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

That was an amazing contest with truly inspiring problems!

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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.

»
14 months ago, hide # |
← Rev. 3  
Vote: I like it 0 Vote: I do not like it

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.

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Problem F reference: