GCD and XOR 2 (Easy)
**This is the easy version of the problem. Here $N \le 60$. This is worth $100$ points in Division $1$ and unscoreable elsewhere.** You are given integers $N$ and $D$, please count the number of pairs $(X, Y)$ satisfying the following conditions: - $1 \le X < Y < 2^N$ - $Y - X = D$ - $\gcd(X, Y) = X \oplus Y$ $\\$ Here, $\oplus$ denotes the [Bitwise XOR operator](https://en.wikipedia.org/wiki/B
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start