Dasha and Very Difficult Problem
761D1700· expert2s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
5 1 51 1 1 1 13 1 5 4 2
Output
3 1 5 4 2
Sample 2of 3
Input
4 2 93 4 8 93 2 1 4
Output
2 2 2 9
Sample 3of 3
Input
6 1 51 1 1 1 1 12 3 5 4 1 6
Output
-1
58%
761D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)