Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

Блог пользователя employed

Автор employed, 7 недель назад, По-английски

Hello, Codeforces!

We are excited to invite you to DeepInfra Round 1 (Codeforces Round 1126, Div. 1 + Div. 2), which will take place on 10.10.2026 18:05 (Московское время)! 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

  • Проголосовать: нравится
  • +309
  • Проголосовать: не нравится

»
7 недель назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

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

»
7 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hope to become Specialist again!

»
7 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
7 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I hope to become an expert

»
7 недель назад, скрыть # |
 
Проголосовать: нравится +20 Проголосовать: не нравится

Finally a Jordanian round by the goat himself

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +14 Проголосовать: не нравится

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +20 Проголосовать: не нравится

as a tester

»
6 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hopefully I can reach specialist this contest

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Just one word, it is called “bestcpintheworld”

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +69 Проголосовать: не нравится

As a tester, can I participate then?

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +35 Проголосовать: не нравится

As a tester, I am un employed

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +36 Проголосовать: не нравится

thx for honorable mention means a lot

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

Finally, my testing skills have been acknowledged

»
6 недель назад, скрыть # |
 
Проголосовать: нравится -17 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

Yeah, I am definitely getting cooked.

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +14 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +22 Проголосовать: не нравится

As a tester, employed is the GOAT

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

As Misaka16172, hope I become CM

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Why is the score for H2 lower than H1?

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

Hope to become Specialist again!

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

contest after a long bit ;pls no back to noobie

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +19 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

no way dominater reviewed this round lol

»
6 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hope I can become a newbie

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

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.

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

I don't deserve this h2 lol

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +24 Проголосовать: не нравится

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.

  • »
    »
    6 недель назад, скрыть # ^ |
     
    Проголосовать: нравится +5 Проголосовать: не нравится

    I agree entirely

  • »
    »
    6 недель назад, скрыть # ^ |
     
    Проголосовать: нравится +3 Проголосовать: не нравится

    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.

»
6 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Problem F is excellent, I like it!

»
6 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Enjoyed the problems alot, very good contest

»
6 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

C is gangster!!!

»
6 недель назад, скрыть # |
← Rev. 4  
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I managed to solve 3 problems, yay!

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

who say Ahh ?

»
6 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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?

  • »
    »
    6 недель назад, скрыть # ^ |
    ← Rev. 2  
    Проголосовать: нравится +8 Проголосовать: не нравится

    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)

    • »
      »
      »
      6 недель назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      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

  • »
    »
    6 недель назад, скрыть # ^ |
     
    Проголосовать: нравится +15 Проголосовать: не нравится

    I think binary search with greedy scanning is a good idea

»
6 недель назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

When will ratings change ?

(Participating after 2 years)

»
6 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

new color :yay:

»
6 недель назад, скрыть # |
 
Проголосовать: нравится +37 Проголосовать: не нравится

Thank you for the contest!

I like how natural the problems are.

»
6 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

employed thank you for contest!

»
6 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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.

»
5 недель назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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
»
4 недели назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

nigger