QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#479732 | #265. 正则二分图匹配 | NOI_AK_ME# | 100 ✓ | 1301ms | 139116kb | C++23 | 629b | 2024-07-15 20:35:47 | 2024-07-15 20:35:47 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int o=2e6+10;
int n,d,p[o],st[o],tp,ptnl[o],ptnr[o];bool vis[o];vector<int> e[o];mt19937 rnd(time(0));
int main(){
scanf("%d%d",&n,&d);
for(int i=1;i<=n;p[i]=i,++i) for(int j=d,u;j--;) scanf("%d",&u),e[i].push_back(u);
shuffle(p+1,p+n+1,rnd);
for(int i=1;i<=n;++i){
for(int j=p[i],k;j;vis[st[++tp]=k]=1,j=ptnr[k]){
do k=e[j][rnd()%d];while(k==ptnl[j]);
for(;vis[k];vis[st[tp--]]=0);
}
for(;tp;vis[st[tp--]]=0) ptnl[ptnr[st[tp]]=ptnr[st[tp-1]]]=st[tp];
ptnr[ptnl[p[i]]=st[1]]=p[i];
}
for(int i=1;i<=n;++i) printf("%d ",ptnl[i]);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 3.0303
Accepted
time: 36ms
memory: 18704kb
input:
200000 1 4860 68405 196988 88061 63179 145556 153543 137408 73529 98133 121426 169157 139971 30468 40561 61417 2377 128946 78342 104898 53132 19812 6001 76501 144382 28176 104732 93137 81527 47685 16750 178443 30278 34394 36927 144836 113402 150495 198662 154016 49033 63788 118907 17990 25923 171718...
output:
4860 68405 196988 88061 63179 145556 153543 137408 73529 98133 121426 169157 139971 30468 40561 61417 2377 128946 78342 104898 53132 19812 6001 76501 144382 28176 104732 93137 81527 47685 16750 178443 30278 34394 36927 144836 113402 150495 198662 154016 49033 63788 118907 17990 25923 171718 199418 8...
result:
ok a perfect matching
Test #2:
score: 3.0303
Accepted
time: 69ms
memory: 12576kb
input:
100000 2 38701 64233 21385 98890 44018 45182 4039 81322 19092 98375 6549 69934 60546 82625 61820 88847 80625 98712 6227 9161 47457 91129 69077 71917 48385 81391 40048 85262 10964 28517 55941 72848 35865 43668 14735 97999 79332 90768 40710 94535 77099 85283 43429 80203 21562 48738 62878 80027 1251 44...
output:
38701 21385 44018 81322 19092 6549 82625 88847 80625 6227 47457 69077 48385 85262 10964 72848 35865 97999 79332 40710 85283 80203 21562 62878 44542 57810 77904 12003 80343 17143 9888 75542 37189 52865 7769 66178 52459 23769 5508 2035 78905 77366 14212 92309 60161 97360 84131 2831 25716 38120 20898 1...
result:
ok a perfect matching
Test #3:
score: 3.0303
Accepted
time: 47ms
memory: 10192kb
input:
66666 3 2865 7709 21957 3002 30528 66049 3259 33642 55999 27855 64335 65310 3379 7925 44323 21726 35131 35446 20806 52528 63257 6408 27039 50557 15771 37822 58917 29235 34506 64074 9789 11376 42730 6007 25251 46717 4858 28813 65939 10460 37494 38602 18356 26954 46940 20154 50645 56311 10095 17174 34...
output:
7709 30528 55999 64335 7925 35446 20806 6408 15771 64074 42730 6007 28813 38602 18356 50645 34805 27246 5195 12848 57776 31765 23515 24590 18532 27065 12346 64048 60419 59559 14263 59567 37938 10322 52273 46125 17419 52012 18633 19284 12216 51908 47574 34335 16498 43328 3448 3746 38803 33775 24902 4...
result:
ok a perfect matching
Test #4:
score: 3.0303
Accepted
time: 23ms
memory: 8224kb
input:
20000 10 4453 4938 7489 8143 8851 14086 15777 15856 19810 19994 1101 1589 3045 4999 7145 8862 10949 13906 14209 19253 813 936 1987 3395 4231 9971 10028 10087 13816 17859 295 1543 6587 10106 10944 11046 12258 14673 15335 16861 1299 1466 3906 4352 4908 5370 12314 15702 16937 18602 1625 1957 1971 4818 ...
output:
14086 10949 17859 12258 5370 10908 15447 5562 9955 16354 18171 12192 14497 19221 3592 19277 15415 17823 18085 2325 18946 2848 4299 3374 373 85 176 5036 13705 14774 5735 1613 16096 783 5344 10358 8574 19442 19832 16555 14268 14278 7660 18658 17280 3601 7838 3147 14164 6096 5179 19505 15909 3876 8155 ...
result:
ok a perfect matching
Test #5:
score: 3.0303
Accepted
time: 17ms
memory: 7700kb
input:
10000 20 798 829 835 1016 1195 2218 3476 3501 3863 4059 4073 4687 6721 7114 7148 7348 8500 8532 8775 9158 541 778 816 1906 2526 2578 3326 3607 4160 4522 4820 6306 6687 6923 8549 8695 8985 9347 9553 9994 159 382 543 648 1201 1650 2562 3014 3235 3376 3505 3876 5740 6798 7148 7580 8320 8525 9424 9521 2...
output:
2218 1906 3376 6051 6290 6604 184 9596 2935 8757 9712 6580 2094 9264 6238 6456 439 8015 5496 4224 654 6294 3860 5222 5462 4255 9462 8430 4901 6220 3746 9409 515 3243 7687 9356 7919 9609 3056 7913 8597 4373 2055 6525 7783 993 9879 1555 5569 7055 3012 8379 7997 4358 4245 6521 9538 8572 4098 914 9372 4...
result:
ok a perfect matching
Test #6:
score: 3.0303
Accepted
time: 15ms
memory: 7148kb
input:
4000 50 330 432 487 676 726 738 833 937 949 954 975 994 1032 1051 1099 1132 1183 1346 1547 1566 1617 1720 1721 1774 1803 1980 2193 2328 2350 2413 2426 2587 2691 2792 2976 3021 3066 3119 3171 3477 3484 3533 3577 3605 3618 3731 3803 3874 3918 3994 28 75 214 265 313 319 335 366 403 556 714 804 924 938 ...
output:
833 3282 1318 2371 70 3635 1127 247 1232 1122 1770 1788 1643 478 672 3241 3859 890 2418 1348 720 830 1061 3085 800 955 2764 2896 69 2531 1827 1161 2303 102 2466 2878 3434 393 3366 1798 1719 632 2629 1323 1228 809 193 2523 2282 908 1336 1077 2938 2723 1616 2024 181 3879 3522 3401 1065 1765 944 506 12...
result:
ok a perfect matching
Test #7:
score: 3.0303
Accepted
time: 13ms
memory: 6996kb
input:
2000 100 4 12 54 56 69 85 113 123 128 183 207 209 212 212 247 249 310 330 347 377 403 409 421 435 484 500 504 526 540 556 571 578 589 648 648 694 727 732 732 790 797 838 871 880 889 950 973 1018 1018 1025 1063 1109 1116 1145 1197 1230 1239 1258 1266 1268 1284 1304 1307 1376 1383 1386 1395 1404 1412 ...
output:
1230 1608 1162 295 1000 1045 393 906 1933 1776 1427 1140 284 1271 1415 110 990 1889 1031 565 712 958 1501 1300 292 1274 947 1915 1998 932 1580 533 101 1401 248 1180 76 111 1018 1515 1388 1622 1522 1626 1382 570 1468 1708 1542 866 1076 1864 264 1818 1496 427 1543 852 1885 1490 1743 1758 362 901 905 1...
result:
ok a perfect matching
Test #8:
score: 3.0303
Accepted
time: 12ms
memory: 7004kb
input:
1000 200 3 9 11 14 28 33 35 38 44 63 74 83 83 95 100 104 106 106 109 118 128 131 132 132 140 142 143 144 145 145 145 149 150 155 161 166 167 172 173 174 174 175 183 190 194 198 201 201 203 203 204 215 217 223 225 242 248 258 267 269 272 272 275 278 281 293 297 299 318 320 334 339 343 344 344 347 348...
output:
835 773 341 124 654 512 775 122 611 613 28 638 819 277 621 739 228 311 675 576 337 844 92 516 586 409 394 465 581 879 498 84 310 347 509 757 242 959 687 490 72 213 500 713 885 660 914 308 155 494 474 71 434 857 762 659 352 400 579 874 678 113 538 407 605 649 350 374 247 281 742 725 994 756 25 264 97...
result:
ok a perfect matching
Test #9:
score: 3.0303
Accepted
time: 9ms
memory: 7376kb
input:
666 300 1 1 5 5 11 13 13 14 19 23 25 25 25 28 31 31 31 34 36 36 37 41 44 44 45 46 52 54 55 57 58 59 61 62 65 66 67 68 71 72 75 81 81 83 84 84 87 90 92 93 93 94 95 99 99 101 103 103 105 115 115 116 117 117 120 120 123 126 131 131 136 137 142 144 151 152 161 161 162 167 169 169 169 173 177 178 184 188...
output:
71 549 22 323 662 420 308 141 92 82 449 271 596 578 150 242 646 197 270 192 96 268 479 404 612 482 198 437 116 236 415 617 350 232 463 586 346 201 568 43 60 134 310 644 401 178 588 653 158 484 650 453 529 219 396 418 658 275 559 462 222 460 369 199 493 65 451 490 524 113 534 139 84 498 545 470 531 2...
result:
ok a perfect matching
Test #10:
score: 3.0303
Accepted
time: 11ms
memory: 6520kb
input:
20 10000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
8 12 20 9 1 10 3 17 16 14 11 7 13 18 2 5 6 19 15 4
result:
ok a perfect matching
Test #11:
score: 3.0303
Accepted
time: 5ms
memory: 6456kb
input:
2 100000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
2 1
result:
ok a perfect matching
Test #12:
score: 3.0303
Accepted
time: 11ms
memory: 6452kb
input:
1 200000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
1
result:
ok a perfect matching
Test #13:
score: 3.0303
Accepted
time: 437ms
memory: 139116kb
input:
2000000 1 387507 1430778 218094 455064 807442 1582214 917699 1655968 1778462 772123 268962 996042 374054 1403419 1624814 36042 813077 1143919 1473390 817258 501378 1317855 1248063 1909613 1978084 1094998 60629 101651 272496 1610999 1051528 859247 300198 1994497 245332 761294 866191 549873 1162726 40...
output:
387507 1430778 218094 455064 807442 1582214 917699 1655968 1778462 772123 268962 996042 374054 1403419 1624814 36042 813077 1143919 1473390 817258 501378 1317855 1248063 1909613 1978084 1094998 60629 101651 272496 1610999 1051528 859247 300198 1994497 245332 761294 866191 549873 1162726 403056 39135...
result:
ok a perfect matching
Test #14:
score: 3.0303
Accepted
time: 1301ms
memory: 74972kb
input:
1000000 2 199363 754950 76613 628921 173375 900947 609231 802901 21413 217216 740983 755278 357523 781326 137929 439975 210831 550908 427758 764273 137762 254720 568822 871564 588642 836016 31686 707140 266427 566788 321499 905137 189618 726558 616699 630104 54080 766176 117957 586699 695703 987876 ...
output:
199363 76613 900947 802901 21413 740983 357523 137929 550908 764273 137762 871564 588642 707140 266427 905137 189618 616699 54080 586699 695703 178663 977706 850365 840677 451100 227766 798274 660136 280560 294316 155987 749454 322629 736226 460261 398160 796647 956633 300748 137995 726017 248166 58...
result:
ok a perfect matching
Test #15:
score: 3.0303
Accepted
time: 666ms
memory: 41288kb
input:
500000 4 38271 230013 254334 270640 41039 61228 344559 469434 263792 361339 441492 465652 55336 132032 276847 276901 14837 141419 213180 305018 165556 253636 256179 468748 49634 114442 197634 309934 26445 46027 179574 201044 141683 182112 384092 450681 260438 356066 389831 392443 247869 290124 41698...
output:
254334 469434 361339 132032 305018 165556 309934 201044 450681 356066 416988 282497 191935 37814 140596 157628 65848 323604 89978 358742 321771 404653 183404 68995 364565 321670 105301 392417 200017 92277 85438 29385 310947 325869 98672 297938 97132 349403 100240 58641 368842 385474 447977 355201 43...
result:
ok a perfect matching
Test #16:
score: 3.0303
Accepted
time: 386ms
memory: 27432kb
input:
250000 8 2631 146917 164090 180005 186384 187359 209401 239796 19897 50857 57851 99955 119125 130482 197939 211046 61602 69725 125661 151789 152333 170938 191567 244630 28250 88386 126306 156434 209401 213742 236654 239399 4661 8624 39270 85312 106345 123219 179670 231814 3378 4520 37957 90740 10263...
output:
186384 99955 170938 213742 85312 37957 30026 38663 142572 243881 68621 150215 30882 5544 172172 135222 42219 206629 10684 131457 167194 40853 191307 167208 233154 223666 111490 95303 84530 51269 223048 219843 247441 30205 76104 88667 72715 145601 154263 122907 110338 80383 1051 150524 45787 100627 7...
result:
ok a perfect matching
Test #17:
score: 3.0303
Accepted
time: 236ms
memory: 19692kb
input:
125000 16 1740 2837 3454 4468 4752 8259 17820 35622 53227 59127 62189 70804 104178 107139 112956 115071 4672 4917 5273 8630 19872 29772 34538 45649 48808 70653 77894 79629 89198 91989 111456 112385 10180 31425 32554 33836 40036 42641 68031 69244 69346 89583 91384 91749 102500 118132 118521 120404 98...
output:
35622 112385 69346 48803 69473 20819 66010 97218 103154 80381 36156 42632 121370 86010 113061 31653 83446 84817 64847 84460 93205 68458 42028 29898 93884 12755 56160 80424 49639 95729 106809 105836 79464 36710 34276 100051 10880 40739 118376 123968 86330 2472 124023 75645 59478 80126 106636 111659 6...
result:
ok a perfect matching
Test #18:
score: 3.0303
Accepted
time: 162ms
memory: 16820kb
input:
62500 32 3835 4069 6664 9493 9882 11044 12096 13503 17277 21165 21387 21724 22795 27921 28532 30505 31535 32452 33959 39348 40644 42723 43420 44352 46706 48636 52153 56846 58062 58696 59340 62159 270 3267 5060 9255 11830 12242 12358 12423 12466 14286 16368 17387 23582 23668 23942 24884 26776 31524 3...
output:
42723 60424 29624 30176 21478 18837 43144 1786 43682 8619 22896 28992 20536 34850 25143 31371 40660 13125 20512 16863 23145 46880 26174 37114 44460 45411 34249 32167 11544 34330 21331 50400 20095 57412 5641 43909 52970 33718 49576 50257 7643 2311 45675 7061 17494 32718 37110 17961 42257 6024 57611 3...
result:
ok a perfect matching
Test #19:
score: 3.0303
Accepted
time: 117ms
memory: 14588kb
input:
15625 128 51 164 216 257 339 348 735 949 1178 1284 1664 1680 1707 1781 1809 1887 2034 2323 2389 2460 2631 2889 3166 3213 3234 3270 3336 3337 3426 3430 3488 3622 3637 3764 3813 3873 3932 4215 4267 4299 4364 4501 4643 4786 5012 5030 5070 5085 5119 5187 5317 5400 5459 5730 5860 5917 6187 6410 6795 7233...
output:
14581 12578 9048 11807 10600 9044 11705 747 1756 11546 8826 13640 10889 15056 1630 7869 7225 4294 15262 9621 5570 13531 11269 13570 6310 9801 4811 7380 6478 13680 7155 1267 10289 10199 10408 13023 12173 13843 8234 13791 1438 5167 944 14342 12748 2829 12272 353 3631 4449 14418 8989 5747 5964 7866 381...
result:
ok a perfect matching
Test #20:
score: 3.0303
Accepted
time: 98ms
memory: 13984kb
input:
1953 1024 1 2 4 6 8 8 9 13 15 15 17 27 31 32 34 35 35 37 38 40 40 42 45 49 50 51 52 57 61 62 63 64 67 69 70 73 79 82 82 83 86 90 91 92 94 100 101 106 106 107 109 111 113 114 116 116 118 120 120 125 127 132 140 147 148 148 153 156 158 159 159 163 165 165 168 169 169 170 170 171 172 173 174 175 176 17...
output:
1769 996 379 500 142 121 597 1567 739 1000 377 1206 244 1290 1016 1704 1660 997 1447 119 1036 99 1791 653 1572 1855 587 672 1929 1413 1851 1178 38 612 154 1083 73 1637 1045 550 546 800 1857 1302 191 758 484 1478 1385 7 322 1196 428 485 666 16 618 1494 812 1037 991 310 419 1041 421 768 281 981 1024 2...
result:
ok a perfect matching
Test #21:
score: 3.0303
Accepted
time: 82ms
memory: 13384kb
input:
244 8192 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5...
output:
185 46 125 150 181 84 2 15 23 155 242 182 211 195 62 108 69 9 148 204 236 20 50 38 68 105 45 240 109 32 163 39 154 189 135 59 19 36 113 74 77 190 137 72 100 173 60 16 227 96 73 157 116 143 158 104 47 5 229 232 121 165 218 178 71 222 138 156 94 22 92 128 191 82 183 133 88 186 54 26 132 193 86 146 79 ...
result:
ok a perfect matching
Test #22:
score: 3.0303
Accepted
time: 84ms
memory: 13552kb
input:
30 65536 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
30 17 20 19 24 21 5 27 18 2 6 9 4 13 11 25 8 12 29 28 23 26 22 3 1 16 7 10 15 14
result:
ok a perfect matching
Test #23:
score: 3.0303
Accepted
time: 66ms
memory: 12544kb
input:
3 524288 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
2 1 3
result:
ok a perfect matching
Test #24:
score: 3.0303
Accepted
time: 854ms
memory: 52976kb
input:
666666 3 3206 64240 199437 251202 414004 479216 133162 349551 525296 267125 278228 385799 255071 266873 648864 203529 309604 516958 227388 593079 647002 98211 414478 512085 200513 287454 395398 81231 139438 488811 180775 408644 487195 74579 149392 515012 466358 589635 620337 159618 186366 345229 255...
output:
199437 479216 525296 267125 255071 516958 647002 512085 287454 139438 487195 74579 466358 186366 255056 281668 231281 85393 491616 204151 554887 578479 453716 202099 346689 224107 362598 406143 351294 347660 544380 113852 145895 228118 11376 234239 12470 450386 477197 293900 146184 501288 95016 4825...
result:
ok a perfect matching
Test #25:
score: 3.0303
Accepted
time: 334ms
memory: 32060kb
input:
200000 10 2798 8208 22730 66600 119481 122650 156801 175474 177550 185015 9474 33088 52512 58337 89617 108000 129764 138027 167767 186477 2825 26827 51804 54149 80285 86265 97887 107376 141558 147823 19363 43877 45893 65333 88598 97896 108948 116509 131339 153148 33060 35928 44747 76078 78934 99908 ...
output:
66600 58337 86265 97896 35928 101045 81072 181073 158350 140958 116535 174024 69136 193722 123863 79730 164135 97529 178261 112354 28444 148110 87350 120077 50784 32843 28909 81894 180252 117420 163250 146660 39133 81049 21109 192091 113972 77652 64327 42952 142310 93117 50822 19302 151649 28636 969...
result:
ok a perfect matching
Test #26:
score: 3.0303
Accepted
time: 245ms
memory: 25316kb
input:
100000 20 5397 8196 10191 10507 18634 28459 29340 32559 40283 40598 53734 65521 67349 68029 69345 71483 76269 82047 84895 88672 4462 14803 19562 24889 25953 28548 32601 34192 34507 38342 48801 54116 68838 73926 78615 79627 83981 88503 90442 93297 13394 25531 37640 43005 43893 48131 51275 52948 59539...
output:
28459 73926 43005 93167 17834 19763 84946 62649 88489 36050 69004 27320 19086 85787 36804 16644 7465 38007 92572 55619 48236 54677 13369 98943 31128 91230 4977 25200 59726 17950 12246 61499 91627 74005 48741 56711 66922 19494 97086 12134 50698 96198 76149 47803 46680 17699 31836 73242 93626 92812 20...
result:
ok a perfect matching
Test #27:
score: 3.0303
Accepted
time: 136ms
memory: 17932kb
input:
40000 50 230 2074 4290 4458 5074 6272 7009 8092 9278 10651 11049 11356 11594 11916 14215 14942 15654 17392 18351 19069 19367 19408 20099 20658 20846 22407 23012 23933 25542 25551 25843 25941 27453 27611 28243 29369 30209 30972 31099 33489 33788 34810 34829 34849 36245 36571 37309 37983 38974 39485 1...
output:
11916 30733 21005 14378 29706 28704 36790 21125 29702 34109 21164 34722 33515 11929 21701 8886 3372 11849 27104 7193 12054 1767 33307 29935 2778 20757 7969 36887 36276 36672 4368 2757 34662 22853 11789 36259 10664 2847 38646 16208 37596 38645 35801 15203 26913 21325 36720 9901 14495 25339 20912 6498...
result:
ok a perfect matching
Test #28:
score: 3.0303
Accepted
time: 110ms
memory: 19088kb
input:
20000 100 346 384 416 439 566 781 899 950 1359 1370 1969 2025 2031 2043 2510 2703 3581 3610 3956 3960 3987 4008 4035 4392 4409 4853 5049 5092 5101 5955 6051 6132 6184 6260 6463 6632 6725 6995 7298 8049 8324 8349 8720 9111 9137 9233 9328 9353 9366 9405 9427 9496 9571 9572 9588 9641 9780 9879 10102 10...
output:
2025 11152 14787 60 3233 11220 3808 5537 1084 4118 16986 8624 14020 11769 2396 10401 15219 18415 12671 10202 4203 15208 16012 9214 13759 15042 9931 7242 18226 13071 4193 2452 9733 6624 17152 12547 12594 5128 2047 6434 2737 11450 19330 9484 11008 19864 1370 10592 8732 2385 8639 15491 13818 6449 19798...
result:
ok a perfect matching
Test #29:
score: 3.0303
Accepted
time: 107ms
memory: 19728kb
input:
6666 300 16 22 93 102 144 171 192 203 255 266 282 288 363 364 371 371 379 394 409 477 495 497 500 515 654 696 706 718 789 797 810 816 826 826 827 833 844 854 911 913 933 980 982 1006 1055 1078 1087 1116 1130 1139 1178 1245 1266 1367 1386 1447 1463 1468 1472 1489 1492 1495 1502 1513 1519 1526 1527 15...
output:
288 4784 6317 823 5457 2049 1912 4898 5175 6233 6207 4667 5642 5803 3867 5753 6116 2441 4047 403 4445 2241 5126 4760 1881 2254 4107 4502 4788 6052 5847 3535 6580 6289 4637 4636 1221 5470 2260 2589 5993 2138 674 5498 6319 1892 5886 4151 3763 4344 570 2612 4936 4602 4420 1683 4345 4021 2167 4436 6110 ...
result:
ok a perfect matching
Test #30:
score: 3.0303
Accepted
time: 86ms
memory: 14176kb
input:
2000 1000 2 3 6 14 17 20 23 23 25 25 28 30 32 32 34 36 38 39 40 41 41 42 42 48 52 52 53 54 54 54 56 60 60 60 61 61 66 67 67 68 70 72 80 83 85 86 87 89 89 90 90 91 92 95 96 98 105 108 109 110 110 113 114 116 118 119 122 124 127 130 131 132 133 134 134 135 143 147 149 152 154 156 161 163 163 165 165 1...
output:
1465 1782 338 950 1227 1759 1661 520 1305 1258 1545 766 902 941 31 1574 332 325 1695 1455 506 1323 654 1669 48 245 1860 379 889 157 307 342 1322 741 1801 1573 1150 905 672 357 759 504 1200 1406 1450 445 1824 1935 1268 512 1226 259 1273 83 258 335 805 897 1808 1898 1151 1928 1901 648 1142 777 1471 86...
result:
ok a perfect matching
Test #31:
score: 3.0303
Accepted
time: 74ms
memory: 13556kb
input:
40 50000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
32 30 4 36 35 17 21 29 9 15 14 28 19 1 40 34 13 16 8 18 26 27 11 3 10 39 24 31 22 25 5 12 23 7 37 20 6 2 38 33
result:
ok a perfect matching
Test #32:
score: 3.0303
Accepted
time: 72ms
memory: 14152kb
input:
4 500000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
1 2 3 4
result:
ok a perfect matching
Test #33:
score: 3.0303
Accepted
time: 79ms
memory: 13652kb
input:
1 2000000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
1
result:
ok a perfect matching