ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1298. Knight

Possible solution.
Posted by Mahilewets 17 Jul 2017 01:28
You can have an array deg[i][j] = count of adjacent unvisited cells for cell (i;j).

While doing DFS sort edges by non-decreasing deg[i+move. first] [j+move. second].

It calls an heuristic after some scientist whose name begins at W.