Multiple Testcases
1342D1900· candidate master2s256 MB⌨ stdin/stdout
Examples
Sample 1of 4
Input
4 31 2 2 34 1 1
Output
31 22 1 31 2
Sample 2of 4
Input
6 105 8 1 10 8 76 6 4 4 3 2 2 2 1 1
Output
23 8 5 73 10 8 1
Sample 3of 4
Input
5 11 1 1 1 15
Output
15 1 1 1 1 1
Sample 4of 4
Input
5 11 1 1 1 11
Output
51 11 11 11 11 1
58%
1342D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)