cf/mirror

Trees in a Row

CF
402B1400· specialist1s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
4 1
1 2 1 5
Output
2
+ 3 2
- 4 1
Sample 2of 2
Input
4 1
1 2 3 4
Output
0
402B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)