cf/mirror

Subset Trick

CF
1500E3300· legendary gm3s512 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
3 11
1 2 3
2 1
1 5
1 6
1 7
2 6
2 2
2 3
1 10
2 5
2 7
2 10
Output
4
1
6
12
19
13
8
2
10
3
0
0
1500E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)