Function largest_rectangle_in_grid

Source
pub fn largest_rectangle_in_grid(
    h: usize,
    w: usize,
    ok: impl Fn(usize, usize) -> bool,
) -> usize
Examples found in repository?
crates/aizu_online_judge/src/dpl/dpl_3_b.rs (line 10)
6pub fn dpl_3_b(reader: impl Read, mut writer: impl Write) {
7    let s = read_all_unchecked(reader);
8    let mut scanner = Scanner::new(&s);
9    scan!(scanner, h, w, c: [[u8; w]; h]);
10    let res = largest_rectangle_in_grid(h, w, |i, j| c[i][j] == 0);
11    writeln!(writer, "{}", res).ok();
12}