QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#505635 | #3486. Pairing Socks | xiaowuc1 | AC ✓ | 13ms | 5512kb | C++17 | 2.3kb | 2024-08-05 06:34:03 | 2024-08-05 06:34:04 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3776kb
input:
2 1 2 2 1
output:
4
result:
ok single line: '4'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
1 3 7
output:
impossible
result:
ok single line: 'impossible'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
3 5 5 5 5 5 5
output:
6
result:
ok single line: '6'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
5 1 1 2 2 3 3 4 4 5 5
output:
10
result:
ok single line: '10'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
10 1 2 3 4 5 6 7 8 9 10 10 9 8 7 6 5 4 3 2 1
output:
20
result:
ok single line: '20'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
7 1 2 3 3 2 4 5 6 6 7 7 5 4 1
output:
14
result:
ok single line: '14'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
15 1 2 3 4 5 6 6 5 7 8 9 10 11 12 13 14 14 15 15 13 12 11 10 9 8 7 4 3 2 1
output:
30
result:
ok single line: '30'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3480kb
input:
50 1 1 2 2 3 3 4 4 5 5 6 6 7 8 9 10 10 11 11 9 8 7 12 13 14 15 16 16 15 17 18 19 20 20 21 22 23 23 22 21 24 25 26 26 27 28 29 30 31 31 32 32 30 29 33 33 28 34 34 35 35 27 36 36 25 24 37 37 19 38 38 39 40 40 39 18 41 42 42 41 17 14 13 43 44 45 46 47 47 46 48 49 49 50 50 48 45 44 43 12
output:
100
result:
ok single line: '100'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
6 1 1 2 2 3 3 4 5 5 4 6 6
output:
12
result:
ok single line: '12'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
8 1 1 2 2 3 3 131872120 4 5 5 6 6 7 7 8 8
output:
impossible
result:
ok single line: 'impossible'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
128 120 80 6 112 69 120 66 119 26 85 103 47 13 58 5 86 108 7 76 117 16 41 93 57 49 83 128 29 8 90 95 20 47 124 100 89 9 109 24 27 46 82 29 98 11 76 109 2 42 87 63 87 48 32 97 84 86 89 99 28 123 123 84 22 44 25 45 43 7 43 8 30 105 91 64 50 31 88 115 124 19 46 20 36 104 125 21 72 33 100 81 126 88 61 5...
output:
impossible
result:
ok single line: 'impossible'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
10 5 7 8 9 10 9 10 4 8 2 6 1 7 4 1 3 6 2 5 3
output:
impossible
result:
ok single line: 'impossible'
Test #13:
score: 0
Accepted
time: 9ms
memory: 4272kb
input:
100000 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52...
output:
200000
result:
ok single line: '200000'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
12 588538353 588538353 81728940 81728940 371334095 371334095 642667888 642667888 907151948 907151948 650407876 650407876 309879144 309879144 93127708 93127708 547978797 547978797 995638490 995638490 369167770 369167770 421889793 421889793
output:
24
result:
ok single line: '24'
Test #15:
score: 0
Accepted
time: 13ms
memory: 4652kb
input:
100000 578834423 867666193 310522313 656059845 32251881 667734326 701836048 888042103 225495116 276249056 52050710 426488387 403919229 688889297 143957872 87313964 495567299 8167603 560878392 260570873 27757024 78002093 171692409 975533993 903986170 876280177 643766991 569967935 985118034 431406937 ...
output:
200000
result:
ok single line: '200000'
Test #16:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
8 485738844 929583700 601051018 601051018 920049643 992363556 838826498 838826498 992363556 920049643 499987953 485151262 485151262 499987953 929583700 485738844
output:
16
result:
ok single line: '16'
Test #17:
score: 0
Accepted
time: 13ms
memory: 4128kb
input:
100000 509566392 509566392 288831131 288831131 705955724 705955724 568149844 715552799 375579191 375579191 153115962 153115962 409783936 11661309 11661309 402389573 402389573 518122105 294256951 294256951 518122105 690854884 870104599 870104599 690854884 409783936 715552799 494155610 494155610 74151...
output:
impossible
result:
ok single line: 'impossible'
Test #18:
score: 0
Accepted
time: 10ms
memory: 5464kb
input:
100000 278108255 312198691 735790164 976611283 734527364 861145937 911967756 955627823 199419816 700090116 247560421 715311300 158011753 933329637 241766857 688222515 788151844 201191488 139815176 76049769 570494872 908160748 229681458 799607132 316385285 32184316 463405851 135610017 899426831 73461...
output:
impossible
result:
ok single line: 'impossible'
Test #19:
score: 0
Accepted
time: 8ms
memory: 4644kb
input:
90000 114706270 661294586 754395459 810895469 700124785 565982092 265144710 291107757 789341798 274636866 312476050 788190244 77981440 707005325 482906304 325330861 501027635 734689727 937185464 425925081 422849860 834852080 975948862 127130571 282948622 239730166 935029293 967938618 338935271 38443...
output:
impossible
result:
ok single line: 'impossible'
Test #20:
score: 0
Accepted
time: 4ms
memory: 4100kb
input:
100000 7 7 1 1 17 17 2 2 6 6 8 8 1 2 5 12 8 4 4 11 11 15 12 12 9 9 15 8 12 13 13 5 2 1 9 12 8 8 12 9 7 12 11 11 12 8 8 10 10 7 17 17 14 14 8 8 19 19 15 14 14 15 16 16 3 3 15 15 19 19 12 15 15 19 11 11 15 15 13 3 3 16 16 1 7 5 18 6 6 20 1 1 10 17 17 10 16 5 5 4 4 16 20 4 13 13 2 2 3 3 4 15 15 18 18 1...
output:
200000
result:
ok single line: '200000'
Test #21:
score: 0
Accepted
time: 7ms
memory: 4200kb
input:
100000 2 2 2 2 2 2 2 1 1 2 2 2 1 2 2 2 1 1 1 1 1 2 2 2 2 2 1 2 1 1 1 2 1 1 2 1 1 2 2 2 2 2 2 1 2 2 2 2 2 1 2 2 2 2 2 1 2 1 1 2 1 1 2 1 1 2 1 1 2 2 2 2 2 2 1 1 2 2 1 2 2 1 2 1 1 2 1 2 2 1 1 2 2 1 1 1 2 2 2 1 1 1 1 2 2 2 2 1 1 1 1 2 2 1 1 2 2 2 1 1 1 1 2 2 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2...
output:
200000
result:
ok single line: '200000'
Test #22:
score: 0
Accepted
time: 9ms
memory: 4120kb
input:
100000 268 213 213 268 156 156 188 188 149 149 90 277 277 90 143 57 14 14 57 143 128 197 215 215 197 128 130 257 257 130 163 206 206 71 283 32 32 283 71 72 101 101 78 78 72 163 273 273 287 108 170 170 108 287 277 277 64 64 36 36 159 210 42 260 260 243 243 308 308 73 210 210 260 173 173 260 10 10 73 ...
output:
impossible
result:
ok single line: 'impossible'
Test #23:
score: 0
Accepted
time: 9ms
memory: 4652kb
input:
97875 1485 1007 5419 3677 2741 1962 1622 4011 4011 5147 4048 1499 3931 2421 3755 2168 1607 2080 5668 967 2658 4278 5529 6246 6449 1429 6645 1922 1385 1385 1945 1641 1641 6020 6020 1945 2995 2995 4715 4160 1654 6640 5551 5551 6194 6194 4045 1771 5868 2449 2171 55 2808 2808 55 3321 1806 6323 5957 5957...
output:
impossible
result:
ok single line: 'impossible'
Test #24:
score: 0
Accepted
time: 7ms
memory: 4444kb
input:
100000 3 1 3 1 3 1 2 2 3 2 3 1 3 2 1 2 2 2 2 1 2 2 1 3 3 1 1 1 1 3 2 2 3 1 1 2 1 1 3 3 2 2 2 3 2 3 3 1 3 2 1 3 3 3 1 1 2 1 1 1 3 2 1 3 3 2 1 2 2 3 1 3 2 3 2 2 2 3 1 1 1 1 1 2 2 2 1 3 3 3 2 1 2 2 2 2 2 3 1 2 2 2 2 3 1 1 1 2 3 2 1 2 1 2 3 2 3 1 1 2 3 2 1 1 1 1 2 2 2 1 1 3 2 3 1 2 3 3 1 1 2 3 3 2 3 1 3...
output:
impossible
result:
ok single line: 'impossible'
Test #25:
score: 0
Accepted
time: 12ms
memory: 4200kb
input:
100000 588579985 588579985 338715741 338715741 141617384 141617384 597972455 597972455 764017608 764017608 574224897 574224897 324538521 324538521 851651400 851651400 542575249 542575249 206929745 206929745 766509486 766509486 818175174 818175174 467998559 467998559 177856259 177856259 166045382 166...
output:
200000
result:
ok single line: '200000'
Test #26:
score: 0
Accepted
time: 13ms
memory: 5440kb
input:
100000 13183665 504205744 120687354 820313924 421805907 151242154 734293677 46458889 148918251 120735358 574679667 248895887 763978402 813458743 149885381 158270850 795272472 35557644 710996035 65087334 146650074 248216056 575162424 786380354 480768902 564862706 442993760 220040825 636816376 9997759...
output:
impossible
result:
ok single line: 'impossible'
Test #27:
score: 0
Accepted
time: 12ms
memory: 4112kb
input:
100000 71816128 71816128 369721403 369721403 443716090 443716090 118653555 118653555 347350342 347350342 807573533 807573533 595234474 595234474 548988208 548988208 867304613 867304613 53337047 53337047 729995590 729995590 48111670 48111670 814271325 814271325 790203535 790203535 296274897 296274897...
output:
impossible
result:
ok single line: 'impossible'
Test #28:
score: 0
Accepted
time: 8ms
memory: 4788kb
input:
98921 928 741 703 806 785 902 927 155 267 691 651 870 927 104 894 336 587 928 174 28 422 417 77 106 129 327 486 973 595 461 422 214 205 325 641 931 698 344 337 438 95 643 531 825 862 504 415 84 212 587 249 36 207 97 86 195 260 711 783 291 313 707 263 168 639 121 928 24 274 723 240 880 862 225 588 24...
output:
197842
result:
ok single line: '197842'
Test #29:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
53 2 2 4 4 4 4 3 4 4 3 2 2 4 2 2 2 2 1 1 1 3 4 1 1 4 3 2 2 2 2 1 4 2 1 4 4 4 4 1 3 3 4 1 3 1 1 3 1 2 2 4 1 1 1 1 1 1 1 4 4 1 2 4 2 3 4 4 3 4 2 2 2 2 1 4 2 1 1 2 2 2 1 1 1 1 4 4 4 2 3 2 4 4 2 3 3 3 2 4 2 2 4 1 4 2 4
output:
106
result:
ok single line: '106'
Test #30:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
192 2 2 2 2 1 1 5 4 2 2 4 5 1 1 3 1 2 2 1 3 3 3 1 3 5 5 3 2 2 1 5 5 4 4 1 5 5 1 1 5 3 3 5 3 3 1 4 4 2 2 2 2 1 1 5 5 5 5 5 5 1 3 3 1 5 3 3 5 3 3 2 2 4 3 3 5 2 2 5 4 3 3 3 2 4 4 2 3 1 1 3 5 1 1 4 3 3 4 5 3 5 5 3 5 5 3 4 4 4 4 2 2 3 3 5 5 3 3 4 4 5 5 1 3 3 1 5 5 5 5 5 5 5 5 5 5 4 4 5 5 4 4 1 1 1 4 3 3 ...
output:
384
result:
ok single line: '384'
Test #31:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
192 38 38 11 3 76 40 55 49 68 46 17 17 25 35 57 2 2 29 80 80 59 4 14 11 91 64 54 54 64 3 66 81 56 69 8 27 5 76 76 48 85 23 80 28 28 80 47 47 73 48 74 37 37 85 41 74 11 11 61 23 62 76 58 87 83 83 87 21 24 24 23 69 42 87 67 26 26 67 75 75 87 15 15 11 13 55 5 73 36 74 36 76 43 14 48 37 70 40 59 71 28 3...
output:
impossible
result:
ok single line: 'impossible'
Test #32:
score: 0
Accepted
time: 13ms
memory: 4112kb
input:
100000 764872459 764872459 411093505 411093505 901728103 625753911 196056550 196056550 625753911 234363679 179668822 179668822 234363679 208408438 208408438 901728103 181863651 720359138 720359138 731917343 731917343 98555121 757938522 813613886 162457415 162457415 865847879 758668062 758668062 8658...
output:
impossible
result:
ok single line: 'impossible'
Test #33:
score: 0
Accepted
time: 10ms
memory: 5512kb
input:
99997 83131001 994819185 229369288 155311463 325481576 749851862 966597085 255330396 532847060 26115107 773352430 41393045 107626910 348665853 546456271 354701050 905242668 61270364 561351485 741490984 946825686 503338982 398315989 645546767 801114 582407845 810961966 839166658 135730850 563349902 1...
output:
impossible
result:
ok single line: 'impossible'
Test #34:
score: 0
Accepted
time: 13ms
memory: 4620kb
input:
100000 668835602 274281999 796487719 384974576 853832590 741361656 741361656 853832590 384974576 903565517 794460043 700113704 990338921 569125962 31144124 902316928 499958519 833179166 267418254 696831126 55677007 967334543 168417828 121553982 399210080 503659049 503659049 399210080 932486209 26475...
output:
impossible
result:
ok single line: 'impossible'
Test #35:
score: 0
Accepted
time: 13ms
memory: 4196kb
input:
100000 851842432 851842432 616134651 616134651 882566438 86510939 86510939 882566438 520801968 520801968 818424093 280913935 280913935 39538126 485027 485027 39538126 156313202 156313202 818424093 711696014 711696014 629732852 504931657 815754556 789024433 789024433 400677901 400677901 342937749 826...
output:
200000
result:
ok single line: '200000'
Test #36:
score: 0
Accepted
time: 13ms
memory: 4248kb
input:
100000 347712783 347712783 161973070 423938500 423938500 698935573 51847157 77777869 77777869 51847157 881836554 575398923 101071365 101071365 575398923 392655487 625763864 62275870 62275870 976787302 976787302 544854974 230530420 40260663 40260663 92285143 92285143 465623511 465623511 230530420 544...
output:
impossible
result:
ok single line: 'impossible'
Test #37:
score: 0
Accepted
time: 12ms
memory: 4132kb
input:
100000 243423565 243423565 397726714 397726714 403049884 403049884 135646773 135646773 207357418 207357418 756791415 756791415 47006765 47006765 91466985 91466985 146934069 146934069 265687734 265687734 871088133 871088133 543700333 543700333 224838995 224838995 430259339 430259339 689200988 6892009...
output:
impossible
result:
ok single line: 'impossible'
Test #38:
score: 0
Accepted
time: 11ms
memory: 4636kb
input:
85993 497150364 658434844 400840637 286833408 148755563 199871618 930463702 726540504 6909589 363274254 539858146 497917205 964540104 964540104 649290420 86774070 86774070 358655545 595143378 662122943 662122943 751724830 43911492 781890460 406969201 181907113 755356314 485353765 778533014 453748998...
output:
171986
result:
ok single line: '171986'
Test #39:
score: 0
Accepted
time: 1ms
memory: 3628kb
input:
985 613538869 613538869 34987949 460516117 518146652 620720815 620720815 518146652 460516117 34987949 15926218 221296289 221296289 496692034 873297047 873297047 496692034 527525519 527525519 884321822 884321822 297985538 297985538 15926218 701660786 701660786 870395297 172045180 36940559 36940559 55...
output:
1970
result:
ok single line: '1970'
Test #40:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
3 4 4 1 3 5 4
output:
impossible
result:
ok single line: 'impossible'
Test #41:
score: 0
Accepted
time: 10ms
memory: 5444kb
input:
100000 144272510 611178003 909925048 861425549 820096754 67760437 273878288 126614243 531969375 817077202 482637353 507069465 699642631 407608742 846885254 225437260 100780964 523832097 30437867 959191866 897395949 418554020 464680098 652231582 818492002 823729239 2261354 747144855 478230860 2859702...
output:
impossible
result:
ok single line: 'impossible'
Test #42:
score: 0
Accepted
time: 7ms
memory: 4132kb
input:
100000 1 1 1 2 1 2 2 1 1 1 2 2 2 2 2 1 1 2 2 2 2 2 1 1 1 1 1 1 2 1 1 2 1 2 2 2 2 2 2 1 2 2 1 2 2 2 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 1 2 2 1 2 1 1 1 1 1 2 1 1 1 2 1 1 1 2 1 1 2 2 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 2 1 1 1 1 1 2 1 2 2 2 1 2 2 1 2 2 1 2 1 1 2 1 1 2 1 2 2 2 1 2 2 2 2 1 1 1 2 1 1 1 1 1 2 1 1 1 1...
output:
impossible
result:
ok single line: 'impossible'
Test #43:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
2 1 3 3 1
output:
4
result:
ok single line: '4'
Test #44:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
1 2 3
output:
impossible
result:
ok single line: 'impossible'
Test #45:
score: 0
Accepted
time: 0ms
memory: 3480kb
input:
2 2 2 1 2
output:
impossible
result:
ok single line: 'impossible'
Test #46:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
4 5 1 4 3 1 1 2 6
output:
impossible
result:
ok single line: 'impossible'
Test #47:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
5 2 1 2 1 1 1 2 1 1 1
output:
impossible
result:
ok single line: 'impossible'
Test #48:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
6 1 2 2 1 1 1 1 1 1 1 2 1
output:
impossible
result:
ok single line: 'impossible'
Test #49:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
7 2 2 2 1 1 1 2 2 1 2 1 2 1 2
output:
impossible
result:
ok single line: 'impossible'
Test #50:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
47 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 ...
output:
94
result:
ok single line: '94'
Test #51:
score: 0
Accepted
time: 3ms
memory: 4252kb
input:
99999 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 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 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 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 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 3 3 3 3 3 3 3 3 3 3 3 3 ...
output:
199998
result:
ok single line: '199998'
Test #52:
score: 0
Accepted
time: 4ms
memory: 4104kb
input:
100000 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 1...
output:
impossible
result:
ok single line: 'impossible'
Test #53:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
571 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 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 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 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 2 2 2 2 ...
output:
impossible
result:
ok single line: 'impossible'
Test #54:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
1 1 1
output:
2
result:
ok single line: '2'
Test #55:
score: 0
Accepted
time: 13ms
memory: 4112kb
input:
100000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000...
output:
impossible
result:
ok single line: 'impossible'
Test #56:
score: 0
Accepted
time: 13ms
memory: 4272kb
input:
100000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000...
output:
200000
result:
ok single line: '200000'