There always exists an optimal trading plan in which every buy operation uses up all the RMB, and every sell operation sells all the gold vouchers.
So we can just consider directly computing the maximum this money reaches as it changes hands again and again. Define the state \(dp[i]\); then we have the transition:
Continue reading →Chinese original · English translation by Claude Opus 5.5
This problem asks you to implement a Checker that determines whether there are cycles of the same length. The main way to do it is to find all the cycles and tally them in buckets. We can observe some simple properties to make a check first:
If there is an edge-biconnected component with \(|E| - |V| \geq \sqrt{|V|}\), then there must be two cycles of the same length. For the concrete proof you can square it, and then find that the square of the difference is greater than the number of vertices. Hand-wavy intuition: by the pigeonhole principle, there will be some edges that form cycles of the same length.
Continue reading →Chinese original · English translation by Claude Opus 5.5
At first glance this problem doesn't look very doable, because there are so many possible placements. However, when computer science can't solve a problem, it doesn't fuss over the intended solution, only over approximation. So we can enumerate a rotation angle \(\theta\) to determine the final arrangement. After enumerating it, we can directly binary search on the cost, build the edges and solve it as a bipartite graph.
Continue reading →Chinese original · English translation by Claude Opus 5.5
Fill the vertical ones and the horizontal ones separately, top and bottom.
There are 60 queries in total, so we can split them into two batches of 30: the first 30 are used to query the bit just before the highest bit, and the second 30 bits are used to complete our guess of \(a - 1\).
Continue reading →Chinese original · English translation by Claude Opus 5.5
This month went a lot better than last month. I also started doing problems and learning new things on a regular schedule; I just wrote a bit too few blog posts. I should write more blog posts in March.
In February I could say I finally got my direction completely sorted out and found my original aspiration again, and I know how to go on from here, too. I hope I can keep up a fairly good state from now on.
That's it.
Continue reading →Chinese original · English translation by Claude Opus 5.5
This one is actually pretty nice. The path you finally get from the XOR is made up of chains and cycles. We can compute the chains and the cycles separately, because the distance from some point on a chain to some point on a cycle can be counted twice, so it has no effect. So we can make one polynomial for the chains and one for the cycles, then do one more FWT_XOR and it's perfect.
Continue reading →Chinese original · English translation by Claude Opus 5.5
A round I did the night before last. I didn’t expect there to be so many gods, and they straight-up separated out a little idiot like me who got stuck on problem D, sigh.
Continue reading →Chinese original · English translation by Claude Opus 5.5