cf/mirror

Eliminating Balls With Merging (Hard Version)

CF
1998E22500· grandmaster4s512 MB⌨ stdin/stdout

Examples

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