cf/mirror

Palindrome Dance

CF
1040A1000· newbie1s512 MB⌨ stdin/stdout
#greedy

Examples

Sample 1of 3
Input
5 100 1
0 1 2 1 2
Output
101
Sample 2of 3
Input
3 10 12
1 2 0
Output
-1
Sample 3of 3
Input
3 12 1
0 1 0
Output
0
1040A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)