Color the Fence
349B1700· expert2s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
55 4 3 2 1 2 3 4 5
Output
55555
Sample 2of 3
Input
29 11 1 12 5 8 9 10 6
Output
33
Sample 3of 3
Input
01 1 1 1 1 1 1 1 1
Output
-1
58%
349B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)