The Battle of Gongmen City
CodeChefOpen on judge ↗
The battle of Gongmen city is about to end and Po is against the wolf army of Shen. Po is at $X=0$ and the positions of $N$ wolf soldiers are $X_1,X_2....X_N$ at $t=0$. An attack by Po or a soldier can only be made if they are in the range of each other i.e. distance between them is not greater than $L$. Each soldier is approaching towards Po with speed $K$, so if at time $t=T_0$ a soldier is at p
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