QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#69169#5337. Making Friendslarryzhong100 ✓177ms33796kbC++17624b2022-12-24 18:01:022022-12-24 18:01:04

详细

Test #1:

score: 5.88235
Accepted
time: 2ms
memory: 3404kb

input:

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

output:

5

result:

ok single line: '5'

Test #2:

score: 5.88235
Accepted
time: 2ms
memory: 3424kb

input:

500 500
93 218
275 474
211 161
103 350
243 150
410 311
250 68
93 360
427 274
89 424
253 149
215 59
248 64
111 114
111 289
234 184
328 321
332 253
397 496
75 82
483 255
445 497
130 284
219 177
138 268
408 273
412 184
111 204
216 124
471 497
352 401
241 383
147 214
381 179
356 492
443 253
130 287
417 ...

output:

9793

result:

ok single line: '9793'

Test #3:

score: 5.88235
Accepted
time: 51ms
memory: 9320kb

input:

500 124750
59 319
110 382
338 175
138 356
25 420
352 51
265 286
488 240
218 374
224 207
204 358
80 354
259 171
136 400
343 155
235 103
433 342
424 101
238 96
280 20
125 142
460 134
485 439
192 227
445 150
161 328
410 153
73 255
131 470
389 303
339 405
433 11
106 248
435 488
292 320
114 153
166 173
1...

output:

0

result:

ok single line: '0'

Test #4:

score: 5.88235
Accepted
time: 82ms
memory: 13404kb

input:

5000 200000
4836 4504
4279 4864
3489 2988
1123 4882
4516 1265
26 3897
1808 4315
1959 820
45 3063
3220 221
2181 96
3932 4726
866 2207
880 3004
4218 3667
4352 2640
2609 1305
792 1144
2623 904
2008 1206
1985 3164
694 3838
1878 1759
3434 1794
2774 1265
4478 4648
3188 4055
379 2489
4592 4736
4382 4151
17...

output:

11670941

result:

ok single line: '11670941'

Test #5:

score: 5.88235
Accepted
time: 134ms
memory: 14068kb

input:

10000 200000
552 2220
3638 2068
4885 899
7660 3542
9909 2969
6495 808
2426 4414
8800 1110
1191 4143
6288 5237
6000 7319
934 2847
8335 3276
9581 1657
906 9603
4775 244
8434 6999
230 5632
6910 17
6398 9257
7206 2591
1998 8705
5755 23
9815 646
3416 8138
7709 1955
292 9347
1115 4744
9650 2754
8167 9431
...

output:

44970718

result:

ok single line: '44970718'

Test #6:

score: 5.88235
Accepted
time: 102ms
memory: 12888kb

input:

10000 200000
23 9475
21 643
3 9851
6085 14
4829 9
11 7551
13 2399
7244 17
4731 21
22 8018
2 6739
3571 21
4426 18
4 849
2179 11
4603 18
7877 7
7201 15
8819 24
3060 7
19 3883
11 7101
9273 12
2439 18
596 10
4912 20
1517 5
9 6139
3958 5
5559 22
4624 23
21 8837
16 4162
9463 11
5519 21
4 4640
2 4076
24 9
...

output:

49792519

result:

ok single line: '49792519'

Test #7:

score: 5.88235
Accepted
time: 87ms
memory: 14124kb

input:

10000 200000
764 2274
4385 9783
9780 3081
5012 868
160 2685
6793 8689
3930 3810
6724 2882
3460 2134
2626 9313
2549 6006
1741 2304
9092 9377
5235 3847
6691 1934
4827 2049
3724 9513
3659 2766
7687 9580
5727 1428
4529 5473
2828 6575
4591 4334
9863 4130
1805 3434
5040 4224
6344 6570
4052 4149
4396 923
6...

output:

44849714

result:

ok single line: '44849714'

Test #8:

score: 5.88235
Accepted
time: 118ms
memory: 26940kb

input:

200000 200000
174693 2223
75507 173846
84474 46548
86098 153219
174425 104540
29307 111076
80539 152186
123942 4257
96429 57818
66758 10763
58431 13163
25573 60126
88050 14190
189049 78731
69096 134720
5747 66531
114074 76195
187769 56419
22763 86499
160218 12752
13739 129760
159122 137394
91094 181...

output:

1042760514

result:

ok single line: '1042760514'

Test #9:

score: 5.88235
Accepted
time: 144ms
memory: 26868kb

input:

200000 200000
2075 72896
99159 1509
2665 28424
83705 27507
16813 79181
33357 63145
146938 190201
139827 140316
27203 179609
110616 109572
125916 77299
127919 164981
75045 188113
196680 20893
104222 13535
41895 129914
196130 194177
116355 48626
9341 181263
69384 14903
86982 122113
28033 95599
195752 ...

output:

1047015143

result:

ok single line: '1047015143'

Test #10:

score: 5.88235
Accepted
time: 112ms
memory: 27120kb

input:

200000 200000
154271 59755
88607 126735
99706 116669
39615 141848
33824 52723
136770 137078
67217 790
162531 39626
175530 144357
183562 108181
82737 108514
74672 116785
88371 165223
123559 56718
11290 130085
2358 161051
66380 181737
18093 67103
15372 22798
9380 88001
109522 146353
153382 39792
61959...

output:

1037032039

result:

ok single line: '1037032039'

Test #11:

score: 5.88235
Accepted
time: 110ms
memory: 26936kb

input:

200000 200000
13662 36056
38825 92648
84044 21036
179276 2557
18564 188369
142758 145999
157084 178788
147373 33019
194022 4097
63276 155627
151802 184263
68928 37943
22334 172808
142551 154973
11136 156668
80339 124262
143576 179540
110482 101290
197343 135787
47977 85434
12738 8602
14006 95295
120...

output:

1057227267

result:

ok single line: '1057227267'

Test #12:

score: 5.88235
Accepted
time: 73ms
memory: 21588kb

input:

200000 199999
89248 100000
17288 100000
100000 70099
100000 59090
100000 145197
135205 100000
96310 100000
100000 37977
181461 100000
100000 191554
112633 100000
100000 188643
100000 140594
40534 100000
100000 28861
32875 100000
100000 7487
100000 197320
24322 100000
84349 100000
157892 100000
10000...

output:

4999950000

result:

ok single line: '4999950000'

Test #13:

score: 5.88235
Accepted
time: 49ms
memory: 21708kb

input:

200000 200000
121473 200000
200000 178604
151723 200000
121474 200000
200000 77612
132388 199999
199999 144012
199999 99405
106120 199999
199999 122896
144580 200000
199999 107682
124892 199999
200000 57756
157541 199999
39368 200000
200000 108621
102320 199999
199999 23673
200000 167337
123628 1999...

output:

0

result:

ok single line: '0'

Test #14:

score: 5.88235
Accepted
time: 80ms
memory: 22712kb

input:

200000 200000
184386 100000
100000 73260
99999 40259
100000 63888
107807 100000
100000 106995
100000 193273
100000 43794
69069 100000
45319 100000
100000 22364
159902 99999
100000 106867
100000 23526
99999 143699
100000 196570
2314 100000
100000 176702
139357 99999
196690 99999
37969 99999
99999 725...

output:

2809638269

result:

ok single line: '2809638269'

Test #15:

score: 5.88235
Accepted
time: 177ms
memory: 33796kb

input:

200000 200000
162723 4245
22199 272
1378 185336
164467 1530
42424 559
6500 4589
110181 3589
84482 4036
141189 837
198 23321
4993 164693
17481 3803
2549 54737
548 95535
74070 708
70106 1495
164224 3329
117761 3116
2100 138961
26741 1953
132814 399
392 117787
96710 146
664 156505
3198 29663
4874 68003...

output:

7599654801

result:

ok single line: '7599654801'

Test #16:

score: 5.88235
Accepted
time: 116ms
memory: 24164kb

input:

200000 200000
1 65334
2 61726
1 140899
130770 2
168914 1
34206 2
112792 2
70414 1
2 72310
61633 1
1 79011
2 54929
1 164253
39905 2
176563 2
1 90542
19295 1
165614 1
197077 2
1 23540
49001 2
1 157881
1 156372
57520 1
2 115212
1 152091
127516 2
78326 2
124358 1
199871 2
153131 1
1 164786
2 141681
1189...

output:

11212156878

result:

ok single line: '11212156878'

Test #17:

score: 5.88235
Accepted
time: 86ms
memory: 21724kb

input:

200000 200000
1 186687
1 12389
1 121975
168623 1
1 151266
69659 1
1 157700
1 144532
1 147765
1 191141
27509 1
157782 1
1 175077
1 182609
1 83843
1 5781
1 73038
1 81489
66675 1
15077 1
1 184982
195047 1
1 44949
1 153871
1 75510
1 139020
1 105740
1 171350
1 182523
100886 1
44907 1
1 133941
125600 1
1 ...

output:

19999700000

result:

ok single line: '19999700000'