employed's blog

By employed, 4 weeks ago, In English

Hello, Codeforces!

We are excited to invite you to DeepInfra Round 1 (Codeforces Round 1126, Div. 1 + Div. 2), which will take place on Oct/10/2026 18:05 (Moscow time)! Note the unusual start time of the round.

You will have 3 hours to solve 8 problems, one of which is divided into subtasks.

The problems were prepared by employed and reviewed carefully by nifeshe. We have put a lot of care into creating and testing this problemset, and we hope you will enjoy solving the problems as much as we enjoyed preparing them!

A huge thank you to everyone who helped bring this round to life:

Honorable Mentions

A special thanks to our most disciplined testers, who joined the testing phase and successfully resisted the temptation to open a single problem:

cadmiumky, Um_nik, _istil, Intellegent, cgmoreda, sammyuri, Error_Yuan, cry, SpyrosAliv, and Arpa.

Thank you for your statistical contribution to the testing group's headcount.

Score distribution

A B C D E F G H1 H2
$$$500$$$ $$$1000$$$ $$$1250$$$ $$$1750$$$ $$$2250$$$ $$$2500$$$ $$$3500$$$ $$$3000$$$ $$$2000$$$

And now, a few words from today's sponsor!

DeepInfra

Hello Codeforces!

We’re excited to welcome you to DeepInfra Round 1

At DeepInfra, we build high-performance AI infrastructure that makes running the world’s best AI models fast, reliable, and accessible. We work across the entire inference stack—from GPUs to APIs—solving challenging engineering problems with a strong focus on performance and efficiency.

Our team has deep roots in Codeforces and competitive programming. One of us even competed in Codeforces Beta Round 50, so we’ve been around since the early days!

We prepared great prizes for the winners:

  • Top 3: 1000 USDT + merch
  • 4-6: 250 USDT + merch
  • 7-10: 150 USDT + merch
  • Random 10 from the top 100 (rank 11-100): merch

We’re growing! If you enjoy problem solving and want to work on challenging systems at the intersection of AI and infrastructure, we’d love to hear from you.

To apply for Software Engineering interns and full-time positions, fill in the application form and we will be in touch.

Apply

Good luck to everyone competing — have fun, and we’ll see you on the leaderboard!

— The DeepInfra Team

PS We reserve the right to apply strict compliance checks when finalizing the results in order to prevent unfair participation and rule violations.

Please note that prize delivery to certain countries, states, provinces, or territories may be subject to applicable sanctions, trade restrictions, or other legal requirements. We will make every reasonable effort to deliver prizes to all eligible winners, subject to any restrictions that may apply.

See you on the leaderboard. Good luck, have fun, and may your submissions turn green!

UPD

Congratulations to the winners.

  1. QwertyPi
  2. LMydd0225
  3. Kevin114514
  4. squareOf105
  5. Radewoosh
  6. 353cerega
  7. radoslav11
  8. idontwannadothisanymore
  9. potato167
  10. jiangly

First solves: (subject to change)

A. by skinnyasiandude
B by turmax
C. by Kevin114514
D. by Prashant_ksy
E. by ksun48
F. by ItzsleepyXD
G. by PelicanPilot
H1. by Kevin114514
H2. by squareOf105

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

»
3 weeks ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

Finally another Div.1+2 after 3 months....

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope to become Specialist again!

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope to get everything back I lost in past few contests...

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I hope to become an expert

»
3 weeks ago, hide # |
 
Vote: I like it +20 Vote: I do not like it

Finally a Jordanian round by the goat himself

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

»
3 weeks ago, hide # |
 
Vote: I like it +20 Vote: I do not like it

as a tester

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hopefully I can reach specialist this contest

»
3 weeks ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

Just one word, it is called “bestcpintheworld”

»
3 weeks ago, hide # |
 
Vote: I like it +69 Vote: I do not like it

As a tester, can I participate then?

»
3 weeks ago, hide # |
 
Vote: I like it +35 Vote: I do not like it

As a tester, I am un employed

»
3 weeks ago, hide # |
 
Vote: I like it +36 Vote: I do not like it

thx for honorable mention means a lot

»
3 weeks ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

As a tester, problems are hot, but author is even hotter

»
3 weeks ago, hide # |
 
Vote: I like it +13 Vote: I do not like it

Finally, my testing skills have been acknowledged

»
3 weeks ago, hide # |
 
Vote: I like it -17 Vote: I do not like it

My first Div.1+2 after reaching 2100 let's GOOOOOOOOOOOOOOOOO

»
3 weeks ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

Yeah, I am definitely getting cooked.

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

as a tester, i wish i could get an honorable mention too.

»
3 weeks ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

Usually I do badly in long rounds hope I can redeem myself

»
3 weeks ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

As a tester who could not resist the temptation to open the problems, I hope you all enjoy them as much as I did.

»
3 weeks ago, hide # |
 
Vote: I like it +16 Vote: I do not like it

I am afraid of giving those contest when there is prize in it, because there is more cheating in those contest.

»
3 weeks ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

Sorry I am new, is this going to be rated?

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

As a tester, employed is the GOAT

»
3 weeks ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

By looking at the score of the problems, HOLLLYYYY, WE ARE COOKED

»
3 weeks ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

H2 has less score than H1? how does that work?:-)

  • »
    »
    3 weeks ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it +21 Vote: I do not like it

    H2 is a subtask of H1, usually with higher constraints, so the total score if you solved H2 which would also solve H1 since it's just optimized for higher constraints would be 5000 score — time it took to solve (i dont know why it put an emdash, i put -)

»
3 weeks ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

As a participant I encourage the arab writers problems ,testers, judges for hard perseverance , I want to say good luck for participants and I hope for us lucky contest

»
3 weeks ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

As Misaka16172, hope I become CM

»
3 weeks ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

Good luck to everyone participating in this contest! I wish you all the best and a fair contest.

»
3 weeks ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

Why is the score for H2 lower than H1?

»
3 weeks ago, hide # |
 
Vote: I like it +11 Vote: I do not like it

Hope to become Specialist again!

»
3 weeks ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

As a "مقصّر" tester, I'm glad I didn't make it to the honorable mentions.

»
3 weeks ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

contest after a long bit ;pls no back to noobie

»
3 weeks ago, hide # |
 
Vote: I like it +19 Vote: I do not like it

as an un employed person hopefully I'll be employed after this round

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

no way dominater reviewed this round lol

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope I can become a newbie

»
3 weeks ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

After months of total zero practice im so happy that i solved the first two problems only. Even that im in beauty university still can knockout some people.

»
3 weeks ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

I don't deserve this h2 lol

»
3 weeks ago, hide # |
 
Vote: I like it +24 Vote: I do not like it

Problem $$$D$$$ is so easy to think of the solution but real hard to implement it cleanly. Otherwise a relatively easy problem.

$$$C$$$ on the other hand gave me nightmares.

  • »
    »
    3 weeks ago, hide # ^ |
     
    Vote: I like it +5 Vote: I do not like it

    I agree entirely

  • »
    »
    3 weeks ago, hide # ^ |
     
    Vote: I like it +3 Vote: I do not like it

    Agreed completely about D. The way that I did it is somewhat decent compared to my first alternative I thought of: turn it into a range [L, R) and split it into +[0, R) and -[0, L) then do sweep line adding lines up because the function is piecewise linear. Still not good.

    For C though: find the biggest power of 2 you can use. You can use all bits until that bit freely. Just do that and repeat each prefix xor one extra time by adding 0 inbetween. So a convenient construction is just having prefix xor 0 0 1 1 2 2 3 3 ... power-1 power-1 (power-1)^power then repeat the same part from before to pass through numbers that have the highest bit on.

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Problem F is excellent, I like it!

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Idk why I participate in these combined div 1 + div 2 rounds for 3 hrs. I will never be good enough to perform well in these. Only outcome is -70 delta everytime fml

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Enjoyed the problems alot, very good contest

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

C is gangster!!!

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

Solution sketches for A-D (I didn't get cooked):

A. If $$$a+1 \lt b$$$ print $$$-1$$$ otherwise print $$$a$$$ if $$$a$$$ and $$$b$$$ have the same parity otherwise $$$a+1$$$

B. Consider the frequency array $$$c$$$ of $$$a$$$, if there is a prefix of length $$$x$$$ in $$$c$$$ where the first $$$x-1$$$ elements of it are greater than or equal to $$$2k$$$ and the last is equal to $$$2k-1$$$ print YES otherwise print NO

C. Let $$$x = \operatorname{msb}(n)$$$, $$$k = 2^{x+1}-1$$$, then print $$$\lfloor 2^{\operatorname{lsb}(i)-1} \rfloor$$$ for $$$1 \leq i \leq k$$$

D. The slope of $$$f(x)$$$ changes at the key points $$$l-m+1$$$, $$$r-m+2$$$, $$$l+1$$$, and $$$r+2$$$ for each interval, so put all these points in a map and do some math to check if $$$k$$$ is between pairs of points

Enjoyed the contest

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I managed to solve 3 problems, yay!

»
3 weeks ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

who say Ahh ?

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Did H remind someone else of a certain problem in Looking for a Challenge? Now I regret not trying to understand its solution a bit more.

Also how to reconstruct the answer from the binary search in E?

  • »
    »
    3 weeks ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it +8 Vote: I do not like it

    You binary search on number of [x] -> 2 * [(x + 1) / 2] operations, if you do these operations x number of times, then total number of operations is n + 2x

    Also order of moves dosen't matter so we can assume that all halving moves are done first

    After that we are left with n + x constraints for resulting array a1, a2, ... a{n + x}

    ai <= k + x + (i — 1)

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

      We can use binary search as if constraints are satisfied for some moves for x, then for x + 1 we can simply halve a{n + x} to make it satisfy constraints for x + 1 also

      For checking for some x, you can greedily pop out maximum element from array and check if that highest element has a suitable index, if there is, then we got it placed(place it at highest such possible index) else split the highest number as else it cannot be put anywhere

  • »
    »
    3 weeks ago, hide # ^ |
     
    Vote: I like it +15 Vote: I do not like it

    I think binary search with greedy scanning is a good idea

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

When will ratings change ?

(Participating after 2 years)

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

While in early times I use to struggle with bits generally it appears in question B then I gave time read it patterns and I am able to answer it now it mostly appears at c and I cannot solve that after contest when I try toh find answers it always associate a new property of xor .,.....how to overcome it .......i already done 2-3 yt playlist and knows the basic

»
2 weeks ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

new color :yay:

»
2 weeks ago, hide # |
 
Vote: I like it +37 Vote: I do not like it

Thank you for the contest!

I like how natural the problems are.

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

best cheater in codeforces get 3000+ rating idontwannadothisanymore cong. bro!

employed thank you for contest!

»
2 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

My Codeforces account chaitanya9999 has been disabled. I believe this may have happened due to a false positive or a misunderstanding, so I am respectfully writing to appeal the decision.

I want to state clearly that I did not cheat. I have never copied someone else’s code, shared my solutions during a contest, used another person’s account, or used any unauthorized help like AI. All submissions from my account were written by me.(only the template i use for some functions from past was written before as i use it in each submission and also i wont use it for now onwards). Also i was not able to solve C question , i solved A,B and D , D with difference array technique on my own.

If my account was flagged for suspicious activity or plagiarism, please manually review my submissions and account activity , and please enable my account as soon as possible.

»
12 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Congratulations to the winners! Shortly you will be contacted via private messages with instructions to receive your prize.

As usual, we used the following two scripts for generating random winners, seed is the score of the winner.

get_tshirts.py
randgen.cpp
List place Contest Rank Name
1 2271 1 QwertyPi
2 2271 2 LMydd0225
3 2271 3 Kevin114514
4 2271 4 squareOf105
5 2271 5 Radewoosh
6 2271 6 353cerega
7 2271 7 radoslav11
8 2271 8 idontwannadothisanymore
9 2271 9 potato167
10 2271 10 jiangly
22 2271 22 donnyooo
35 2271 35 paracompact
42 2271 42 Hyperbolic
48 2271 48 Ormlis
54 2271 54 tfg
63 2271 63 PvPro
64 2271 64 JahonaliX
69 2271 69 machine_solution
93 2271 93 The_Caspian_Sea
94 2271 94 rgnerdplayer
»
3 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

nigger