QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#871178#8613. Cardinalityucup-team311#RE 1ms3712kbC++233.1kb2025-01-25 19:46:062025-01-25 19:46:06

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3712kb

input:

4 5
1 2
2 3
5 6
6 7
4 7

output:

2
2
3
3
5

result:

ok 

Test #2:

score: 0
Accepted
time: 1ms
memory: 3712kb

input:

10 100
9 2
9 10
5 1
6 6
13 14
3 4
3 8
8 4
16 5
14 2
8 13
14 9
6 17
15 11
24 7
24 20
1 26
14 27
6 18
14 14
15 11
14 25
8 11
7 30
3 11
12 3
6 19
29 36
30 9
38 6
2 28
12 40
33 25
20 42
17 30
23 1
34 41
41 36
7 18
39 45
32 4
30 21
46 26
12 39
42 42
46 48
31 54
16 37
42 4
27 34
10 35
11 12
1 35
51 23
17 ...

output:

2
2
3
1
5
2
2
2
3
3
4
3
3
7
8
7
7
7
3
1
7
8
4
2
3
3
6
6
3
6
7
6
8
8
3
4
8
9
3
5
9
6
8
4
6
9
8
6
6
8
5
4
5
10
3
2
6
10
8
8
8
10
10
7
9
10
4
10
7
8
8
3
9
6
2
9
8
10
8
7
8
9
8
10
9
3
2
8
8
4
7
10
3
8
6
10
7
10
10
9

result:

ok 

Test #3:

score: 0
Accepted
time: 1ms
memory: 3712kb

input:

100 100
82 51
68 54
25 11
21 47
84 43
78 91
1 88
29 50
10 62
38 29
100 65
23 4
77 10
29 7
59 39
56 81
73 3
113 10
49 25
59 103
20 40
42 55
46 87
9 26
30 43
70 97
7 12
2 54
41 68
82 60
129 69
86 82
85 38
105 71
81 58
59 36
76 111
10 68
108 19
46 31
127 60
35 120
79 125
138 21
14 10
64 72
140 127
126 ...

output:

2
3
4
3
3
3
2
2
2
2
2
3
2
2
2
2
2
2
4
6
3
2
2
3
3
3
3
3
3
2
4
2
2
4
3
3
4
2
4
2
4
8
4
4
2
2
5
4
4
4
2
3
7
3
2
5
3
6
4
5
5
2
6
6
3
7
3
4
7
3
3
4
3
4
9
2
7
4
4
4
3
6
4
2
3
4
10
5
5
4
3
3
9
5
2
5
6
5
3
5

result:

ok 

Test #4:

score: -100
Runtime Error

input:

1000 1000
89 983
726 406
473 684
779 306
5 585
185 774
484 220
988 291
857 606
783 143
238 193
187 68
342 227
833 183
645 453
714 271
717 845
811 608
601 1013
101 716
563 790
500 449
962 863
255 787
236 837
560 412
788 681
487 992
311 884
389 251
199 927
942 1013
760 829
794 763
323 37
380 773
520 9...

output:

3
2
3
3
4
2
2
2
2
2
2
2
2
3
2
2
2
2
3
3
3
3
3
3
2
2
2
3
3
3
3
3
2
3
2
2
2
3
3
4
3
3
2
3
3
3
2
2
2
3
2
2
3
3
3
3
3
2
5
2
2
3
5
6
2
4
2
3
2
2
2
3
3
6
3
4
2
2
2
3
3
3
2
2
3
2
2
2
2
3
2
4
2
2
2
3
3
2
5
2
3
2
4
2
3
3
2
2
2
3
2
2
2
7
5
2
3
7
3
3
2
3
5
2
2
3
2
3
4
3
2
3
2
3
2
2
3
2
2
3
4
2
3
3
2
3
4
3
2
4
...

result: