Educational Codeforces Round 117 X-Magic Pair Solution (Java/C++)
Solution: We assume that a<b, let's observe various possible operations: According to the above picture, we find that when 0<a<b-2a, a will never be replaced,…
Solution: We assume that a<b, let's observe various possible operations: According to the above picture, we find that when 0<a<b-2a, a will never be replaced,…
A. Mathematical Addition Solution: Obviously, when $x=u^2,\ y=-v^2$, the conditions are met. Code: Java C++…
Solution: First of all, we noticed that for the first pile of stones, it must be operated with the second pile of stones. And when the first pile of stones is taken to empty...…
Solution: We consider the image of querying [x, n]. In other words, as x changes, the changes of the result of query (? x n) .…
A. A.M. Deviation Solution: Obviously it is meaningless to adjust $a_1$ and $a_3$. So it is not difficult to find that the effect of each operation on the result is 3.…
Solution: We first consider when $u\oplus v> \min(u,v)$. It is not difficult to find that $u\oplus v> \min(u,v)$ if and only if one of the highest bits of u and v is 0 and the other is 1. Take the following picture as an example:…
Solution: First of all, we can naturally notice that i=1 will directly affect all numbers, and the final result will only be affected by b[1]-a[1].…
Recently, forced to make a living, re-study the principles of economics, just to review the comparative advantages, so I combined my own job and wrote such a thing similar to a small exercise after class.…