=== Case 1 === Input {{{~cpp 5 5 0 0 22224444346 999 }}} Output {{{~cpp 11 2 1 1 1 1 1 0 0 0 2 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 }}} === Case 2 === Input {{{~cpp 5 5 0 0 222224 999 }}} Output {{{~cpp 6 2 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }}} === Case 3 === Input {{{~cpp 5 5 0 0 44444444444444444444 999 }}} Output {{{~cpp 20 5 0 0 0 0 4 0 0 0 0 4 0 0 0 0 4 0 0 0 0 4 0 0 0 0 }}} === Case 4 === Input {{{~cpp 3 3 0 0 44220064 999 }}} Output {{{~cpp 8 1 1 1 1 1 1 1 1 1 }}} ---- ["RandomWalk2"]