QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#129248 | #265. 正则二分图匹配 | youngsystem# | 100 ✓ | 2324ms | 234116kb | C++20 | 1.4kb | 2023-07-22 12:11:11 | 2023-07-22 12:11:14 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
inline int read()
{
int n=0,f=1,ch=getchar();
while(ch<'0'||ch>'9')
{
if(ch=='-')f=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9')
{
n=n*10+ch-'0';
ch=getchar();
}
return n*f;
}
int pp[4000005];
int las[10000005];
vector<int>v[2000005];
int xl[10000005],cnt;
int nxl[10000005],ncnt;
mt19937 ran(121296);
int main()
{
int n,d,x;
n=read();
d=read();
for(int i=1;i<=n;i++)
{
for(int j=1;j<=d;j++)
{
x=read()+n;
v[i].push_back(x);
v[x].push_back(i);
}
}
for(int i=1;i<=n;i++)pp[i]=-1;
for(int i=1;i<=n;i++)
{
int now=ran()%n+1;
while(pp[now]!=-1)now=ran()%n+1;
cnt=0;
xl[++cnt]=now;
//printf("???%d\n",now);
while(1)
{
int sth=ran()%d;
while(sth==pp[now])sth=ran()%d;
xl[++cnt]=sth;
int gre=v[now][sth];
if(pp[gre]==0)break;
xl[++cnt]=pp[gre];
now=pp[gre];
}
//printf("orz\n");
for(int i=1;i<=cnt;i+=2)
{
las[xl[i]]=i;
}
ncnt=0;
for(int i=1;i<=cnt;i++)
{
nxl[++ncnt]=xl[i];
if(i%2==1)i=las[xl[i]];
}
//for(int i=1;i<=ncnt;i++)printf("%d ",nxl[i]);
// printf("\n");
for(int i=1;i<=ncnt;i+=2)
{
pp[nxl[i]]=nxl[i+1];
pp[v[nxl[i]][nxl[i+1]]]=nxl[i];
}
/*for(int i=1;i<=2*n;i++)printf("%d ",pp[i]);
printf("\n");
printf("orzfin\n");*/
}
for(int i=1;i<=n;i++)printf("%d ",v[i][pp[i]]-n);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 3.0303
Accepted
time: 70ms
memory: 73456kb
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: 82ms
memory: 63632kb
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: 69ms
memory: 61304kb
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:
2865 66049 55999 65310 3379 35446 52528 50557 58917 64074 9789 6007 28813 38602 18356 20154 34805 27246 5195 21328 57776 50927 40571 65698 31863 34209 12346 34086 37895 59559 14263 52945 37938 18006 40834 46125 48870 52012 63154 63022 276 20156 40790 25549 16498 35787 41413 3746 62477 6160 24902 603...
result:
ok a perfect matching
Test #4:
score: 3.0303
Accepted
time: 23ms
memory: 60404kb
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:
4453 7145 10028 14673 16937 4818 4264 8582 17338 9944 18171 3092 17729 19221 16539 8558 8971 10307 5035 10317 12178 7303 2399 9706 13282 85 1470 1713 10993 18715 15372 13866 16096 19770 14837 1593 6695 18899 19832 10554 7885 14278 19365 18658 13694 11031 14898 14341 14317 3320 13513 14015 11585 2253...
result:
ok a perfect matching
Test #5:
score: 3.0303
Accepted
time: 18ms
memory: 60164kb
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:
798 9994 6798 8593 1201 3598 923 2948 9679 4429 1809 6580 2094 6978 374 5918 9268 7756 6684 2596 9717 2128 1714 830 7059 3064 576 6394 3691 9762 3158 2197 8823 4453 5749 7440 4851 3277 2298 2289 1137 1910 8654 7804 8870 9947 3201 1555 3494 914 3302 167 5003 2774 7145 6898 4824 5751 5473 885 5667 894...
result:
ok a perfect matching
Test #6:
score: 3.0303
Accepted
time: 10ms
memory: 59172kb
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:
738 2362 1340 1545 2367 1246 2859 2992 2168 1367 1137 600 3391 47 1127 3262 1570 1202 2901 3739 720 2169 2591 2291 439 3330 3108 485 528 1762 577 1318 2146 3177 1705 1880 358 1245 413 1692 1025 3743 851 3122 862 2434 354 1468 1755 3884 389 991 427 2382 1000 3173 1180 1691 3401 2605 3657 3847 2260 36...
result:
ok a perfect matching
Test #7:
score: 3.0303
Accepted
time: 10ms
memory: 59284kb
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:
249 979 1589 1223 237 1365 1658 1827 337 549 961 1961 650 1550 454 419 1381 149 1075 749 538 1471 1545 1217 745 1647 1301 1671 35 1753 1740 286 697 314 101 153 49 490 1195 1600 585 1281 1154 1395 1488 1152 1325 891 1504 846 562 1129 682 1594 99 528 363 1118 953 1886 284 1285 362 181 416 1330 1788 17...
result:
ok a perfect matching
Test #8:
score: 3.0303
Accepted
time: 7ms
memory: 59168kb
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:
893 604 311 999 459 813 587 175 145 274 339 240 935 937 116 476 237 411 710 431 817 649 963 89 371 831 78 955 141 675 916 432 119 133 185 500 58 60 487 732 726 774 658 319 690 596 65 53 515 639 968 350 392 866 762 130 655 413 842 481 677 174 603 628 617 131 759 674 463 147 451 308 826 183 889 801 46...
result:
ok a perfect matching
Test #9:
score: 3.0303
Accepted
time: 11ms
memory: 59916kb
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:
136 105 299 433 334 231 204 18 339 219 179 4 262 512 57 381 145 31 181 542 67 441 633 361 557 456 267 345 489 511 454 658 517 94 463 482 93 128 300 309 509 60 325 426 421 472 600 217 52 28 21 221 274 62 480 258 352 450 478 635 595 141 320 444 547 391 610 201 228 447 365 451 156 427 629 120 164 471 7...
result:
ok a perfect matching
Test #10:
score: 3.0303
Accepted
time: 6ms
memory: 58560kb
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:
19 4 14 10 8 13 16 1 3 17 7 2 15 6 18 11 20 12 5 9
result:
ok a perfect matching
Test #11:
score: 3.0303
Accepted
time: 6ms
memory: 58124kb
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: 7ms
memory: 58212kb
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: 892ms
memory: 234116kb
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: 2324ms
memory: 135584kb
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:
754950 628921 173375 609231 217216 755278 781326 439975 210831 427758 254720 568822 836016 31686 266427 321499 726558 630104 766176 117957 987876 767528 973796 850365 38853 24371 91765 642217 81723 373256 138177 522841 42217 556529 938408 460261 83664 133826 956633 793115 243028 474009 63141 276683 ...
result:
ok a perfect matching
Test #15:
score: 3.0303
Accepted
time: 1292ms
memory: 92500kb
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:
38271 41039 465652 55336 141419 468748 114442 26445 141683 389831 416988 288890 160039 184280 6306 157628 65848 132522 27368 186917 255210 5997 54300 68995 418363 408524 32429 392417 54824 55048 85438 141220 142095 195136 414682 430620 97132 349403 380847 58641 307776 220992 434103 66371 371245 4481...
result:
ok a perfect matching
Test #16:
score: 3.0303
Accepted
time: 664ms
memory: 82912kb
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:
164090 19897 152333 209401 106345 4520 106979 150679 103656 54169 136406 150215 224245 207444 135251 21355 223335 62581 10684 20209 234560 238410 209750 154604 82402 185752 111490 54228 84530 205400 70413 46350 247441 126663 114994 88667 72715 11637 102323 98035 231594 200378 20212 39354 27629 12387...
result:
ok a perfect matching
Test #17:
score: 3.0303
Accepted
time: 344ms
memory: 78468kb
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:
17820 70653 91749 69229 53693 75637 76194 121944 9120 80381 71874 48544 57928 34847 28679 103079 42661 31518 60370 78727 17402 64202 65990 17259 101752 12755 45946 80424 40710 60060 106809 99954 94457 100345 90355 52277 43851 34789 104894 114787 106895 87992 12751 106121 67262 26649 75887 2360 12715...
result:
ok a perfect matching
Test #18:
score: 3.0303
Accepted
time: 225ms
memory: 76044kb
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:
3835 37722 57176 24806 50196 14816 43404 42970 57879 27556 54631 5858 30487 53610 19232 60594 60158 28023 14164 19505 28410 60356 18711 5186 3123 31072 33538 20566 21647 30207 57992 14114 34178 58209 34815 61454 29440 41028 27153 33024 35270 32540 41132 16781 38654 19960 25401 54471 60914 61313 5761...
result:
ok a perfect matching
Test #19:
score: 3.0303
Accepted
time: 100ms
memory: 74132kb
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:
5119 13144 5677 10659 10991 4234 15403 11876 1358 1769 5145 11244 1738 8151 3216 7514 3693 3109 10901 7639 978 9007 6422 1803 13705 14744 11259 11399 3932 6914 10653 1467 8460 13142 238 3135 8045 5510 9247 4003 8745 12794 7192 13517 6427 13302 11910 5863 7649 13318 3834 2135 13954 3165 9273 15 5875 ...
result:
ok a perfect matching
Test #20:
score: 3.0303
Accepted
time: 33ms
memory: 73764kb
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:
597 355 611 418 1905 256 784 210 508 1035 169 435 612 1917 578 1693 83 409 106 1674 664 1573 1293 503 1927 630 403 609 244 1584 1667 842 740 762 773 807 1172 1776 1778 1146 1817 1351 318 1303 990 1380 789 1528 493 468 1464 102 1579 362 1063 1668 1257 429 489 1342 465 613 9 1686 1509 1802 673 1485 19...
result:
ok a perfect matching
Test #21:
score: 3.0303
Accepted
time: 34ms
memory: 73328kb
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:
50 156 9 11 89 51 157 74 150 54 117 188 125 52 200 24 179 196 183 67 132 243 25 12 227 75 63 81 98 138 7 107 141 215 27 190 109 90 44 211 41 166 240 43 136 193 160 23 208 22 110 145 143 226 134 40 2 16 69 119 209 103 3 64 37 115 121 140 218 153 220 199 128 94 91 195 165 29 180 34 210 77 170 42 122 4...
result:
ok a perfect matching
Test #22:
score: 3.0303
Accepted
time: 30ms
memory: 72496kb
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:
29 26 17 9 28 7 14 19 23 24 4 1 25 18 16 15 8 20 11 27 5 2 22 3 21 12 10 30 6 13
result:
ok a perfect matching
Test #23:
score: 3.0303
Accepted
time: 22ms
memory: 68680kb
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 3 1
result:
ok a perfect matching
Test #24:
score: 3.0303
Accepted
time: 2084ms
memory: 106688kb
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:
3206 251202 525296 278228 255071 309604 593079 414478 200513 139438 180775 74579 620337 159618 455975 203276 231281 232679 643141 135998 90374 647630 453716 75664 346689 224107 362598 271801 351294 521357 260268 90267 145895 57759 99465 345135 165004 3618 244173 544112 181409 501288 95016 574277 437...
result:
ok a perfect matching
Test #25:
score: 3.0303
Accepted
time: 550ms
memory: 98364kb
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:
2798 138027 97887 153148 76078 109058 118168 92361 55065 74964 116535 112182 72561 24619 22308 114005 162088 97529 178261 175858 146905 51831 191368 120077 84730 169837 41521 113481 153862 133819 133847 151609 162634 145060 18941 173968 113972 181665 75886 76849 166277 68293 186548 47611 157429 1570...
result:
ok a perfect matching
Test #26:
score: 3.0303
Accepted
time: 286ms
memory: 92196kb
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:
69345 90442 25531 4557 15680 10356 59401 13210 44605 738 40195 97348 13209 23625 32245 52325 87856 9938 5936 3676 50206 72864 96741 65852 32496 33779 48611 66746 63393 19158 24828 37797 36027 5279 88472 86371 46749 10412 78236 49486 64153 25789 3363 24031 42520 63598 60030 45502 90645 24901 7583 372...
result:
ok a perfect matching
Test #27:
score: 3.0303
Accepted
time: 163ms
memory: 80092kb
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:
19069 1258 13166 27184 29706 29890 36790 15485 16788 16105 21051 1942 16027 3406 13262 15444 7769 16881 4446 13145 2612 12884 6935 29935 32228 29782 11873 2916 4043 35040 25681 20694 10442 10884 16361 9834 33430 14020 25311 36495 33643 1367 29823 8591 22862 23307 4046 18813 13990 11448 24589 29690 3...
result:
ok a perfect matching
Test #28:
score: 3.0303
Accepted
time: 108ms
memory: 79512kb
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:
4008 6746 9576 5035 19046 12980 14556 5439 19264 3395 19282 7442 19216 4639 2283 13299 3280 17656 5588 18509 14873 7994 2868 16125 10763 11177 9867 5514 16039 15697 19430 16073 18826 17267 11800 14396 4038 15968 6727 11484 175 461 18740 16165 7477 857 9917 1553 14867 8791 12772 847 9424 6449 17478 8...
result:
ok a perfect matching
Test #29:
score: 3.0303
Accepted
time: 70ms
memory: 86576kb
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:
6522 2980 4419 6 4756 6204 3779 1597 3969 2096 3274 2375 4828 2106 3914 3634 1729 4286 753 2323 1402 3591 3488 4652 4633 1398 1401 1421 5794 6137 1265 1862 328 1231 6358 679 469 1449 3072 5564 6499 5200 6096 5790 622 2396 2833 2491 1721 5252 176 749 6566 3753 4422 4041 290 3570 6158 864 5444 1 6102 ...
result:
ok a perfect matching
Test #30:
score: 3.0303
Accepted
time: 50ms
memory: 74072kb
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:
1535 795 1220 77 1395 1857 217 1309 38 1165 1413 515 203 1171 1846 1607 625 814 977 1558 1312 63 1593 1792 1480 1968 1485 1100 375 1080 876 1298 614 1122 1808 352 1912 1118 1281 1107 1861 803 1679 898 576 179 1227 1038 998 759 699 1783 1843 1246 660 626 34 1988 388 1002 750 906 587 900 1720 1238 804...
result:
ok a perfect matching
Test #31:
score: 3.0303
Accepted
time: 21ms
memory: 74088kb
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:
13 22 7 14 15 16 35 34 4 36 20 26 27 9 29 2 40 1 12 28 31 33 23 19 8 21 11 10 6 30 38 39 5 25 17 24 37 18 3 32
result:
ok a perfect matching
Test #32:
score: 3.0303
Accepted
time: 20ms
memory: 76836kb
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:
3 2 4 1
result:
ok a perfect matching
Test #33:
score: 3.0303
Accepted
time: 28ms
memory: 72024kb
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