Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use BFS to preprocess the minimum number of moves to reach one pawn from the other pawns.
Consider the knight’s original position as another pawn.
Use DP with a bitmask to store current pawns that have not been captured.