cf/mirror

Eliminating Balls With Merging (Easy Version)

CF
1998E12200· master4s512 MB⌨ stdin/stdout

Examples

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