cf/mirror

Cyclic Operations

CF
1867D1800· expert1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
6
5 3
2 3 5 3 4
4 2
2 4 3 1
1 1
1
3 1
1 2 3
5 3
5 4 3 2 1
6 1
1 2 3 1 5 6
Output
YES
NO
YES
YES
NO
NO
1867D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…