cf/mirror

Wrong Answer on test 233 (Hard Version)

CF
1227F22400· grandmaster1s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
3 3
1 3 1
Output
9
Sample 2of 3
Input
5 5
1 1 4 2 2
Output
1000
Sample 3of 3
Input
6 2
1 1 2 2 1 1
Output
16
1227F2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)