I again remind myself ah ah ah ah ah ah ah ah

This error committed more than once. Just an hour and debug manually good smile.
This topic is the rescue operation, which is a simple version of Naruto and Sasuke. I use the method of Guo God had two dead are not dead are unable to find what was wrong.
OK finally found

int legal(int x, int y) {
	if (x < 0 || x >= M || y < 0 || y >= N) return 0;
	if (visited[x][y]) return 0;
	if (map[x][y] == '#') return 0;
	return 1;
}

A beginning that return 1 forgot to write. More than once committed.
I beg your father this question may have little effect on the dev? ? Sample all over.
There Tucao dev branch actually has no return value will not give warning? ? ?
Warning ...... I hope this article you turn boring warning.

There's fallibility:
the M hit into N, and special debug it for half an hour.
Let me die.

Guess you like

Origin blog.csdn.net/weixin_44288817/article/details/90931706