Hello, Codeforces!
I'm thrilled to invite you to take part in Codeforces Round 1044 (Div. 2), which starts on Aug/24/2025 17:35 (Moscow time). You will help Steve solve $$$6$$$ of his most dastardly problems in $$$2$$$ hours. The score distribution is as follows:
$$$\,\,\,\,$$$
$$$\,\,\,\,$$$
$$$\,\,\,\,$$$
$$$\,\,\,\,$$$
$$$\,\,\,\,$$$
One of the problems may be interactive, so make sure to read the guide for interactive problems before the contest.
The round will be rated for participants whose rating is below 2100. Participants with higher rating can participate unofficially.
The problems were authored and prepared by me. I would also like to thank:
- flamestorm for excellent and efficient coordination.
- Alexdat2000 for translating the statements to Russian.
- myst-6 for discussing some of the problems and motivating me to propose a round.
- arvindf232 for black glazed terracotta testing.
- p0tato, Serval, N_z__, Aotsuki, _istil, cadmiumky, __baozii__ for redstone testing.
- Intellegent, yud08, Jasonwei08, mwen, Friedrich, anango, Proof_by_QED for gold testing.
- madlogic, garamlee500, macaquedev for amethyst testing.
- segtreebeats, beaten_by_ai, darysani, chromate00 for lapis lazuli testing.
- vladimirfilip for waxed lightly weathered cut copper testing.
- moonpole for forgetting to test.
- MikeMirzayanov and KAN for the amazing Polygon and Codeforces platforms.
Good luck!
UPD: Editorial
UPD2: Congratulations to the winners!
Div 1+2:
Div 2:
First solves:








As a tester I encourage participants to write their solutions in minecraft redstone.
As a tester, I confirm that yuri is a substring of sammyuri.
why sammyuri is a link but yuri isn't? .r
no way I'd want to ping an account whose last visit was 6 years ago
@chromate00 do we ping like this? can you tell me how to ping someone
First add friend if you want to ping someone then if you have to ping simply wright @username
that's not how you do it, you have to do:
"[ user:SSSIsNotTheEndOFTheWorld ]" (delete spaces and ") and you get: SSSIsNotTheEndOFTheWorld
As a participant I encourage participants to use a minecraft book & quill as your ide.
Hey is the same sammyuri that made Minecraft in Minecraft?
yes
As a tester, I can conform that the problems are very interesting and high quality.
s3yoonpark i have question, are testers choose randomly or you have to request to become a tester?
As a tester, I hope I can place my minecraft bed next to yours.
As a tester, I can confirm Chicken Jockey is mentioned zero or more times.
As a tester, I confirm that sammyuri is actually Steve irl.
As a Minecraft player, I bet the first problem will help Steve get wood, and the last one will help him beat the Ender Dragon.
Nevermind, it's not. Instead, we got a CHICKEN JOCKEY!
Excited to give a contest after so long. Thanks for making it<3
As a tester, I think I forgot to test...
As an alleged tester, I did not look at the problems or test the round, because my Windows install is slower than sammyuri's redstone computer.
I am very excited for div2 after long time but I have a question
we have div2 after such a long gap, but now we have 3 div2s with 2 days gap, I wish they were spread apart like 1 contest each week. What might be the reason for such a schudule ???
Holidays
oh I wasn't aware, which holidays during August?
I'm not sure it's the reason, but most people have holidays in August, because schools and universities don't have lessons at that time, so it feels logical that fewer people will participate. Maybe that's the reason
oh ok, maybe you r right, thanks for telling me.
Codeforces X Minecraft collab
Bruh, why downvote?
minecraft ore contest.
diamond testing for cyan would be better imo.
hold atto round 2 as before
wait, will i get help? omg, thank u so much. :)
I wish we make to the end of the contest not just the nether. Huge thanks to moonpole for the effort
I will blow up the contest (BOOOM).
For clarification reasons.. I think D is a chkicken-jockey
What is 2250?
Redstone — Villager — Nether Portal — ?? — Diamond Pick — Flint n Steel
white amogus
chicken jockey
How to become a tester?
I was asked a question that many people downvoted that. I’m totally fine with it.
How did the nether portal come before the diamond pickaxe and the flint and steel?
ruined portal structure exists (or just use a bucket to make the frame and wood to light it. speedrunner strats)
Oh that's how GMs solve C so quickly
Steve must be playing on a seed where nether portals generate naturally!
Moonpole has so much aura
The FBI ( Frfr Bro International) leaked the problems!
A: fix the redstone circuit
B: Get mending for my armour
C: Go to the Nether
D: Chicken Jockey
E: Go mining
F: Flint n' steel
Lol /_/ No I did not
Looks like C will be significantly harder than B
I don't want to struggle in problem C please :(
I am STEVEEE
broooo i never knew sammyuri is on codeforces, totally a surprise for me
It looks like the ones who solve problems A, B, and C quickly will end up with good rankings.
A,B,C and D ;)
hope to reach 1750+ in this contest
We got Codeforces X Minecraft collab before GTA VI
Copy-past from https://codeforces.me/blog/entry/145725?#comment-1303529
"One of the problems may be interactive"
The interactive problem:
You will be given a Minecraft world seed. You must render the game screen while being fed the player's inputs
I am back on codeforces after a very long time, this time for the right reasons, not to crack jobs but to be just good at problem solving which is very fun I believe. Wish me luck:) IMO codeforces is the one of the best platform where I can find very intelligent people to compete with.
Truly, I am incredibly blessed to hear that. For greater numbers are an invariably magnificent way to use the gift of sight. I wish you a joyful experience before, during and after today's contest.
Great MC problems, the last time I've seen was CF2113C
Long ass problem statements scare me more than harder ones, i hope problem statements are short and concise
Does anyone know what's in the fourth picture =O In my view, it's like a zombie wearing an iron chestplates...
The statements are way too unfriendly for non-native English speakers :(
As a Minecraft player, I liked the contest!
Thank you sammyuri for such an amazing contest ^_^
Slow solve on $$$ABC$$$ got me fucked up :(
How so many people able to solve C ?
I wrote the brute force solution, while writing it i realized the queries were indeed generous
how many queries you used ?
I should start from E instead of D :(
please tell idea of E
I had an idea of carefully picking nodes with big degrees (>= 4 ) and then some trick with degree = 3 ..but found it hard to implement
Note that a path with n vertexes can be always solved by n operation 1s from one end to the other.
Then we only need to perform some operation 2s to make each connected component of the tree a path. This can be solved with dp on tree.
I didn't prove my solution but I think it is optimal.
thanks
I had a greedy solution.
There cant be vertices with degree >=3 so they must be cleared. This can be done by applying operations {1, 2} to some verticies no more than n/4 times.
These vertices can be foundy greedly by running dfs. (process children before self)
thanks
figured div2C quickly
But forgot the condition
x (starting node) belongs to Sand spent around half an hour because I was gettingmemory limit exceeded.. darn it.I got ABC in a div 2??? was this an easier contest? definitely getting some elo, kinda makes up for absolutely bombing today's LC contest.
Great problems though, I love the minecraft theme.
As a participant, I can confirm I was jamming to Lava Chicken during the contest.
how E?
A connected component with size no greater than 3 must be a chain, so during DFS, delete all nodes with size greater than or equal to 4
divide tree into paths by cutting nodes using operation 2, you can do greedy dfs, from it you get construction + proof that you don't need to cut more than n/4 nodes, after that you just clear each path from one side to another
if Tree was a bamboo tree, we would easily could solve the problem using operation 1 starting from leaf. So we could try to transform our tree to a forest of bamboos using operation 2, we have floor(n / 4) operations for that.
n / 4 operation means a one operation per 4 vertices. 4 is the exact number of minimum vertices required for a tree to be non-bamboo. So we could transform our tree to forest of trees with max number of vertices 3.
In order to transform the tree to a forest of trees with <= 3 vertices we can root tree arbitrarily, and greedily remove vertices that leads to a tree with > 3 vertices from bottom of the tree.
The worst D/E problems ever (problem D even online translators can write it in a better way)
Can anyone explain the 3rd testcase of D. How to get 7??
[1,2,1,3,5,2] ... kill 3 ... ans = 3
[1,2,1] [1,2] ... kill 1 in 2nd .. ans = 4
[1,2,1] [1] .. kill 1 in 2nd . ans = 5
[1,2,1] .. hit 1 attack to 2 .. ans = 6
[1,1,1] .. hit the bottom 1 ... ans = 7
[1 2 1 3 5 2] => [1 2 1 3 4 2] => [1 2 1], [1] => [1 1] => []
how to solve D?
For question C : https://codeforces.me/contest/2133/problem/C got this error "Idleness limit exceeded", even after using cout<<endl and cout.flush(); https://codeforces.me/contest/2133/submission/335397878
line 39, you only outputted two variables, while the minimum needed is three, the machine got unfinished query so it did not return a input, since you did not complete the output and outputted a ? afterwards, you were assumed idling
I used to think that most Indians cheat But now I realize that almost all Indians cheat I realized this when I saw that all the people sitting next to me on the top were Indians! Maybe it's because of their large population, I don't know
Can we do dp on E to find optimal way to break the tree so that all nodes have deg <= 2 and just use operation 2 based on the dp transitions ?
my dp was like dp[node][degree] where we compute for all degrees {0, 1, 2, 3} :)
haaaaaaaa osakaaaaaa!!!!!!!!
It is my solution 335387237 :)
I’m really upset that in Div 2, Problem C was interactive. If you want to include interactive problems, at least place them after the 3rd or 4th problem, not so early.
why?
it forces contestants to deal with input/output protocol handling, flushing, and debugging under strict formats.
if you use c++ as your language, you can use endl instead of '\n' and then you don't have to do the flushing thing. And for debugging, WA on pretest 1 won't cause penalty, although it is still troublesome, but this enables you to check whether you pass the pretest quickly, so it's ok.
3rd one should be named Cobweb I hate interactive problems ig gotta practice those
4th one was more intuitive for me as compared to 3rd
anyways thanks for this Minecraft contest
As a participant, I'd like to note that problem A used items that were removed from the game.
I think problem D was not clearly written, which led to me reading it wrong. :(
lucky!i got d with only 30s
30s left:(
What was your approach?
simple dp. dp[pos] means solve h[1...pos],the answer is dp[n]
I had tried to approach from the front but then how do you decide the fall back conditions on the remaining elements, like can you explain your logic with some code, I wanna try it but with little bit of hint
when we try to remove position x,the original h[1,2,...,n] becomes 2 parts,A=h[1,2,...,x-1],B=h[x+1,x+2,...n].This is equivalent to first transforming the B part into {x,1,1,...,1} (a total of n-x ones),and then removing the position x,so that we no longer need to maintain B's answer.So After this operation,if we try to remove position x,then B will also disappear,leaving only A,and the answer we want is dp[n] plus some values,which can be solved by dp
dp[x-1]
so this is the top down approach right? like we are doing something like prefix min dp? like we are updating from n to 1 right?
yes,prefix min dp
and update from 1 to n
I was finally able to finish coding E Then when submitting the div ended :(
Great round!
What the heck?
Even I got the same verdict for problem C.
UPD: Solution got re-judged.
Ok. It passed.
As a noob participant I liked the contest
Hello,
My handle is Delulu_69. I would like to self-report submission 335389804 for Problem C in Contest 2133.
I used GPT to fix a syntactical error, but it inadvertently changed the logic. I request that this submission be reviewed and invalidated if necessary.
Thank you.
Using GPT to fix syntax errors is also not allowed. Please don’t use LLMs during contests in the future.
i am a newbie , i registered for this contest , joined the contest , solved first 2 (A+B) , but my name is not in final standing , nor did my rating increase or decreased .
but i solved the problems , got accepted also , and it showed all pretest passed , one showed pretest passed 2, and was green .
so why my rating didn't changed
It usually takes 1 day or longer to apply rating modification, the longest dely I have ever seen is almost 1 week, since a large number of contestants cheated with AI in that round.
Isn't this contest rated? My rating is Pupil. Because, in the contest section, it is unrated for me, like showing no rank.
it is rated, as the anouncement said.
the statement of D was ambiguous, I used nearly 20mins to comprehend how to calculate the fall damage
One of the best contests I participated. I wish sammyuri make more rounds.
I feel the same ...especially after encountering the fourth question...keep up the good work
The one who first solved problem D is a legend
good D love it, and It would be even better if the text explanation were clearer
excellent contest:)
problems in this round (A — E at least) were really cool. Shame that it was held at the same time as ucup semis.
Any recursive dp solution for Problem D
Steeeve, you code your life awaay.
You could've built a real house, you could've made a famiilyyy.
The original song is the same but it's play not code.
Also this is the song:
https://www.youtube.com/watch?v=zSOQKNp2wHE
"A delayed start is okay if it leads to a better ending..." Due to some technical difficulties, I was late to solve the 1st problem. But that only made me more determined -> I managed to score the 3rd problem, Siuuu... #CodeForces
omg, Minecraft? OvO.
deleted