Language: C++

#include <iostream>
#include <iomanip>
#include<vector>
#include <algorithm>
#include <queue>
#include<string>
#include <map>
#include <cmath>
#include <deque>
#include <list>
#include <stack>
#include <queue>
#include <utility>
#include <set>
#include <bitset>
#include <cstring>
typedef long long ll;
typedef long double ld;

#define REP(i,s,n)for(ll i=s;i<(n);++i)
#define rep(i,n) REP(i,0,n)
using namespace std;
using Graph = vector<vector<ll>>;
/* 4 方向への隣接頂点への移動を表すベクトル */
const int dx[4] = { 1, 0, -1, 0 };
const int dy[4] = { 0, 1, 0, -1 };
ll H, W;
ll sX, sY, gX, gY;
char maze[100];
bool reached[100];
ll sectin = 0;
ll flg = true;
vector<string>field;

int main() {
	cin >> H >> W;
	field = vector<string>(H);
	Graph status = Graph(H,vector<ll>(W,-1));
	queue<pair<ll, ll>>que;
	rep(i,H) {
		cin >> field[i];
		rep(j,W) {
			if (field[i][j]=='#') {
				status[i][j] = 0;
				que.push(make_pair(i, j));
			}
		}
	}

	ll ans = 0;
	while (!que.empty()) {
		pair<ll, ll>tmp = que.front();
		que.pop();
		ll x = tmp.first;
		ll y = tmp.second;

		rep(directions,4) {
			ll nextX = x + dx[directions];
			ll nextY = y + dy[directions];
			if (nextX < 0 || H <= nextX || nextY < 0 || W <= nextY)continue;
			if (field[nextX][nextY] == '#')continue;

			field[nextX][nextY] = '#';
			status[nextX][nextY] = status[x][y] + 1;
			ans = max(ans, status[nextX][nextY]);
			que.push(make_pair(nextX, nextY));
		}
	}
	cout << ans << endl;
	return 0;
}#include <iostream>
#include <iomanip>
#include<vector>
#include <algorithm>
#include <queue>
#include<string>
#include <map>
#include <cmath>
#include <deque>
#include <list>
#include <stack>
#include <queue>
#include <utility>
#include <set>
#include <bitset>
#include <cstring>
typedef long long ll;
typedef long double ld;

#define REP(i,s,n)for(ll i=s;i<(n);++i)
#define rep(i,n) REP(i,0,n)
using namespace std;
using Graph = vector<vector<ll>>;
/* 4 方向への隣接頂点への移動を表すベクトル */
const int dx[4] = { 1, 0, -1, 0 };
const int dy[4] = { 0, 1, 0, -1 };
ll H, W;
ll sX, sY, gX, gY;
char maze[100];
bool reached[100];
ll sectin = 0;
ll flg = true;
vector<string>field;

int main() {
	cin >> H >> W;
	field = vector<string>(H);
	Graph status = Graph(H,vector<ll>(W,-1));
	queue<pair<ll, ll>>que;
	rep(i,H) {
		cin >> field[i];
		rep(j,W) {
			if (field[i][j]=='#') {
				status[i][j] = 0;
				que.push(make_pair(i, j));
			}
		}
	}

	ll ans = 0;
	while (!que.empty()) {
		pair<ll, ll>tmp = que.front();
		que.pop();
		ll x = tmp.first;
		ll y = tmp.second;

		rep(directions,4) {
			ll nextX = x + dx[directions];
			ll nextY = y + dy[directions];
			if (nextX < 0 || H <= nextX || nextY < 0 || W <= nextY)continue;
			if (field[nextX][nextY] == '#')continue;

			field[nextX][nextY] = '#';
			status[nextX][nextY] = status[x][y] + 1;
			ans = max(ans, status[nextX][nextY]);
			que.push(make_pair(nextX, nextY));
		}
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc:71:2: error: stray '#' in program
   71 | }#include <iostream>
      |  ^
a.cc:71:3: error: 'include' does not name a type
   71 | }#include <iostream>
      |   ^~~~~~~
a.cc:95:11: error: redefinition of 'const int dx [4]'
   95 | const int dx[4] = { 1, 0, -1, 0 };
      |           ^~
a.cc:25:11: note: 'const int dx [4]' previously defined here
   25 | const int dx[4] = { 1, 0, -1, 0 };
      |           ^~
a.cc:96:11: error: redefinition of 'const int dy [4]'
   96 | const int dy[4] = { 0, 1, 0, -1 };
      |           ^~
a.cc:26:11: note: 'const int dy [4]' previously defined here
   26 | const int dy[4] = { 0, 1, 0, -1 };
      |           ^~
a.cc:97:4: error: redefinition of 'll H'
   97 | ll H, W;
      |    ^
a.cc:27:4: note: 'll H' previously declared here
   27 | ll H, W;
      |    ^
a.cc:97:7: error: redefinition of 'll W'
   97 | ll H, W;
      |       ^
a.cc:27:7: note: 'll W' previously declared here
   27 | ll H, W;
      |       ^
a.cc:98:4: error: redefinition of 'll sX'
   98 | ll sX, sY, gX, gY;
      |    ^~
a.cc:28:4: note: 'll sX' previously declared here
   28 | ll sX, sY, gX, gY;
      |    ^~
a.cc:98:8: error: redefinition of 'll sY'
   98 | ll sX, sY, gX, gY;
      |        ^~
a.cc:28:8: note: 'll sY' previously declared here
   28 | ll sX, sY, gX, gY;
      |        ^~
a.cc:98:12: error: redefinition of 'll gX'
   98 | ll sX, sY, gX, gY;
      |            ^~
a.cc:28:12: note: 'll gX' previously declared here
   28 | ll sX, sY, gX, gY;
      |            ^~
a.cc:98:16: error: redefinition of 'll gY'
   98 | ll sX, sY, gX, gY;
      |                ^~
a.cc:28:16: note: 'll gY' previously declared here
   28 | ll sX, sY, gX, gY;
      |                ^~
a.cc:99:6: error: redefinition of 'char maze [100]'
   99 | char maze[100];
      |      ^~~~
a.cc:29:6: note: 'char maze [100]' previously declared here
   29 | char maze[100];
      |      ^~~~
a.cc:100:6: error: redefinition of 'bool reached [100]'
  100 | bool reached[100];
      |      ^~~~~~~
a.cc:30:6: note: 'bool reached [100]' previously declared here
   30 | bool reached[100];
      |      ^~~~~~~
a.cc:101:4: error: redefinition of 'll sectin'
  101 | ll sectin = 0;
      |    ^~~~~~
a.cc:31:4: note: 'll sectin' previously defined here
   31 | ll sectin = 0;
      |    ^~~~~~
a.cc:102:4: error: redefinition of 'll flg'
  102 | ll flg = true;
      |    ^~~
a.cc:32:4: note: 'll flg' previously defined here
   32 | ll flg = true;
      |    ^~~
a.cc:103:15: error: redefinition of 'std::vector<std::__cxx11::basic_string<char> > field'
  103 | vector<string>field;
      |               ^~~~~
a.cc:33:15: note: 'std::vector<std::__cxx11::basic_string<char> > field' previously declared here
   33 | vector<string>field;
      |               ^~~~~
a.cc:105:5: error: redefinition of 'int main()'
  105 | int main() {
      |     ^~~~
a.cc:35:5: note: 'int main()' previously defined here
   35 | int main() {
      |     ^~~~