cf/mirror

Fence

CF
234F1800· expert2s256 MB⌨ stdin/stdout
#dp

Examples

Sample 1of 3
Input
4
5 7
3 3 4 1
Output
3
Sample 2of 3
Input
3
2 3
1 3 1
Output
2
Sample 3of 3
Input
3
3 3
2 2 2
Output
-1
234F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)