## Codeforces Round #756 Robot and Candies Solution (Java/C++)

Solution: First of all, we can immediately find that for the grid (x, y), no matter how the robot moves, the parity of the grid x+y is always the same. So it is natural to solve for odd and even numbers separately.…

## Educational Codeforces Round 117 X-Magic Pair Solution (Java/C++)

Solution: We assume that a

## Codeforces Round #755 (Div. 2) ABCDE Solutions (Java/C++)

A. Mathematical Addition Solution: Obviously, when $x=u^2,\ y=-v^2$, the conditions are met. Code: Java C++…

## Codeforces Round #755 (Div. 2) Game with Stones Solution (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...…

## Codeforces Round #755 (Div. 2) Guess the Permutation Solution (Java/C++)

Solution: We consider the image of querying [x, n]. In other words, as x changes, the changes of the result of query (? x n) .…

## Codeforces Round #754 ABCDE Solutions (Java/C++)

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.…

## Codeforces Round #754 Treelabeling Solution (Java/C++)

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:…

## Codeforces Round #754 Array Equalizer Solution (Java/C++)

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].…