### DanielB999's blog

By DanielB999, history, 2 months ago,    Comments (9)
 » Auto comment: topic has been updated by DanielB999 (previous revision, new revision, compare).
 » Hi!. In the problem K, the checker is correct?I made my own checker to verify that the toppings I placed are related and also later check that the number of groups with different toppings is >= kLink of code: https://ideone.com/JpyUC7
•  » » I guess it's because the number of different toppings should be exactly equal to KBy the way, I'm curious about the solution for this problem
•  » » » This was my solution for problem K: KThe minimum number of operations is $T=\lceil log_2(K) \rceil$.To print a solution, consider a $100 \times 100$ grid that have the numbers from $0$ to $K-2$ written on the first $K-1$ cells of the rows with odd index (except in the last column) and the rest of cells have written $2^T-1$ on them. For example, for $K=102$: The idea is to use the machine during the $i$-th operation on the cells that have the $i$-th bit set. Every cell is adjacent to at least one cell with the number $2^T-1$, so the cells used during each operation will form a connected component, and we will have $K$ types at the end.
•  » » » » Wow, very beautiful solutionThanks!
•  » » » F for my reading comprehension in the regional XD
 » I decided to write an unofficial editorial of the contest. It contains hints/solutions of all the problems. Feel free to check it here :)
 » In problem A, we are told that $x_i, y_i \neq i$ and $x_i \neq y_i$ but when verifying this condition with an assert, it is not fulfilled in some cases
•  » » Yep, sadly test case 5 contains $x_i == y_i$.