| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 4 초 | 2048 MB | 1 | 1 | 1 | 100.000% |
You are given a string $s_1 s_2 \ldots s_n$ of length $n$ with elements from the character set "01?".
For every $k \in [1, n],ドル consider the string $T_k = t_1 t_2 \ldots t_n$ where, for 1ドル \le i \le n$:
?, then $t_i = s_i$.0.It is easy to see that the character set of $T_k$ is "01". You need to calculate the number of 1 in $T_k$ for all $k \in [1, n]$.
The first line of input contains an integer $n$ (1ドル \le n \le 10^5$) representing the length of the string.
The second line contains the string $s_1 s_2 \ldots s_n$ of length $n$ with elements from the character set "01?".
Output $n$ lines, where the $k$-th line contains an integer representing the number of 1 in $T_k$.
5 10?1?
3 4 2 3 2