cf/mirror

Hidden Knowledge of the Ancients

CF
2149E1500· specialist2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
5
1 1 1 1
5
5 2 2 3
1 2 1 3 2
6 3 1 6
1 2 3 1 2 3
4 1 1 2
7 7 7 7
7 3 2 4
1 2 1 2 3 2 1
Output
1
5
10
7
5
2149E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)