Running Spider-Man
CodeChefOpen on judge ↗
Spider-Man is running on a straight road from block $L$ to $R$. Those blocks are numbered sequentially as $L$, $L+1$, $L+2$, ..., $R-1$, $R$. As he loves even numbers, so he will become happy if the count of even-numbered blocks are more than that of odd-numbered blocks on his traveling path. Considering he can run only in forward direction & he has to cover the whole path, is it possible for him
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