Particle
CodeChefOpen on judge ↗
A particle is only allowed to stay in discrete positions in a straight line and is allowed to move only left or right on the straight line. Suppose there are p number of position in that line where the particle can stay. The particle has only enough energy to move n number of times on the adjacent position. The particle can move left or right in the line. Where the particle will move depends on th
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