cf/mirror

Trees and Segments

CF
1858D2200· master3s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
5
3 0
111
4 1
0110
5 0
10000
6 2
101101
7 1
0001101
Output
3 3 3
4 5 7 9
5 9 13 17 21
6 9 13 17 21 25
7 10 13 17 21 25 29
1858D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)