cf/mirror

Maximum Balanced Circle

CF
1157F2000· candidate master2s256 MB⌨ stdin/stdout

Examples

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