## Codeforces Round #756 ABCDEFG Solutions (Java/C++)

A. Make Even Solution: Obviously, if there is no even number, -1 is output. If the last digit itself is an even number, 0 is output. If the first digit is an even number, 1 is output. Otherwise, output 2.…

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