TRANSFORM
CodeChefOpen on judge ↗
You are given two integer sequences of length $N: a1,a2,..,aN$ and $b1,b2,.,bN$. Determine if we can repeat the following operation zero or more times so that the sequences $a$ and $b$ become equal. Operation: Choose two integers $i$ and $j$ (possibly the same) between $1$ and $N$ (inclusive), then perform the following two actions simultaneously: 1)Add $2$ to $ai$. 2)Add $1$ to $bj$. ###Input
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