cf/mirror

Yet Another MEX Problem

CF
2146E2300· international master2s512 MB⌨ stdin/stdout

Examples

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