cf/mirror

Cyclic Cipher

CF
722F2800· international gm2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
3 4
3 3 4 1
4 1 3 4 2
3 3 1 4
Output
2
1
3
2
Sample 2of 3
Input
5 5
2 3 1
4 5 1 3 2
4 2 1 3 5
1 3
2 5 3
Output
3
1
4
0
1
Sample 3of 3
Input
4 6
3 4 5 3
2 6 3
2 3 6
3 3 6 5
Output
0
0
2
1
1
2
722F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)