This morning began to write Kang search questions.
The first, the classic eight digital, re-review the Cantor expansion and BFS. The code is too weak, plus the problem is not fully understood, adjusted the code for the morning.
The second problem, eight digital variants, data more water, hold the extension of the flip rule can be.
The third question is still under construction.
The fourth question, a beginning of Dfs violence, the tle dropped; later began to use DFS memory search, failed; and then try to bfs+dp,tle. Finally, I read the solution on the net and use DP to solve it.
Keep an eye out for the border during DP. In addition, it is easy to write a vague error transfer when the state shifts. In this problem, a row or column is processed first, and the time-out is avoided by repeating the calculation, either by layers or by column-wise.
The fourth question has another solution, the use of a two-point method to try at the beginning of the blood, in the DFS to run, can reach the end of, so r = Mid; unreachable L = mid until the exact value appears.
About October 12 # Four Search questions on the experience and sentiment