Ehab the Xorcist

2020 VietMX 1

Given 2 integers $u$ and $v$, find the shortest array such that bitwise-xor of its elements is $u$, and the sum of its elements is $v$. Input […]