cf/mirror

Minimal Subset Difference

CF
924F3200· legendary gm3s256 MB⌨ stdin/stdout
#dp

Examples

Sample 1of 2
Input
10
1 100 0
1 100 1
1 100 2
1 100 3
1 100 4
1 100 5
1 100 6
1 100 7
1 100 8
1 100 9
Output
9
28
44
58
70
80
88
94
98
100
Sample 2of 2
Input
10
1 1000 0
1 1000 1
1 1000 2
1 1000 3
1 1000 4
1 1000 5
1 1000 6
1 1000 7
1 1000 8
1 1000 9
Output
135
380
573
721
830
906
955
983
996
1000
924F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)