[SDOI2016] Game — Solution
Clearly we need heavy-light decomposition.
Continue reading →Chinese original · English translation by Claude Opus 5.5
Clearly we need heavy-light decomposition.
Continue reading →Chinese original · English translation by Claude Opus 5.5
Mergeable heap approach: build max-heaps from the top up, then pop the top of the heap until the sum of the whole heap is less than m. (Property: a parent node will never choose a ninja its subtree does not contain.)
Continue reading →Chinese original · English translation by Claude Opus 5.5
Hehe, I don't have to retire after all.
Continue reading →Chinese original · English translation by Claude Opus 5.5
···Second, strictly set admission standards: building on the current basis, universities will further lower the bonus points granted to independent-admission candidates. Third, strictly control enrollment scale: universities will moderately cut admission places relative to the previous year's intake.
Life is really so hard.
Continue reading →Chinese original · English translation by Claude Opus 5.5
After two months of OI, I feel like my whole IQ has gone back to average. Since coming back to Fuzhong, regular classes feel a lot easier than nasty OI stuff like virtual trees. I read some books and caught up on some of the basic knowledge, but not having done any exercises still cost me a lot.
Continue reading →Chinese original · English translation by Claude Opus 5.5
There is an “obvious” theorem: if \(n\&k==k\), then \(C^k_n\) is odd. The specific hand-wavy proof: litble's proof. So, straight to the code.
Continue reading →Chinese original · English translation by Claude Opus 5.5
Continue reading →Chinese original · English translation by Claude Opus 5.5
Official document: Ministry of Education of the People's Republic of China
Continue reading →Chinese original · English translation by Claude Opus 5.5
The problem is roughly this: given the numbers \(N\), \(m_1\), \(m_2\), \(S_{i[1\dots N]}\), find the smallest \(t\) such that some \(S_i^t \; mod\; m_1^{m_2}\).
Continue reading →Chinese original · English translation by Claude Opus 5.5
This problem is really quite nasty.
Continue reading →Chinese original · English translation by Claude Opus 5.5