cf/mirror

Cycle Palindrome

CF
1656G3200· legendary gm1s256 MB⌨ stdin/stdout

Examples

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