#include #include using namespace std; #define MAX 301 const int dy[4] = {-1, 1, 0, 0}; const int dx[4] = {0, 0, -1, 1}; int n, m; int map[MAX][MAX]; int delMap[MAX][MAX]; bool check[MAX][MAX]; int totalLand, totalYear; bool checkLand(){ for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ if(map[i][j]) return true; } } return false; } void bfs(int y, int x){ for(int i = 0; i < 4; i++){ int n..