cf/mirror

Dasha and Very Difficult Problem

CF
761D1700· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
5 1 5
1 1 1 1 1
3 1 5 4 2
Output
3 1 5 4 2
Sample 2of 3
Input
4 2 9
3 4 8 9
3 2 1 4
Output
2 2 2 9
Sample 3of 3
Input
6 1 5
1 1 1 1 1 1
2 3 5 4 1 6
Output
-1
761D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)