https://codingnote.cc/zh-sg/p/458446/
Codeforces 1365D Solve The Maze