← All problemsSign in

Save your Knight

You are a pawn of a Chess Game fighting to protect your King from a greedy knight of the opponent! You have Hp health points and an attack power of Ap, and the knight has Hk health points and an attack power of Ak. If your health Hp drops to 0 or below at any point; you are knocked out of the game and you instantly lose. If the knight's health Hk drops to 0 or below at any point, the knight is

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start