cf/mirror

Palindrome-less Arrays

CF
1140E2200· master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
2 3
-1 -1
Output
9
Sample 2of 4
Input
5 2
1 -1 -1 1 2
Output
0
Sample 3of 4
Input
5 3
1 -1 -1 1 2
Output
2
Sample 4of 4
Input
4 200000
-1 -1 12345 -1
Output
735945883
1140E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)