cf/mirror

Equal Reversal

CF
1698F2800· international gm1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
5
8
1 2 4 3 1 2 1 1
1 1 3 4 2 1 2 1
7
1 2 3 1 3 2 3
1 3 2 3 1 2 3
3
1 1 2
1 2 1
2
1 2
2 1
1
1
1
Output
YES
2
5 8
1 6
YES
2
1 4
3 6
NO
NO
YES
0
1698F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…