Santa Claus and a Palindrome
748D2100· master2s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
7 3abb 2aaa -3bba -1zyz -4abb 5aaa 7xyx 4
Output
12
Sample 2of 3
Input
3 1a 1a 2a 3
Output
6
Sample 3of 3
Input
2 5abcde 10000abcde 10000
Output
0
58%
748D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)