QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#318624 | #5379. Adjoin the Networks | lmq26052003 | AC ✓ | 68ms | 13920kb | C++20 | 1.6kb | 2024-01-31 16:16:11 | 2024-01-31 16:16:11 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 3ms
memory: 3844kb
input:
6 4 0 1 0 2 3 4 3 5
output:
3
result:
ok single line: '3'
Test #2:
score: 0
Accepted
time: 2ms
memory: 3612kb
input:
11 9 0 1 0 3 0 4 1 2 5 4 6 4 7 8 7 9 7 10
output:
4
result:
ok single line: '4'
Test #3:
score: 0
Accepted
time: 3ms
memory: 5600kb
input:
5 0
output:
2
result:
ok single line: '2'
Test #4:
score: 0
Accepted
time: 2ms
memory: 3836kb
input:
6 3 0 1 2 3 4 5
output:
4
result:
ok single line: '4'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
21 6 0 1 1 2 2 3 4 5 5 6 6 7
output:
5
result:
ok single line: '5'
Test #6:
score: 0
Accepted
time: 2ms
memory: 3612kb
input:
12 6 0 1 1 2 2 3 3 4 4 5 5 6
output:
6
result:
ok single line: '6'
Test #7:
score: 0
Accepted
time: 2ms
memory: 3588kb
input:
12 7 0 1 1 2 2 3 3 4 4 5 5 6 6 7
output:
7
result:
ok single line: '7'
Test #8:
score: 0
Accepted
time: 2ms
memory: 3616kb
input:
15 8 0 1 1 2 2 3 3 4 5 6 6 7 7 8 8 9
output:
5
result:
ok single line: '5'
Test #9:
score: 0
Accepted
time: 2ms
memory: 3604kb
input:
16 10 0 1 1 2 2 3 3 4 4 5 6 7 7 8 8 9 9 10 10 11
output:
7
result:
ok single line: '7'
Test #10:
score: 0
Accepted
time: 2ms
memory: 3548kb
input:
30 12 0 1 1 2 2 3 3 4 5 6 6 7 7 8 8 9 10 11 11 12 12 13 13 14
output:
6
result:
ok single line: '6'
Test #11:
score: 0
Accepted
time: 2ms
memory: 3812kb
input:
50 15 0 1 1 2 2 3 3 4 4 5 6 7 7 8 8 9 9 10 10 11 12 13 13 14 14 15 15 16 16 17
output:
8
result:
ok single line: '8'
Test #12:
score: 0
Accepted
time: 42ms
memory: 10872kb
input:
100000 90000 2 1 0 9 9 7 9 2 3 9 5 7 8 0 6 9 4 1 18 16 12 16 18 17 16 13 17 14 18 11 10 16 11 15 19 16 29 22 28 25 22 26 21 26 23 24 25 24 26 23 21 20 27 25 35 37 32 31 35 31 34 37 38 35 33 32 36 30 30 32 37 39 44 45 46 41 48 47 48 46 48 42 49 41 44 48 43 46 44 40 59 54 51 57 55 56 53 50 57 50 56 59...
output:
12
result:
ok single line: '12'
Test #13:
score: 0
Accepted
time: 41ms
memory: 11156kb
input:
100000 90000 7 3 8 2 4 5 2 0 6 4 5 2 7 2 9 0 1 3 18 14 17 19 16 11 13 11 15 17 10 19 19 13 14 10 12 15 22 24 23 21 23 25 22 23 28 25 20 25 23 27 29 27 26 20 36 38 35 37 34 31 35 39 30 33 39 33 33 34 32 35 39 38 44 45 41 49 46 48 44 43 48 49 41 42 42 45 47 46 40 45 52 50 56 50 57 54 53 56 52 55 58 51...
output:
12
result:
ok single line: '12'
Test #14:
score: 0
Accepted
time: 48ms
memory: 10548kb
input:
100000 98199 10 1 14 1 3 10 2 0 2 1 13 11 15 10 11 8 8 15 5 0 6 5 7 6 9 12 14 12 4 2 19 22 22 51 26 34 42 27 39 22 43 38 17 28 20 55 50 18 29 32 42 19 50 20 30 22 38 48 54 44 22 54 35 37 57 21 45 40 23 27 32 39 52 30 31 27 56 22 33 25 44 20 46 55 32 21 21 24 48 24 38 40 26 21 35 54 20 17 33 56 17 16...
output:
36
result:
ok single line: '36'
Test #15:
score: 0
Accepted
time: 51ms
memory: 12552kb
input:
100000 98171 18 4 7 30 13 24 14 16 14 12 25 29 12 32 24 16 27 32 23 30 5 3 22 17 0 4 18 3 19 31 4 1 5 20 30 5 32 7 17 12 33 14 23 25 19 0 11 16 10 13 9 8 21 11 29 6 20 9 4 26 15 10 28 1 2 14 40 61 71 39 48 50 57 66 36 37 68 57 45 67 47 43 76 50 61 43 73 54 78 65 42 74 45 56 40 52 50 44 46 34 65 73 3...
output:
36
result:
ok single line: '36'
Test #16:
score: 0
Accepted
time: 50ms
memory: 10440kb
input:
100000 99812 702 5 841 689 194 294 173 638 573 242 665 294 496 24 510 584 874 125 366 577 748 702 605 797 23 143 329 195 565 544 364 772 874 434 747 226 231 735 831 514 6 184 35 250 316 235 584 178 140 858 14 81 190 250 813 726 202 53 309 804 421 238 64 458 799 446 496 743 553 22 485 581 198 568 642...
output:
91
result:
ok single line: '91'
Test #17:
score: 0
Accepted
time: 50ms
memory: 10596kb
input:
100000 99795 480 144 267 559 338 296 318 361 582 446 68 86 576 708 752 15 382 556 181 25 482 652 548 302 525 288 457 94 790 654 783 600 444 434 67 323 753 384 326 589 188 763 542 35 554 803 8 196 145 271 508 174 668 462 780 781 147 55 55 673 441 477 443 363 581 42 201 521 666 826 532 691 237 73 350 ...
output:
87
result:
ok single line: '87'
Test #18:
score: 0
Accepted
time: 54ms
memory: 10688kb
input:
100000 99796 61 781 91 35 57 579 751 16 637 337 299 516 428 62 96 270 328 491 244 758 750 502 113 16 379 341 57 71 678 116 454 323 668 262 677 118 643 289 332 547 741 423 262 383 230 456 720 699 207 576 362 590 359 439 335 13 622 772 609 365 139 5 634 566 269 45 684 744 623 439 555 736 632 320 171 4...
output:
93
result:
ok single line: '93'
Test #19:
score: 0
Accepted
time: 50ms
memory: 10684kb
input:
100000 99796 106 342 493 567 619 386 486 59 97 325 76 418 547 456 457 212 483 354 266 7 424 154 421 184 259 378 22 568 445 220 601 535 259 6 586 132 86 297 398 233 435 169 374 566 147 396 494 381 428 435 368 245 70 237 573 228 609 210 421 585 39 520 26 83 322 526 233 69 345 77 505 497 375 539 369 52...
output:
92
result:
ok single line: '92'
Test #20:
score: 0
Accepted
time: 50ms
memory: 10444kb
input:
100000 99805 16 3 1 12 0 1 20 12 4 5 24 16 14 11 3 5 10 2 18 7 4 23 10 21 18 10 21 0 13 9 9 23 24 19 6 22 17 13 21 22 5 12 6 15 10 14 8 16 113 81 107 55 55 133 33 83 177 82 138 134 109 89 96 77 112 117 164 90 124 164 146 176 67 25 35 90 113 96 159 110 119 75 143 128 45 110 170 30 123 72 170 140 113 ...
output:
102
result:
ok single line: '102'
Test #21:
score: 0
Accepted
time: 50ms
memory: 12128kb
input:
100000 99785 21 415 487 341 345 464 324 472 380 81 317 262 200 298 258 250 97 46 309 34 153 507 105 53 23 259 89 156 74 62 445 133 167 203 359 19 343 75 22 262 405 338 34 471 321 173 38 358 76 26 404 30 81 42 148 298 394 90 107 338 469 199 193 65 182 316 192 253 36 20 29 62 349 139 227 115 240 359 2...
output:
90
result:
ok single line: '90'
Test #22:
score: 0
Accepted
time: 29ms
memory: 12268kb
input:
100000 60080 0 1 4 3 3 2 7 5 7 6 10 8 8 9 12 11 14 13 15 16 18 17 20 21 19 20 23 22 22 24 26 25 26 27 29 28 32 31 30 32 33 34 35 34 37 36 38 39 40 38 43 42 42 41 45 46 44 46 48 49 49 47 52 51 50 52 54 53 55 57 56 55 60 59 60 58 62 61 64 63 65 66 69 67 67 68 71 72 72 70 73 75 73 74 76 78 76 77 80 79 ...
output:
4
result:
ok single line: '4'
Test #23:
score: 0
Accepted
time: 53ms
memory: 12192kb
input:
100000 99976 6128 3393 4436 6864 8531 7569 6192 4683 3850 3439 6546 8101 4129 4895 2234 8384 7232 3562 5017 2796 1998 4823 2879 3445 2377 4176 3668 5940 484 6260 1386 4596 4268 5277 4987 34 7200 1382 3540 1692 1286 5825 2196 2674 390 386 3466 1944 2587 2879 511 4735 8527 3056 3702 7603 5107 1670 525...
output:
202
result:
ok single line: '202'
Test #24:
score: 0
Accepted
time: 57ms
memory: 10536kb
input:
100000 99976 1854 3179 5571 5265 4288 5061 5187 875 1404 5873 2964 5177 6601 3668 6436 1531 1622 1947 2259 3534 1859 3199 2358 4318 2760 5546 6112 1516 1778 85 3994 4261 5484 4445 3103 3852 2421 4825 2292 6121 3421 6318 3460 5489 1392 2651 3055 3860 5481 1162 1571 898 6482 4370 5790 946 1775 2423 49...
output:
174
result:
ok single line: '174'
Test #25:
score: 0
Accepted
time: 54ms
memory: 13920kb
input:
100000 99971 3170 5719 1188 1567 2199 1675 4522 2636 5922 5891 3327 153 6097 3515 1461 3247 1673 2932 4762 3303 4712 5026 3759 58 1362 3375 5015 466 2493 6550 5357 5359 6146 1270 3383 484 2720 3060 3608 5000 2540 4460 4092 2632 334 2129 4596 3552 3596 5495 3191 6551 3759 5052 6639 3503 1973 701 6764...
output:
189
result:
ok single line: '189'
Test #26:
score: 0
Accepted
time: 60ms
memory: 10288kb
input:
100000 99997 56116 15282 22679 59145 6346 43459 3870 1186 46564 47204 33506 10508 9275 30899 45937 27189 27299 58186 49274 58115 27690 60024 16809 48425 10687 55644 47968 3023 61433 35729 39870 26259 34750 57753 12599 13753 55252 35025 16169 8468 60233 45702 62040 13044 8339 37933 62261 57250 49874 ...
output:
453
result:
ok single line: '453'
Test #27:
score: 0
Accepted
time: 57ms
memory: 10072kb
input:
100000 99997 24765 42431 33544 53646 53714 70164 2925 24974 10431 37460 76353 66979 43727 70384 56360 28051 29214 12475 1605 58619 34116 64233 11670 15030 23763 7254 26692 55986 43413 76493 16401 68119 48938 65439 44618 52073 33749 33776 21950 70949 68699 62340 8570 40266 64344 72729 50174 19353 612...
output:
379
result:
ok single line: '379'
Test #28:
score: 0
Accepted
time: 55ms
memory: 10284kb
input:
100000 99996 15683 12275 133 21871 10963 550 22229 6554 22841 12012 1618 6391 21760 17847 1636 18522 11274 21853 20312 23586 23763 16557 6821 15000 8473 11616 24412 25205 21616 21758 2381 15378 8297 11963 25227 10207 12288 3274 25872 16530 19579 24330 4280 1303 25234 19211 10510 22280 1234 17470 116...
output:
263
result:
ok single line: '263'
Test #29:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
10 5 1 0 2 3 5 4 6 7 9 8
output:
4
result:
ok single line: '4'
Test #30:
score: 0
Accepted
time: 6ms
memory: 11500kb
input:
100000 0
output:
2
result:
ok single line: '2'
Test #31:
score: 0
Accepted
time: 68ms
memory: 10080kb
input:
100000 99998 89101 63867 16354 82857 31040 56086 99478 73768 59816 34837 14180 58574 6001 37861 46930 30937 1208 97408 32574 80717 80143 89598 44822 22281 18802 18773 24276 44534 93272 55830 69834 69715 59702 72298 75984 51421 18779 54239 34017 76575 58279 23422 84865 81667 35838 87818 74480 31417 2...
output:
439
result:
ok single line: '439'