Language: C++

#![allow(unused_mut)]
#![allow(non_snake_case)]
#![allow(unused_imports)]
use std::collections::HashSet;
use std::collections::HashMap;
use std::collections::BTreeSet;
use std::cmp::{max, min};
#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

// https://atcoder.jp/contests/agc033/submissions/5257271
fn main() {
    input! {
        h: usize,
        w: usize,
        a: [chars; h],
    }
    let mut tbl=vec![vec![None; w]; h];
    let mut q = std::collections::VecDeque::new();
    for i in 0..h {
        for j in 0..w {
            if a[i][j] == '#' {
                q.push_back((i, j, 0));
            }
        }
    }
    while let Some((i, j, dep)) = q.pop_front() {
        if tbl[i][j].is_some() {
        } else {
            tbl[i][j] = Some(dep);
            for &(di, dj) in [(1, 0), (-1, 0), (0, 1), (0, -1)].iter() {
                let ci = i as i64 + di;
                let cj = j as i64 + dj;
                if !(ci >= 0 && ci < h as _ && cj >= 0 && cj < w as _) {
                } else {
                    let ci = ci as usize;
                    let cj = cj as usize;
                    q.push_back((ci, cj, dep + 1));
                }
            }
        }
    }
    let mut ans = 0;
    for row in tbl {
        for cell in row {
            if let Some(d) = cell {
                ans = std::cmp::max(ans, d);
            }
        }
    }
    println!("{}", ans);
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #![allow(unused_mut)]
      |  ^
a.cc:2:2: error: invalid preprocessing directive #!
    2 | #![allow(non_snake_case)]
      |  ^
a.cc:3:2: error: invalid preprocessing directive #!
    3 | #![allow(unused_imports)]
      |  ^
a.cc:8:2: error: invalid preprocessing directive #[
    8 | #[allow(unused_macros)]
      |  ^
a.cc:26:2: error: invalid preprocessing directive #[
   26 | #[allow(unused_macros)]
      |  ^
a.cc:37:2: error: invalid preprocessing directive #[
   37 | #[allow(unused_macros)]
      |  ^
a.cc:44:10: error: too many decimal points in number
   44 |         (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
      |          ^~~~~~~
a.cc:69:14: error: too many decimal points in number
   69 |     for i in 0..h {
      |              ^~~~
a.cc:70:18: error: too many decimal points in number
   70 |         for j in 0..w {
      |                  ^~~~
a.cc:4:1: error: 'use' does not name a type
    4 | use std::collections::HashSet;
      | ^~~
a.cc:5:1: error: 'use' does not name a type
    5 | use std::collections::HashMap;
      | ^~~
a.cc:6:1: error: 'use' does not name a type
    6 | use std::collections::BTreeSet;
      | ^~~
a.cc:7:1: error: 'use' does not name a type
    7 | use std::cmp::{max, min};
      | ^~~
a.cc:9:1: error: 'macro_rules' does not name a type
    9 | macro_rules! input {
      | ^~~~~~~~~~~
a.cc:27:1: error: 'macro_rules' does not name a type
   27 | macro_rules! input_inner {
      | ^~~~~~~~~~~
a.cc:38:1: error: 'macro_rules' does not name a type
   38 | macro_rules! read_value {
      | ^~~~~~~~~~~
a.cc:61:1: error: 'fn' does not name a type
   61 | fn main() {
      | ^~