cf/mirror

Anti-Palindromize

CF
884F2500· grandmaster2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
8
abacabac
1 1 1 1 1 1 1 1
Output
8
Sample 2of 3
Input
8
abaccaba
1 2 3 4 5 6 7 8
Output
26
Sample 3of 3
Input
8
abacabca
1 2 3 4 4 3 2 1
Output
17
884F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…