cf/mirror

Firefly's Queries

CF
2009F1700· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
5
3 3
1 2 3
1 9
3 5
8 8
5 5
4 8 3 2 4
1 14
3 7
7 10
2 11
1 25
1 1
6
1 1
5 7
3 1 6 10 4
3 21
6 17
2 2
1 5
1 14
9 15
12 13
5 3
4 9 10 10 1
20 25
3 11
20 22
Output
18
8
1
55
20
13
41
105
6
96
62
1
24
71
31
14
44
65
15
2009F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…