QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#282599#7313. Connected Spanning SubgraphMaMengQiRE 16ms5668kbC++17666b2023-12-12 15:21:392023-12-12 15:21:41

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3492kb

input:

2 1
1 2
3 2
1 2
2 3
3 3
1 2
2 3
3 1

output:

1
1
0

result:

ok 3 number(s): "1 1 0"

Test #2:

score: 0
Accepted
time: 16ms
memory: 3500kb

input:

11 14
7 5
2 6
10 3
8 2
8 11
4 6
11 1
5 6
1 10
5 4
5 2
4 3
1 7
8 9
4 4
1 4
2 4
2 3
3 4
10 18
9 10
1 8
10 6
3 5
4 10
10 8
3 1
2 6
4 2
8 2
3 2
5 9
6 5
5 4
8 7
9 7
10 3
1 4
3 2
3 1
2 1
15 27
10 2
3 12
12 6
8 4
5 8
6 9
9 7
4 9
1 6
3 14
13 8
2 12
2 6
8 11
4 11
14 1
15 5
13 11
1 12
15 2
11 15
12 11
15 14
8...

output:

0
0
1
1
0
0
1
1
0
1
1
1
1
1
1
0
1
1
0
1
1
0
0
1
1
0
0
1
1
1
1
1
1
1
1
0
1
0
1
1
1
0
0
1
0
1
1
1
0
0
1
0
1
1
1
0
0
1
1
1
1
1
1
0
0
0
1
0
0
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
1
1
1
1
0
1
1
0
1
0
0
1
1
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
0
0
1
1
1
0
1
0
0
1
0
1
1
0
1
1
0
1
1
1
1
0
1
1
...

result:

ok 20000 numbers

Test #3:

score: 0
Accepted
time: 16ms
memory: 5668kb

input:

55 94
5 23
13 3
5 55
30 41
45 44
54 34
8 13
41 36
48 53
20 55
34 2
42 2
36 45
50 28
18 7
39 35
26 16
31 54
39 1
44 2
52 33
36 55
29 46
40 11
4 9
30 4
24 27
17 26
24 26
26 3
21 49
15 24
30 48
35 22
54 28
23 48
51 49
44 47
9 40
38 11
33 10
36 53
25 20
20 22
42 43
28 31
20 13
12 47
10 1
28 1
19 18
28 9...

output:

0
0
1
1
1
1
0
1
0
1
1
1
1
0
1
1
1
1
0
0
1
0
0
1
0
1
0
0
1
1
0
0
0
1
1
1
0
0
1
1
1
1
1
0
0
0
1
1
0
1
1
0
0
0
0
1
1
1
1
0
1
0
1
1
1
1
1
0
0
1
1
1
0
1
1
1
1
1
0
1
0
0
0
1
1
1
0
1
1
0
0
1
1
0
1
1
1
0
0
1
0
1
0
1
1
1
0
1
0
1
1
1
0
0
0
0
1
1
0
1
1
0
0
1
0
1
1
0
0
0
0
0
0
1
0
1
1
1
0
0
1
1
1
1
1
0
1
1
1
0
...

result:

ok 4000 numbers

Test #4:

score: -100
Runtime Error

input:

196610 200000
163557 46167
70110 195039
189296 55169
106600 109232
146394 167208
137086 164692
35965 104965
133032 14094
49500 133762
45504 158534
136509 113879
29982 20540
143526 32564
110528 178476
139292 128353
154108 113236
18731 137448
7 75423
24744 92890
8773 163226
176473 161156
100983 132320...

output:


result: