cf/mirror

Cyclic Hamming (Hard Version)

CF
1896H23500· legendary gm2s256 MB⌨ stdin/stdout

Examples

Sample 1of 6
Input
1
0011
0101
Output
1
Sample 2of 6
Input
1
0011
0110
Output
0
Sample 3of 6
Input
1
0??1
01??
Output
2
Sample 4of 6
Input
2
000?????
01010101
Output
3
Sample 5of 6
Input
2
0???????
1???????
Output
68
Sample 6of 6
Input
5
0101010101010101010101010101010101010101010101010101010101010101
????????????????????????????????????????????????????????????????
Output
935297567
1896H2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)