cf/mirror

Beautiful Problem

CF
2162H2900· international gm2s256 MB⌨ stdin/stdout
#dp

Examples

Sample 1of 1multi-test • hover to link
Input
4
4 2
1 1 3 4
1 2
2 4
3 2
1 1 3
1 2
2 3
3 1
1 1 1
1 3
9 3
4 5 9 1 1 1 2 2 3
1 6
3 7
7 9
Output
1011
101
111
100100001
2162H.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)