Chefs Army
CodeChefOpen on judge ↗
Chef is commander of army with size NxM grid . Where each cell represent soldier of his army , High command has instructed Chef to keep hold on people marching towards White house . Currently chef is at position (x , y) , where x represent the row and y represent the column . Chef need to close the Gate to ensure the safety of president , but the gate can be closed only by position (x1 , y1) wher
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