cf/mirror

Ancient Berland Hieroglyphs

CF
164B2000· candidate master1.5s256 MB⌨ stdin/stdout

Examples

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