Lisa's Sequences
1773L3500· legendary gm5s1024 MB⌨ stdin/stdout
Examples
Sample 1of 9
Input
5 31 2 3 4 5
Output
21 0 3 0 5
Sample 2of 9
Input
6 31 1 1 1 1 1
Output
31 100000 0 1 0 1
Sample 3of 9
Input
6 41 1 4 4 1 1
Output
11 1 4 0 1 1
Sample 4of 9
Input
6 44 4 4 2 2 2
Output
24 4 0 2 0 2
Sample 5of 9
Input
6 44 4 4 3 4 4
Output
14 4 100000 3 4 4
Sample 6of 9
Input
8 42 1 1 3 3 1 1 2
Output
22 1 1 3 0 1 0 2
Sample 7of 9
Input
10 41 1 1 2 2 1 1 2 2 1
Output
21 1 100000 2 2 100000 1 2 2 1
Sample 8of 9
Input
7 55 4 4 3 4 4 4
Output
05 4 4 3 4 4 4
Sample 9of 9
Input
10 101 1 1 1 1 1 1 1 1 1
Output
11 1 1 1 1 1 1 1 0 1
58%
1773L.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)