Official

Overall Editorial by evima

Hints

A - All Winners

Hint 1 It's difficult to consider all match pairings and results simultaneously. Let's think about increasing the number of players who win all their games while avoiding contradictions as much as possible, and adjust the pairings and results later.
Hint 2 Think about the number of perfect record prize winners that can be produced from each team.
Hint 3 In each match, the $M$ players who lose cannot win the perfect record prize.
Hint 4 For any two teams, the total number of perfect record prize winners from those teams is at most $M$.
Hint 5 Consider the upper bound on the number of perfect record prize winners that satisfies this condition. If we can adjust the match results to achieve this upper bound, that will be our answer.

B - Swap If Equal Sum

Hint 1 Consider what operations are actually possible in the sample cases.
Hint 2 One approach is to write a brute force solution and experiment to see when it fails.
Hint 3 Operations can be performed in reverse order to restore the sequence to its original state.
Hint 4 When we can change $A$ → $X$ and $X$ → $B$, we can make $A$ match $B$ by doing $A$ → $X$ → $B$.
Hint 5 Pay attention to corner cases and exceptions.

C - Destruction of Walls

Hint 1 It becomes easier to think about (and creates a diagram that relatively many people are familiar with) if we replace rooms with lattice points and walls with edges.
Hint 2 To move from the top-left room to the bottom-right room, we need to destroy at least $H+W-2$ walls.
Hint 3 When $K \lt H+W-2$, the condition cannot be satisfied. When $K=H+W-2$, the condition is to choose walls that form a shortest path from the top-left room to the bottom-right room. What about when $H+W-1 \leq K$?
Hint 4 When $K=H+W-1$, we choose one extra wall in addition to the case when $K=H+W-2$. What about when $K=H+W$?
Hint 5 We consider cases:
  • Pattern of moving with $H+W-2$ walls + choosing 2 extra walls
  • Pattern of moving with $H+W$ walls
Be careful about double counting.

D - Insert XOR

Hint 1 Try to enumerate the possible operations concretely.
Hint 2 Since it's difficult to directly consider the minimum value of $|B|$, think about removing elements from $A$ to make it shorter.
Hint 3 Consider elements that cannot be removed no matter what.
Hint 4 Organize the information that should be managed to handle the queries.

E - Tile Grid with One Hole

Hint 1 Try to concretely construct solutions for small cases.
Hint 2 For the case $L=2$, if you color the grid like a chessboard with black and white, you can see conditions that make it impossible. Consider whether this can be extended to the case $3 \leq L$.
Hint 3 Color the $h$-th row of the grid with color $h \bmod L$ and think about the conditions that $H$ should satisfy.
Hint 4 Think similarly and narrow down the conditions that $H,W,N,M,r,c$ should satisfy with respect to $L$.

Hint 5 Once the patterns are narrowed down, try to create concrete constructions.

posted:
last update: