기출 문제 / 삼성 2023 Second Half Morning Problem 1

Royal Knights Duel

The royal knights are preparing for a duel on a chessboard of size L×L. The top-left corner of the chessboard starts at (1,1), and each square consists of either an empty space, a trap, or a wall. The area outside the chessboard is also considered a wall.