cf/mirror

Maximize the Largest Component (Hard Version)

CF
1985H22200· master2s512 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
6
1 1
.
4 2
..
#.
#.
.#
3 5
.#.#.
..#..
.#.#.
5 5
#...#
....#
#...#
.....
...##
6 6
.#..#.
#..#..
.#...#
#.#.#.
.#.##.
###..#
6 8
..#....#
.####.#.
###.#..#
.##.#.##
.#.##.##
#..##.#.
Output
1
7
11
16
22
36
1985H2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…