Do you believe this is impossible? It's really not, because some people do it. See yourself:
1775D - Friendly Spiders: 188718250 188731749 188739534
1775F - Laboratory on Pluto: 188742718 188744106 188756319
Writing source code directly in assembly language may make your code faster, as you can write the CPU instructions directly, making some critical optimization faster than the compiler-generated code.
Of course, the statement above about speed is false, and sometimes it's hard to write a faster code than the compiler generates. And, as you can see, the submissions just contain the code generated by the compiler instead of being written manually.







that does the assignment
,
and
. It is easy to see that only
elements from
, nodes on layer
, etc. So the time complexity per update is
.
preprocessing time and
блоков. Затем разделите элементы на подвижные (те, которые будут изменяться в данном блоке) и неподвижные. Подумайте, как действовать дальше.

