cf/mirror

Flood Fill

CF
1114D1900· candidate master2s256 MB⌨ stdin/stdout
#dp

Examples

Sample 1of 3
Input
4
5 2 2 1
Output
2
Sample 2of 3
Input
8
4 5 2 2 1 3 5 5
Output
4
Sample 3of 3
Input
1
4
Output
0
1114D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)