Official

Overall Editorial by evima

Hints

A - Affinity for Artifacts

Hint 1

The cost of a lamp decreases by at most $N-1$.

Hint 2

"The cost of all lamps with cost at least $1$ decreases by $1$" can be rephrased as "after lighting the $i$-th lamp, the final MP consumption decreases by the number of unlit lamps with cost at least $i$."

B - Balanced Neighbors 2

Hint 1

Try constructing for the minimum $N$ that satisfies the condition.

Hint 2

When $N$ is even, a graph where the distance between $i$ and $N-i$ is $3$ and the distance to other vertices is $1$ or $2$ satisfies the condition.
Think about how to construct such a graph.

C -Combine to Make Non-decreasing Sequence

Hint 1

The number of distinct values of $a_l\ \mathrm{OR} \ \cdots \ \mathrm{OR} \ a_r$ is at most $N \log (\max(a_i))$.

D - Devourers and Cake

Hint 1

Try experimenting with the case $N=1$. What about the cases $N=2,3,\ldots$?

E - Erase and Append

Hint 1

Think about when the answer is -1.

Hint 2

Even if you can freely choose the character to append to the end, \(N+1\) operations is a tight constraint.
Despite having almost no extra operations, there are constraints on the characters to append.

Hint 3

If you delete a character at a position adjacent to both 0 and 1, you can append any character to the end.

posted:
last update: