bool noZero = true; int N,M,H; int arr[101][101][101]; int dx[4] = {-1,0,1,0}; int dy[4] = {0,1,0,-1}; int ans = 0; queue<vector<int>> q;
voidBFS() { while(!q.empty()) { int cur_x = q.front()[0]; int cur_y = q.front()[1]; int cur_h = q.front()[2]; int days = q.front()[3]; ans = max(ans,days); q.pop(); for(int i=0;i<6;i++) { if(i<4) { int next_x = cur_x + dx[i]; int next_y = cur_y + dy[i]; int next_h = cur_h;