코드#include using namespace std;int n,lo,hi,te[52][52],visited[52][52],human,day;const int dx[] = {1,-1,0,0};const int dy[] = {0,0,1,-1};vector> v;void dfs(int x, int y) { for(int i = 0; i = n || ny >= n || ny = lo && abs(te[nx][ny] - te[x][y]) > n >> lo >> hi; for(int i = 0; i > te[i][j]; } } while(1){ bool ok = false; memset(visited,0,sizeof(visited)); for(int i = 0; i b : v) {..