시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 512 MB | 1 | 0 | 0 | 0.000% |
After going in the Public Garden, Antonio returns home, where he finds a string of n non-negative integers and a number X. Feeling bored, he decides to invent a game with this array in n steps. Therefore, at each step, Antonio performs 2 actions:
Determine the values kept in mind by Antonio at each step.
The first line of the input contains the numbers n and X.
On the second line of this file there are n space-separated elements corresponding to the array.
The output has n lines:
The ith line contains two integers separated by a space, the sum of the sums of valid subsequences at step i and their number.
3 5 1 2 3
14 5 15 5 13 5