sammyuri's blog

By sammyuri, 9 months ago, In English

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:

$$$\,\,\,\,$$$ $$$\,\,\,\,$$$ $$$\,\,\,\,$$$ $$$\,\,\,\,$$$ $$$\,\,\,\,$$$

$$$\,500\,-1000-1750-2250-2750-3250$$$

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:

Good luck!

UPD: Editorial

UPD2: Congratulations to the winners!

Div 1+2:

  1. 111445
  2. Sugar_fan
  3. Otomachi_Una
  4. cyx
  5. kotatsugame

Div 2:

  1. cyx
  2. TomitaMatei
  3. Yahia_Emara
  4. Brinton
  5. dsdp

First solves:

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

»
9 months ago, hide # |
 
Vote: I like it +54 Vote: I do not like it

As a tester I encourage participants to write their solutions in minecraft redstone.

»
9 months ago, hide # |
 
Vote: I like it +26 Vote: I do not like it

As a tester, I confirm that yuri is a substring of sammyuri.

»
9 months ago, hide # |
 
Vote: I like it +42 Vote: I do not like it

As a participant I encourage participants to use a minecraft book & quill as your ide.

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

As a tester, I can conform that the problems are very interesting and high quality.

»
9 months ago, hide # |
 
Vote: I like it +58 Vote: I do not like it

As a tester, I hope I can place my minecraft bed next to yours.

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

As a tester, I can confirm Chicken Jockey is mentioned zero or more times.

»
9 months ago, hide # |
Rev. 5  
Vote: I like it 0 Vote: I do not like it

As a participant, don’t tell us to make Minecraft in Minecraft.

»
9 months ago, hide # |
 
Vote: I like it -31 Vote: I do not like it

As a tester, I confirm that sammyuri is actually Steve irl.

»
9 months ago, hide # |
 
Vote: I like it -13 Vote: I do not like it

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.

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

Excited to give a contest after so long. Thanks for making it<3

»
9 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

As a tester, I think I forgot to test...

»
9 months ago, hide # |
Rev. 3  
Vote: I like it +19 Vote: I do not like it

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.

»
9 months ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

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 ???

»
9 months ago, hide # |
 
Vote: I like it -17 Vote: I do not like it

Codeforces X Minecraft collab

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

minecraft ore contest.

diamond testing for cyan would be better imo.

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

hold atto round 2 as before

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

I think Steve will be an intelligent coder instead of beating Ender Dragon :)

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

wait, will i get help? omg, thank u so much. :)

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

Steve from Minecraft

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

I wish we make to the end of the contest not just the nether. Huge thanks to moonpole for the effort

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

I will blow up the contest (BOOOM).

»
9 months ago, hide # |
 
Vote: I like it -8 Vote: I do not like it

1750 for C :0 Gonna be a difficult contest IG!

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

For clarification reasons.. I think D is a chkicken-jockey

»
9 months ago, hide # |
 
Vote: I like it -8 Vote: I do not like it

What is 2250?

Redstone — Villager — Nether Portal — ?? — Diamond Pick — Flint n Steel

»
9 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

How to become a tester?

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

How did the nether portal come before the diamond pickaxe and the flint and steel?

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

Moonpole has so much aura

»
9 months ago, hide # |
 
Vote: I like it +29 Vote: I do not like it

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

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

hope this contest's problems is not full of math like last div.3

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

As a Minecraft player, "lightly weathered" was changed to "exposed" by Mojang a long time ago.

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

Looks like C will be significantly harder than B

»
9 months ago, hide # |
Rev. 3  
Vote: I like it -8 Vote: I do not like it

.

»
9 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

I am STEVEEE

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

broooo i never knew sammyuri is on codeforces, totally a surprise for me

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

Hey guys is onecompiler safe to use during the contests, I don't remember the name but I heard in one contest someone used some online compiler and that was set to public so the solution got surfaced on the internet and was punished ig, I just want to clearify. Thanks in advance :D

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

1750 for C!?!?! demn

»
9 months ago, hide # |
 
Vote: I like it -21 Vote: I do not like it

It looks like the ones who solve problems A, B, and C quickly will end up with good rankings.

»
9 months ago, hide # |
 
Vote: I like it -12 Vote: I do not like it

hope to reach 1750+ in this contest

»
9 months ago, hide # |
Rev. 2  
Vote: I like it +4 Vote: I do not like it

We got Codeforces X Minecraft collab before GTA VI

»
9 months ago, hide # |
Rev. 2  
Vote: I like it +29 Vote: I do not like it

"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

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

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.

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

    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.

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

Great MC problems, the last time I've seen was CF2113C

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

Ready for another rating minus T-T

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

Long ass problem statements scare me more than harder ones, i hope problem statements are short and concise

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

Does anyone know what's in the fourth picture =O In my view, it's like a zombie wearing an iron chestplates...

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

I hope m1,m2 and m3 will work and has problems statement..

»
9 months ago, hide # |
 
Vote: I like it -12 Vote: I do not like it

Quick query!!! What am I supposed to do in an interactive kind of problem? like here: https://m1.codeforces.com/contest/2133/problem/C

What am I expected to return here???

»
9 months ago, hide # |
 
Vote: I like it -11 Vote: I do not like it

Problem statements are not good enough.

»
9 months ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

The statements are way too unfriendly for non-native English speakers :(

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

As a Minecraft player, I liked the contest!

Thank you sammyuri for such an amazing contest ^_^

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

Slow solve on $$$ABC$$$ got me fucked up :(

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

How so many people able to solve C ?

»
9 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

I should start from E instead of D :(

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

    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

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

      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.

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

      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)

      • If vertex has 3 edges its parent will apply the operation.
      • If the vertex has 4 or more edges choose it.
»
9 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

figured div2C quickly

But forgot the condition x (starting node) belongs to S and spent around half an hour because I was getting memory limit exceeded .. darn it.

»
9 months ago, hide # |
 
Vote: I like it +4 Vote: I do not like 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.

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

    I also got A and B today. Was the contest easy? I don't want to get overconfident today!

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

As a participant, I can confirm I was jamming to Lava Chicken during the contest.

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

how E?

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

    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

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

    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

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

    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.

»
9 months ago, hide # |
 
Vote: I like it -17 Vote: I do not like it

The worst D/E problems ever (problem D even online translators can write it in a better way)

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

Can anyone explain the 3rd testcase of D. How to get 7??

  • »
    »
    9 months ago, hide # ^ |
    Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    [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

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

    [1 2 1 3 5 2] => [1 2 1 3 4 2] => [1 2 1], [1] => [1 1] => []

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

how to solve D?

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

herobrine is real

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

For question C : https://mirror.codeforces.com/contest/2133/problem/C got this error "Idleness limit exceeded", even after using cout<<endl and cout.flush(); https://mirror.codeforces.com/contest/2133/submission/335397878

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

good contest. hope the writer to make others in future.

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

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

»
9 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

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

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

I would love to try and hack other people's submissions. As I understand it I can only hack in my room. However, I use Python and of the 43 people in the room, only one other person uses Python. Hacking is therefore impossible, unfortunately.

Question/suggestion: would it be possible to try to cluster people with the same language, while maintaining randomness and possible other criteria you find important?

»
9 months ago, hide # |
 
Vote: I like it -18 Vote: I do not like it

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.

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

    why?

    • »
      »
      »
      9 months ago, hide # ^ |
       
      Vote: I like it -13 Vote: I do not like it

      it forces contestants to deal with input/output protocol handling, flushing, and debugging under strict formats.

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

        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.

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

How can we approach D?

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

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

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

As a participant, I'd like to note that problem A used items that were removed from the game.

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

I think problem D was not clearly written, which led to me reading it wrong. :(

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

lucky!i got d with only 30s

»
9 months ago, hide # |
 
Vote: I like it -7 Vote: I do not like it

SALAM AZERILER LIKE ATTIINNN

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

Nice contest

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

Great round!

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

loved the minecraft theme haha!

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

What the heck?

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

As a noob participant I liked the contest

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

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.

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

There were no option for unrated when I registered, but still my rating is unchanged after final standings. why? I am confused

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

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

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

    it takes time to update. wait.

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

    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.

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

Isn't this contest rated? My rating is Pupil. Because, in the contest section, it is unrated for me, like showing no rank.

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

the statement of D was ambiguous, I used nearly 20mins to comprehend how to calculate the fall damage

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

As a tester, I confirm that the real reason for Wrong Answer is that you forgot to feed your Minecraft cow before running the code.

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

Lol, I got pupil again! :)

Strange, I see two different standings with unchecked "show unofficial". Sometimes 5120, sometimes 5876. If I include unofficial, then it is always 6070.

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

After I solved problem A and got accepted, I got an error in the main test after the contest ends because I walked outside the repetition matrix by one step, even though it worked on my device and on the pretests ... This is not fair and very sad !!!

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

One of the best contests I participated. I wish sammyuri make more rounds.

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

    I feel the same ...especially after encountering the fourth question...keep up the good work

»
9 months ago, hide # |
 
Vote: I like it -19 Vote: I do not like it

The one who first solved problem D is a legend

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

good D love it, and It would be even better if the text explanation were clearer

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

excellent contest:)

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

i love u

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

problems in this round (A — E at least) were really cool. Shame that it was held at the same time as ucup semis.

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

Any recursive dp solution for Problem D

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

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

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

As a begineer Minecraft Player, please make contest like this. It is fun to participate in these type of contests Became Pupil due to this contest.

»
9 months ago, hide # |
 
Vote: I like it -13 Vote: I do not like it

Problem Statement for $$$D$$$ is the worst.

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

"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

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

omg, Minecraft? OvO.

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

Hello, Codeforces team,

I recently received a plagiarism verdict in Codeforces Round 2133 (Div. 2), but I am confident this is a false positive.

My handle: pathanshahebaj

Contest: Round 2133 (Div. 2) for 2133C and 2133D

Verdict: Plagiarism (I believe this is incorrect).

I solved all problems independently, without copying from any external source. To support this, I am sharing screenshots of:

GitHub commit history showing my progress.

VS Code timeline screenshots with timestamps.

my directories where i wrote code and timelines

link of screenshots: https://drive.google.com/drive/folders/1Et0CZpevwZWIeifdRmoz3rDDZ_nSBn1r?usp=sharing

These clearly show that the work was my own. I kindly request the coordinators to recheck my submissions and reconsider the plagiarism verdict.

Thank you for your understanding and for maintaining fairness in contests.

Best regards, Shahebaj Pathan

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

Hello, Codeforces Team,

I recently received a plagiarism warning for my solution, and I would like to respectfully clarify my side.

handle-> anurag_shukla_

About the approach

The problem essentially reduces to finding the longest path in a Directed Acyclic Graph (DAG). This is a very standard technique, solved using DP + topological sort / DFS. The same approach is documented in many public references, for example:

CP-Algorithms: Longest path in DAG

GeeksforGeeks: Longest Path in a DAG

USACO Guide — Longest Path in DAG

Since this is a well-known solution, it is natural that independently written codes may look similar.

About variable naming

My variable names follow common competitive programming shorthand:

dp → dynamic programming array

vis → visited array

cnt → counter

maxi → maximum value tracker

adj → adjacency list

These are very standard and widely used. Because of this, independent solutions can sometimes appear similar, even when developed separately.

Personal note

I always solve problems independently and do not copy from others. I take plagiarism warnings very seriously, and I want to emphasize that my code was entirely written by me, using only standard patterns and conventions known in the CP community.

Thank you for your understanding and for maintaining fairness in contests.

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

Absolute peak of a contest. I'm frown that I wasn't there.

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

deleted