cf/mirror

Submedians (Easy Version)

CF
2128E11900· candidate master3s512 MB⌨ stdin/stdout

Examples

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