QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#459516#8835. Goodmanucup-team2054#AC ✓491ms78748kbC++174.6kb2024-06-30 06:17:592024-06-30 06:17:59

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3592kb

input:

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

output:

1 2 3 4 
3 4 2 5 1 6 

result:

ok Correct (2 test cases)

Test #2:

score: 0
Accepted
time: 1ms
memory: 3548kb

input:

873
6
1 5 2 4 6 3
6
5 1 6 4 3 2
4
1 4 3 2
6
2 1 6 5 4 3
6
4 5 1 3 6 2
6
6 2 1 5 4 3
5
1 5 4 3 2
6
1 2 6 3 5 4
4
2 1 3 4
6
1 6 4 2 3 5
6
6 1 3 5 2 4
6
2 1 4 5 3 6
6
3 4 1 5 2 6
6
4 1 5 2 6 3
6
5 2 1 4 6 3
6
4 1 6 2 3 5
6
5 1 3 4 6 2
6
6 2 5 4 1 3
6
6 2 5 1 4 3
6
5 2 3 6 4 1
6
6 1 2 5 4 3
6
2 3 4 6 1 ...

output:

1 4 2 5 6 3 
4 1 5 3 6 2 
1 3 2 4 
1 2 4 5 3 6 
1 4 3 2 5 6 
2 4 5 1 6 3 
1 3 4 2 5 
1 2 5 3 6 4 
1 2 3 4 
1 2 6 5 3 4 
3 1 6 4 5 2 
1 2 3 4 5 6 
1 3 2 4 5 6 
1 4 2 3 5 6 
2 4 1 5 6 3 
1 4 2 3 6 5 
3 4 1 5 6 2 
2 4 1 6 3 5 
2 1 6 3 5 4 
2 3 1 5 4 6 
4 5 1 6 3 2 
1 2 3 4 6 5 
4 1 5 2 6 3 
2 1 4 3 6 5...

result:

ok Correct (873 test cases)

Test #3:

score: 0
Accepted
time: 45ms
memory: 3828kb

input:

46233
7
2 1 7 5 3 4 6
7
5 6 2 4 3 7 1
4
3 4 1 2
7
4 5 1 6 3 2 7
8
4 2 6 5 1 3 8 7
8
3 4 8 6 7 5 2 1
7
6 2 4 3 7 1 5
8
8 1 3 2 7 4 6 5
8
6 5 4 2 1 3 7 8
8
8 3 5 6 2 7 1 4
8
7 3 6 1 8 5 2 4
8
2 3 4 5 8 6 1 7
8
5 8 2 4 7 3 1 6
8
3 4 8 2 7 5 6 1
8
2 8 3 5 7 4 6 1
8
8 4 5 7 6 1 2 3
8
5 2 6 3 4 7 8 1
8
2 ...

output:

1 2 3 7 6 4 5 
4 1 5 3 2 6 7 
1 3 2 4 
1 4 6 2 5 3 7 
2 1 4 5 3 6 7 8 
1 3 8 2 4 6 5 7 
2 3 4 1 6 5 7 
3 1 8 5 7 6 4 2 
1 6 3 4 2 5 7 8 
2 3 5 1 8 4 6 7 
1 7 2 3 6 5 8 4 
1 2 3 4 5 8 7 6 
4 1 5 7 2 8 6 3 
1 3 8 2 4 5 7 6 
1 2 8 3 4 5 7 6 
2 4 7 1 8 3 5 6 
2 1 5 4 3 6 7 8 
1 2 4 7 3 5 6 8 
1 5 6 3 4 ...

result:

ok Correct (46233 test cases)

Test #4:

score: 0
Accepted
time: 132ms
memory: 21144kb

input:

1
999995
992870 548521 579550 387108 249895 990007 476463 686591 907510 311379 340877 491996 478527 996443 681309 483046 760005 905577 711115 275827 697004 737465 904964 381424 774578 217570 554656 914370 935328 624905 590395 761191 265062 978389 670994 184745 662928 389422 952905 447853 325275 9796...

output:

6 990007 167646 5071 390630 449041 827034 829252 400382 391482 877908 417784 674381 909548 646112 315028 892741 485910 583127 282253 893603 721534 644472 216069 180523 922028 871098 579087 980084 56570 702575 583960 660789 317464 346280 197141 388605 295143 686487 673360 433663 380924 176377 454398 ...

result:

ok Correct (1 test case)

Test #5:

score: 0
Accepted
time: 129ms
memory: 21488kb

input:

1
999999
132956 959208 556000 604257 627699 841942 392337 85216 596714 941258 128586 319266 589450 975529 945897 459533 878473 562877 170464 568730 134581 853340 114919 588755 677661 246220 410344 431559 600933 71503 340747 300767 956226 134024 377489 407095 922690 597383 328440 183077 305496 911409...

output:

1 132956 328574 69753 49392 350932 353175 428679 942284 738548 706001 597440 292474 921441 926783 829691 558799 849638 505028 908182 653106 385927 545273 930016 489434 955981 865562 818927 317306 744608 201569 358756 609804 314256 152200 635482 959126 195203 909188 513000 659541 37404 224347 686683 ...

result:

ok Correct (1 test case)

Test #6:

score: 0
Accepted
time: 188ms
memory: 20540kb

input:

1
999995
185456 546022 237157 854346 194860 12795 423507 139747 41617 745842 562041 586948 901868 41548 724084 551713 363602 993352 196139 134920 732744 223803 52636 647112 662549 111584 37972 544386 618225 516655 675627 995447 377631 547578 200968 309294 943960 544713 472717 970952 614182 556187 87...

output:

2108 830797 604473 537456 780380 33879 829553 529275 425120 832289 565897 754506 532657 629101 154385 190107 400331 234584 191733 976725 910456 707088 720674 559137 878222 821664 742182 137481 301843 985095 278220 360592 333598 438125 302273 757790 751648 721704 488377 432347 26326 440366 199814 419...

result:

ok Correct (1 test case)

Test #7:

score: 0
Accepted
time: 177ms
memory: 20628kb

input:

1
999995
106319 883863 505649 461531 879328 592439 610753 498388 652259 561960 714720 4816 619701 583083 891705 422579 600013 649185 247069 757914 629341 259990 491011 371586 561323 496611 245037 738066 356885 551034 869487 727770 296409 616290 689659 540280 866041 373099 500141 78755 296645 410259 ...

output:

817 178083 905295 445101 565318 860823 647347 683883 365879 180142 628374 556253 4397 433960 485155 641566 486433 579395 550501 857984 658167 364261 732830 15653 994563 713806 174392 743671 380975 396684 129468 354691 760742 901405 808425 684857 572238 360429 150177 422054 81803 177199 160274 936853...

result:

ok Correct (1 test case)

Test #8:

score: 0
Accepted
time: 296ms
memory: 23544kb

input:

1
999997
647436 223560 313749 173791 208472 19484 202293 58288 577646 25489 244804 502016 110660 46059 201131 215956 785297 601887 950455 761106 206866 813740 939637 640694 854103 13254 848440 623785 581087 736815 802377 395356 692446 827316 489135 986276 352461 218066 58935 546307 287432 954710 200...

output:

455 1882 2635 173 2733 811606 5082 233866 309820 107266 890047 56523 209145 366215 243601 813966 495622 97122 180271 954893 125392 274577 279844 766916 530413 278857 77907 202910 253952 238630 676462 999367 269736 147173 194407 965901 958921 777395 731992 643402 628971 648266 847884 595745 173129 72...

result:

ok Correct (1 test case)

Test #9:

score: 0
Accepted
time: 135ms
memory: 23704kb

input:

1
999995
376560 189743 96064 714725 867320 410293 327461 399762 389351 517285 704557 989487 207994 873227 905081 242749 393577 520522 234915 645189 838929 828070 762191 768295 341660 516402 615369 153009 702022 820850 232061 336729 691838 160947 191695 675838 826901 56793 381344 839583 914210 752257...

output:

11 704557 452840 708331 331099 903465 444826 69749 137004 232334 711044 102345 562661 136415 458549 695618 494810 784369 735068 62202 705503 752773 80090 607176 779051 175200 378007 633309 401954 438433 307162 626293 876342 858558 600958 516930 213282 501016 378876 33124 148247 468219 871232 83167 1...

result:

ok Correct (1 test case)

Test #10:

score: 0
Accepted
time: 178ms
memory: 20352kb

input:

1
999997
69588 647230 167087 991071 412817 332088 426389 505132 301 303011 826476 261371 472289 436452 333073 396919 683995 819266 408456 235065 994502 537023 770928 354622 409101 557451 303341 765827 126406 603996 972615 930685 347903 634610 50624 706028 918863 574760 921336 411043 829389 369276 37...

output:

77 927498 340416 997427 707668 516063 946608 290535 577711 950542 656035 413955 42402 808664 861527 115178 121716 532546 565433 443392 16940 119300 10888 726945 765569 253230 283957 338717 997435 169189 344659 248129 250221 152590 304051 925309 219410 33367 894373 76765 775997 321627 841679 592751 2...

result:

ok Correct (1 test case)

Test #11:

score: 0
Accepted
time: 129ms
memory: 21484kb

input:

1
999995
944829 184022 584189 44931 382020 646738 472283 116610 935974 570355 788773 241934 738294 626043 874067 603890 741968 138232 528117 609827 426413 419495 494434 809342 94243 198801 749308 766492 505446 969921 372479 49158 138897 702882 55890 776117 638050 57623 553563 26230 261953 942379 323...

output:

1 944829 901098 440213 858182 803178 357552 391822 645998 521221 444493 252619 105756 299033 384714 66307 807053 347227 665153 239739 958397 114215 984084 740744 854803 348806 30930 539813 236415 697244 888838 278536 727643 637406 327802 788129 388955 779522 603502 524686 791631 263706 2294 725910 5...

result:

ok Correct (1 test case)

Test #12:

score: 0
Accepted
time: 491ms
memory: 72348kb

input:

1
999999
598262 800757 953677 4 792073 6 136708 66880 371324 212640 11 634080 13 385137 494685 16 48898 394580 171289 165715 21 165348 103815 24 208885 877590 916434 28 265045 30 410055 32 33 34 35 38471 37 350679 287494 120609 571575 973011 513657 892070 45 46 118690 410186 49 977441 756000 40886 5...

output:

4 6 11 13 16 21 24 28 30 32 33 34 35 37 45 46 49 55 60 67 71 80 87 93 98 99 103 104 116 120 123 127 134 135 150 151 152 155 162 164 168 173 175 178 180 186 188 190 194 195 203 205 210 217 220 225 229 230 236 238 239 244 245 247 250 251 253 259 264 267 270 281 284 289 296 297 300 304 306 310 311 313 ...

result:

ok Correct (1 test case)

Test #13:

score: 0
Accepted
time: 135ms
memory: 20108kb

input:

1
1000000
598176 980780 744557 853014 801288 772247 686653 948835 432494 397868 653067 88262 742372 978141 748202 436733 798902 30649 648030 890447 124194 832356 162447 690075 519137 485417 580895 188011 923659 541160 793504 808452 587076 664683 992260 711573 958279 280009 695716 468598 162778 94422...

output:

1 598176 528316 68573 181939 533695 6205 342447 325359 922191 779625 751964 768163 766116 505671 45154 32556 189391 1933 844206 938543 324899 141604 640417 277416 918928 552337 871284 934099 579847 677938 217795 721522 679455 249594 796334 139594 61604 146023 515670 788430 239187 712272 646723 34443...

result:

ok Correct (1 test case)

Test #14:

score: 0
Accepted
time: 198ms
memory: 20548kb

input:

2
971703
762817 773672 219107 586536 332168 315958 296133 682875 574385 514958 225986 401184 585660 790285 726807 784565 967457 873283 910489 454986 183546 184833 114031 602717 368603 143720 164887 161047 795581 607835 863860 280058 803410 734559 493748 847157 251064 200343 658098 142723 738858 8711...

output:

1403 5239 127437 507565 583206 76075 553418 107491 767096 789729 381316 16850 572609 115705 529541 782672 422308 714092 138285 246735 643056 938097 753704 486715 857016 96338 957214 353606 845925 932577 895681 336377 700804 60863 643842 648492 155772 112608 256170 169905 321585 928879 719801 833718 ...

result:

ok Correct (2 test cases)

Test #15:

score: 0
Accepted
time: 177ms
memory: 19464kb

input:

2
940880
111423 813285 759715 575729 564486 700432 368517 290146 832317 243897 473955 698594 394826 240249 172631 330487 448008 923374 194632 300004 214964 371360 588767 48592 166492 461462 549128 15020 291507 192368 543356 182395 625291 371071 30251 920902 162794 530453 587740 906092 231419 117911 ...

output:

67 929242 616831 669884 43644 523058 814146 218986 912426 64226 500023 584727 940326 81318 531449 179067 323475 50756 820510 783909 868503 176535 365422 236980 337852 608902 597011 62174 546762 225942 322916 678056 322238 570066 506151 294631 189911 206827 436056 227640 344308 553969 213683 52599 55...

result:

ok Correct (2 test cases)

Test #16:

score: 0
Accepted
time: 171ms
memory: 18116kb

input:

2
860629
735188 534252 744523 117977 300521 124360 836277 733811 399530 449393 606669 107978 303823 356049 223557 217235 222785 29525 489289 166055 741811 125793 594271 165471 40345 271714 320863 185123 177911 603339 701397 374390 350130 722274 497043 286267 391000 639814 512894 4979 666163 331108 8...

output:

199 815121 722182 263790 353643 104815 476575 70794 397970 350082 692184 253830 312348 358677 605960 360669 187204 112631 543552 582767 738336 114345 775365 834492 604650 354103 356645 347367 329181 792807 224851 819650 301608 482321 719889 349794 205210 343828 551874 538078 276038 354547 630966 164...

result:

ok Correct (2 test cases)

Test #17:

score: 0
Accepted
time: 408ms
memory: 78748kb

input:

2
829683
1 431959 16473 4 5 6 732917 467247 9 97836 11 263443 280696 14 77453 16 75676 18 19 20 672505 789285 605702 24 25 26 635082 444514 29 346335 324390 32 391754 34 699517 36 37 38 509820 284968 807779 42 472180 739589 45 46 627304 48 49 525992 381425 143087 53 710147 55 56 57 225867 113034 256...

output:

1 4 5 6 9 11 14 16 18 19 20 24 25 26 29 32 34 36 37 38 42 45 46 48 49 53 55 56 57 61 62 63 65 66 67 71 72 76 79 82 83 84 87 88 90 91 92 93 94 96 97 98 100 102 103 105 108 109 110 113 114 120 122 123 124 126 127 129 132 133 135 136 137 138 140 143 147 148 149 151 152 153 155 164 167 168 169 170 171 1...

result:

ok Correct (2 test cases)

Test #18:

score: 0
Accepted
time: 168ms
memory: 18964kb

input:

2
114226
10177 47219 101883 102864 32912 88330 112020 9867 97854 21341 46080 93875 84379 32540 15256 58601 105938 89861 105525 22416 10688 84874 46087 88318 35202 31508 18928 20099 39856 89872 112368 11246 43553 102822 40104 16396 7333 25520 62338 46542 35767 23602 84780 33447 110677 33337 94547 306...

output:

1 10177 58224 102823 52068 93763 4911 99275 110502 105096 94844 9788 74841 33168 101621 67787 44949 67818 18739 47944 17045 63879 43936 35481 6823 72632 90226 89244 111014 43722 7453 112394 96583 22439 80053 43959 41198 3882 59659 11536 1515 3368 105865 42673 10689 108103 8792 74856 47535 41723 8580...

result:

ok Correct (2 test cases)

Test #19:

score: 0
Accepted
time: 382ms
memory: 56428kb

input:

2
490803
247930 211116 224844 4 244683 6 193671 485364 225504 421778 140897 50721 1860 14 416567 372449 225900 476979 387561 377844 41836 384022 23 355383 411447 302152 128244 88216 130829 169089 398076 101119 64788 371087 194408 67042 37 124187 247834 108274 376285 246797 118696 337858 27533 299129...

output:

4 6 14 23 37 47 49 62 150 153 178 184 190 203 227 231 254 275 282 285 302 304 307 316 334 340 353 360 361 363 387 412 420 423 438 439 442 448 456 474 478 483 485 492 502 509 510 517 560 567 573 592 593 597 602 606 634 641 644 645 650 668 677 690 695 697 716 740 754 820 827 829 839 845 854 859 876 90...

result:

ok Correct (2 test cases)

Test #20:

score: 0
Accepted
time: 166ms
memory: 32944kb

input:

2
761593
728574 427183 105004 539902 490594 19394 641085 680208 603234 469570 13865 523930 161239 728643 145061 58553 79305 527939 498712 205099 648967 167771 490981 527188 241919 713720 29645 269740 712984 312637 358383 160090 352029 195148 410521 217910 407035 735962 465901 591533 262438 683820 17...

output:

38 735962 645840 91512 343200 89813 363771 669244 413819 538122 261133 584094 219900 15779 274855 707790 723391 389612 223419 599904 548000 413299 175349 148627 155714 446029 571502 347136 231475 405510 68482 352133 265889 446879 677327 486043 360937 48097 532482 239468 499831 642998 584160 514957 4...

result:

ok Correct (2 test cases)

Test #21:

score: 0
Accepted
time: 374ms
memory: 39080kb

input:

2
740849
306411 103496 631429 340096 197195 407246 688964 419402 200695 303965 338708 12 131085 586905 595912 215676 448624 392728 730988 298088 628536 132706 164216 589774 127513 86929 348093 569335 380268 33670 391430 252531 423710 439306 678824 9999 645092 314322 328803 536960 379519 104374 20466...

output:

12 56 82 85 90 95 99 112 127 133 140 160 161 162 164 178 189 194 196 197 200 209 215 246 247 256 260 261 265 277 279 280 284 285 305 306 314 316 322 324 330 346 348 363 380 385 386 389 395 397 417 421 433 437 440 447 449 461 463 468 473 486 496 505 510 517 537 564 578 584 592 607 614 615 619 622 624...

result:

ok Correct (2 test cases)

Test #22:

score: 0
Accepted
time: 150ms
memory: 15088kb

input:

2
372608
6161 118264 213659 293946 359350 233967 998 257534 249401 347493 368805 32132 103517 237945 271044 277292 119681 196699 283337 151083 111301 275696 191897 108525 323510 11725 161417 86376 136605 216341 62779 311126 89583 122522 291813 154811 246045 54158 369436 107863 22017 201059 155982 15...

output:

1827 89452 30352 120594 44468 190257 188668 225516 127079 93970 171868 32367 49677 89323 211722 43641 207119 169953 212557 97435 64043 15784 83092 164389 254923 129677 184199 90910 261906 142634 290859 197573 165167 247303 322169 256668 68518 150862 132844 61628 334262 121279 362564 157583 18974 140...

result:

ok Correct (2 test cases)

Test #23:

score: 0
Accepted
time: 341ms
memory: 70620kb

input:

2
422157
48267 316096 323543 400772 78389 341504 248827 236534 99971 415431 374598 189566 164740 367740 46908 284090 17 68342 387377 349247 218752 145102 285235 348717 33025 414010 180283 241559 230772 372204 229293 8883 35967 346124 288272 36 301437 362593 111482 367922 34022 316392 159968 1972 391...

output:

17 36 60 71 76 86 90 91 114 120 126 139 143 167 185 211 214 228 247 258 260 264 276 285 304 306 341 348 365 394 426 428 442 447 449 475 480 486 524 527 539 546 555 590 591 602 604 610 646 131 652 264189 275912 669 678 683 698 719 732 733 369 764 346885 418498 348232 333805 159162 770 792 803 671 810...

result:

ok Correct (2 test cases)

Test #24:

score: 0
Accepted
time: 382ms
memory: 34112kb

input:

3
129186
31755 11876 57100 86126 81796 35836 60008 95679 121107 63977 48671 107704 75245 125881 1952 84481 72400 20538 9788 121467 58250 15284 52305 122856 124667 83008 20996 32166 49867 96890 58689 101545 105869 105678 37189 124501 30217 72764 8227 124244 12229 34971 55154 56311 114246 41135 79766 ...

output:

1 31755 86893 69364 57032 68871 84698 21138 100823 31587 106393 114186 99725 42134 84930 66508 92434 127955 28453 125036 47572 93942 28108 28275 38841 60902 31232 109925 30415 121354 91986 31713 41113 63470 45333 60562 68589 6729 3807 98655 104471 74619 99375 97782 40567 10600 70021 36696 1495 97481...

result:

ok Correct (3 test cases)

Test #25:

score: 0
Accepted
time: 275ms
memory: 17664kb

input:

4
576473
138534 9158 386505 271582 253613 505067 21315 255917 531131 70593 200185 399046 63462 384920 398535 135563 77884 46170 167179 416370 353883 271084 196966 361621 493549 195011 524237 384979 548509 88272 75116 465541 555434 505759 323150 511129 210266 362446 472113 217471 541744 121619 464159...

output:

111 1152 269692 204701 317867 110036 89042 539245 221705 50612 56827 323458 479280 13048 528711 168145 435064 82116 424300 268690 96664 517301 379484 301859 409009 545799 45499 214852 22824 369210 155540 567950 32044 144182 362962 528905 493729 368131 275017 181021 453095 313233 483373 1715 1860 256...

result:

ok Correct (4 test cases)

Test #26:

score: 0
Accepted
time: 247ms
memory: 27464kb

input:

5
291107
4344 253602 242407 4 5 236812 1999 179653 90206 274589 11 12 13 14 100064 16 17 151536 19 20 29619 22 23 290167 25 26 27 162665 29 198598 40701 215269 183865 34 52718 147488 129463 38 214863 149217 251494 266166 8325 44 75704 92419 277502 48 283269 272669 51 164404 53 146186 29598 169233 57...

output:

4 5 11 12 13 14 16 17 19 20 22 23 25 26 27 29 34 38 44 48 51 53 57 59 61 62 63 64 66 69 70 77 80 89 90 91 95 98 99 100 101 102 107 108 109 110 117 120 131 132 134 138 139 140 141 142 143 146 149 150 155 158 160 166 172 175 183 184 185 186 188 189 195 196 198 199 203 205 208 210 213 214 215 216 220 2...

result:

ok Correct (5 test cases)

Test #27:

score: 0
Accepted
time: 219ms
memory: 42324kb

input:

6
171846
88727 167968 171648 104621 113388 170614 83131 171812 114961 72135 75118 138444 119342 167606 83183 2544 119818 1538 47334 8831 148067 120230 50991 142431 131115 160279 25321 88060 34171 40731 87202 148162 122759 55748 157938 71982 39735 30505 77905 59596 60948 118087 124927 35449 131770 13...

output:

1 88727 169317 100847 73800 25993 81864 102354 142437 5423 128073 151170 114126 162703 57244 113538 132213 119658 48903 43350 117418 132781 38392 75973 10368 63239 116772 7411 4069 160714 56298 45547 125548 85954 138139 1293 63215 110185 150947 34537 19034 3050 115885 58164 49837 43113 152839 80684 ...

result:

ok Correct (6 test cases)

Test #28:

score: 0
Accepted
time: 274ms
memory: 35052kb

input:

7
34222
23613 18586 30860 26673 1470 24232 3310 9740 18142 24635 9368 4183 9405 3042 11074 13003 5948 19837 17297 6192 3902 15446 19385 21861 2574 22358 23569 12381 28520 4915 34060 13423 2816 10801 30581 16798 8629 17508 16908 16312 28630 8832 16593 32016 19801 19926 24548 4722 29268 9130 7641 8301...

output:

78 101 465 588 445 664 30423 741 27549 2597 19186 32251 31451 17521 24864 25003 18571 11711 3296 10988 23508 33052 1909 3809 24853 25789 26165 19879 30813 32912 24105 16766 32632 25918 22661 13705 14137 99 767 29271 29290 19904 2028 28831 29159 16656 28285 2414 31430 2415 26552 27357 30939 7311 3364...

result:

ok Correct (7 test cases)

Test #29:

score: 0
Accepted
time: 196ms
memory: 14596kb

input:

8
124117
1 2 94219 73581 102279 57865 7 7582 362 44659 11 12 13923 50071 117683 16 48835 18 19 119653 68403 22 23 23598 25 26 27 112321 1175 99981 39947 30139 33 99236 84885 32089 24773 38 39 39429 93420 42 65218 44 109731 46 87083 44915 2873 50 97092 122740 32459 88363 55 4390 57 58 110977 14017 61...

output:

1 2 7 11 12 16 18 19 22 23 25 26 27 33 38 39 42 44 46 50 55 57 58 61 63 64 66 72 73 78 83 89 91 92 95 96 98 104 107 112 117 118 122 127 128 129 134 136 139 140 144 145 147 150 151 152 157 158 166 171 172 176 180 182 184 187 188 189 190 191 195 201 202 204 205 208 209 210 211 214 215 220 221 222 229 ...

result:

ok Correct (8 test cases)

Test #30:

score: 0
Accepted
time: 204ms
memory: 30888kb

input:

9
25269
3656 4305 20794 20524 4941 18071 11432 1354 24292 17833 21323 7468 13870 14 20138 5430 24955 23127 15922 20067 17287 22 22670 14424 22468 26 23166 7053 22199 23721 22154 24074 4257 7538 23332 21057 2107 2984 24798 11542 21386 11387 24020 7935 45 8540 1882 8124 24682 16920 24947 13365 6825 25...

output:

14 22 26 45 81 107 122 140 142 144 145 146 155 161 165 187 215 235 245 268 284 302 304 307 315 321 328 331 338 341 350 358 365 372 376 381 383 410 412 423 427 430 439 456 458 435 461 4706 13754 474 494 501 515 433 521 525 542 554 243 563 6099 20976 22591 570 585 592 601 617 624 634 636 637 648 660 5...

result:

ok Correct (9 test cases)

Test #31:

score: 0
Accepted
time: 226ms
memory: 19684kb

input:

10
143919
67710 2 129458 107948 49717 120331 7 128218 58515 79909 11 104303 70438 14 70861 63592 17 18 98891 20 45882 66998 93668 51451 81268 26 19878 28 25598 69454 45455 5371 64724 34 14288 72335 79409 65860 1896 40 55669 78955 43 103019 105786 116605 47284 6056 49 13596 141664 87382 53 54 62439 3...

output:

2 7 11 14 17 18 20 26 28 34 40 43 49 53 54 58 61 63 66 73 74 76 81 82 86 90 91 97 100 104 115 117 120 122 123 124 125 127 130 137 139 145 153 156 158 162 164 165 171 173 174 175 177 183 185 188 191 194 197 200 201 203 204 206 210 215 216 217 221 222 226 227 230 234 236 237 243 244 248 254 256 258 25...

result:

ok Correct (10 test cases)

Test #32:

score: 0
Accepted
time: 227ms
memory: 17188kb

input:

11
59994
28919 7546 17564 46765 16954 24583 33885 48269 37805 25491 9859 10000 56306 38924 59750 54979 17 13468 1054 56316 14451 44679 21323 55444 46596 58891 50718 7148 10580 27177 47509 48370 55051 29986 6217 5555 17183 1144 56697 49615 11242 34179 15502 19415 50815 35422 15680 27712 55002 25995 5...

output:

17 150 206 212 249 289 293 308 363 457 496 498 517 675 692 700 721 765 794 804 627 810 9749 42505 4802 44139 44422 26700 815 882 929 596 969 52277 7122 9622 57080 30563 57937 46632 35026 620 1044 38958 1099 492 1149 54398 40861 32126 54166 32016 57417 36190 53525 8387 8206 1168 1201 1223 1238 409 12...

result:

ok Correct (11 test cases)

Test #33:

score: 0
Accepted
time: 225ms
memory: 19648kb

input:

12
296268
246194 195113 285819 144995 110267 278665 115028 243078 134463 264181 127223 112549 257710 245008 76626 14552 83091 221158 150463 278137 104120 125573 86778 137185 63708 260801 273375 284624 26676 8478 13628 144241 278947 89469 216821 176481 256176 283540 190373 255420 291753 110932 259911...

output:

239 261057 282642 280078 144134 195571 208042 87015 233709 70975 273747 281689 256765 88112 14138 2799 8967 75582 42278 205954 14497 41994 263848 231970 132658 261691 86218 188201 166330 50869 264693 187429 161090 127509 83504 24292 30970 50406 95321 281206 142594 278282 92400 147928 210149 171947 7...

result:

ok Correct (12 test cases)

Test #34:

score: 0
Accepted
time: 208ms
memory: 18212kb

input:

13
58622
3302 18027 49527 11722 8017 35628 53598 48494 9324 28940 14825 24185 3548 56985 42983 13063 51742 41327 28216 12898 5492 32222 5228 19649 20509 48109 20044 21012 51120 5138 26491 28380 51448 37123 45036 25750 13970 1804 31231 20498 12066 986 57872 33097 35489 31770 54639 4045 13690 15786 46...

output:

4 11722 3832 27609 5839 41082 21840 40739 6011 10141 6027 28987 10165 14670 7869 46743 33975 49124 27835 3344 40818 18979 50104 55768 39797 14747 17225 27788 17885 18025 9110 49047 18337 7047 54659 40699 6102 11520 32081 29661 6708 9549 58128 2223 38859 16307 3036 48144 39096 8849 33791 46177 45317 ...

result:

ok Correct (13 test cases)

Test #35:

score: 0
Accepted
time: 247ms
memory: 22680kb

input:

14
287735
250431 222877 25799 117882 153424 6 51352 180699 147333 223582 11 134078 255320 176994 221961 194160 109851 247808 32565 203538 9844 283440 166776 57945 281831 34772 152796 28 48870 30 189994 242066 61845 226764 110535 249472 195706 261012 239150 117942 98734 42 87817 226894 278701 43883 1...

output:

6 11 28 30 42 68 71 75 77 84 91 92 95 97 104 111 132 155 172 178 181 186 194 199 209 218 223 255 264 285 48 286 121054 212171 206495 102605 149695 328 345 346 347 57 352 38961 209476 82857 278614 184795 221453 117348 88874 363 366 370 372 384 396 398 422 432 435 462 468 470 476 477 480 499 509 527 5...

result:

ok Correct (14 test cases)

Test #36:

score: 0
Accepted
time: 202ms
memory: 21028kb

input:

15
6181
3268 3157 394 214 5 6 2955 2598 1907 371 3273 12 13 3806 2104 16 3233 871 4997 1792 21 3013 4008 5153 5723 3060 2137 1322 1375 669 2726 3836 33 2867 5361 5995 1570 745 39 2633 136 5617 43 836 3043 2651 3462 4787 5758 771 4341 5774 53 2974 5735 4182 694 1305 1177 4287 2052 62 5382 64 5980 136...

output:

5 6 12 13 16 21 33 39 43 53 62 64 67 78 92 106 107 116 118 123 125 135 41 136 5408 146 147 158 159 94 163 2356 80 164 2311 2079 5041 3536 69 165 167 202 4 214 4843 5712 2030 583 5397 3924 1328 763 3719 216 218 229 236 250 256 265 276 288 289 293 295 311 314 320 337 350 359 361 362 220 367 5233 5956 ...

result:

ok Correct (15 test cases)

Test #37:

score: 0
Accepted
time: 160ms
memory: 6316kb

input:

100
3026
1 2 3 4 2466 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1822 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 1842 84 85 827 87 88 89 90 91 92 93 94 95 96 97 9...

output:

1 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 84 85 87 88 89 90 91 92 93 94 95 96 97 98 100 101 102 103 104 106 10...

result:

ok Correct (100 test cases)

Test #38:

score: 0
Accepted
time: 172ms
memory: 7060kb

input:

101
8146
1 2 3883 4960 4762 3205 3799 1640 9 4446 255 4211 7920 7719 15 7820 697 18 3033 20 3199 1610 23 3547 2140 413 4588 3739 29 6962 31 8098 3747 34 5067 36 3407 38 5240 3509 41 4078 7441 2865 1409 46 7334 48 1653 7949 51 52 2123 1016 729 1374 57 4925 59 6743 61 62 1768 3984 5726 1894 5433 68 35...

output:

1 2 9 15 18 20 23 29 31 34 36 38 41 46 48 51 52 57 59 61 62 68 73 77 78 79 86 87 91 92 96 97 102 105 106 111 112 120 131 133 138 146 147 148 151 160 163 164 167 170 171 173 174 177 178 184 186 190 192 193 196 197 198 199 201 202 206 208 222 231 238 100 239 243 244 247 249 251 209 254 7024 11 255 746...

result:

ok Correct (101 test cases)

Test #39:

score: 0
Accepted
time: 169ms
memory: 8380kb

input:

102
14999
5489 4491 8375 6095 10926 2441 9421 1641 14240 10984 7862 6111 4031 8049 14669 9982 5229 14768 8209 13573 11158 4078 3308 6807 8681 1905 2701 4586 10924 1025 5433 9647 8381 2792 9868 10470 7144 4980 12189 11938 4034 11840 2779 6338 1055 3945 13152 11293 10954 9377 12727 1867 7296 14524 906...

output:

217 1800 9372 1604 9155 2586 8024 3337 9731 5702 5907 6337 10024 2254 7980 728 7181 1689 2834 3833 1771 6462 11402 8991 12942 10086 4473 7185 12759 14980 4139 13701 10377 2451 8406 14761 13162 7642 8485 9720 8023 4079 4353 13956 2330 7824 6749 7057 10269 12959 2109 12678 7117 3549 14040 13507 646 14...

result:

ok Correct (102 test cases)

Test #40:

score: 0
Accepted
time: 176ms
memory: 9292kb

input:

103
19032
18365 130 13329 18529 2938 608 13636 12776 2937 18130 17907 18446 458 4634 4003 5804 1779 7958 2827 16045 7917 6139 9405 6110 16419 11364 16563 9659 18273 4062 17687 15599 9891 11866 15901 12774 11796 11690 17729 8186 6465 17803 15097 17721 9833 5026 1251 13562 16038 15438 4467 5441 11527 ...

output:

2 130 16818 4868 12310 2612 9030 10593 10468 15113 14859 10677 9947 10673 7101 16405 10659 2425 17086 4161 2661 4169 8058 7475 14525 12914 16172 14264 1442 678 10151 9971 17811 11983 11246 15208 5165 5616 8196 1438 14351 455 7272 93 16858 13356 5744 12330 13024 7830 4325 14171 9894 11882 14684 17572...

result:

ok Correct (103 test cases)

Test #41:

score: 0
Accepted
time: 166ms
memory: 6712kb

input:

104
1474
974 1408 1403 1265 168 854 65 1135 1158 940 100 1258 388 1292 255 1360 179 49 918 1468 498 1313 1358 1108 489 1169 387 785 914 569 1392 52 570 1455 1084 78 316 382 894 248 631 682 948 597 954 53 1055 926 114 137 749 959 314 324 277 60 994 57 1216 898 207 549 1270 853 1212 532 243 680 267 22...

output:

36 78 369 346 245 862 1242 1201 1461 116 1130 93 833 557 434 1397 1065 1352 1421 242 1 974 1247 1105 758 447 527 665 309 429 1259 67 243 641 120 149 1422 579 846 1140 20 1468 565 437 632 1069 1304 487 502 1413 1026 1467 1157 971 417 430 1281 230 583 235 763 332 859 125 515 202 865 7 65 1212 1017 105...

result:

ok Correct (104 test cases)

Test #42:

score: 0
Accepted
time: 158ms
memory: 5328kb

input:

105
4350
4127 1488 2648 3557 435 3468 1407 533 3564 2386 2446 114 3246 3460 368 1896 3446 2999 1812 1864 581 871 512 1495 3455 3874 2563 1382 3630 2472 4135 4317 2924 4025 2367 1322 2619 22 1101 3207 2086 2564 3153 2604 4156 3920 208 1023 1114 1482 1159 4177 4348 627 400 2878 1724 982 2250 1790 2274...

output:

199 206 1936 1950 1256 2488 511 1003 1926 1360 1675 3263 503 2188 648 3028 2364 4036 4154 1125 3309 2891 1167 2085 1539 566 2340 4157 765 3526 1825 380 3922 2496 2696 1765 3357 1833 1527 3480 2458 3659 2522 496 1073 3310 1970 2263 55 400 998 3978 3617 4152 4065 2998 774 3405 1271 1471 231 3656 1014 ...

result:

ok Correct (105 test cases)

Test #43:

score: 0
Accepted
time: 149ms
memory: 4300kb

input:

1000
1896
29 588 1481 15 1020 1139 748 1085 725 368 580 1520 362 670 210 1031 1796 1366 596 1500 1513 277 1561 303 485 997 1055 253 1766 1140 1195 669 1403 1188 22 880 675 1057 1503 1385 1127 1274 1015 587 1817 1590 1792 859 1750 1490 401 1266 283 619 526 151 284 443 629 508 1865 795 1613 1416 1757 ...

output:

1 29 1766 533 23 1561 25 485 461 913 633 435 1552 89 921 423 573 929 773 1691 1113 735 1584 1732 420 1748 554 1353 1241 441 291 1227 1221 1024 1581 865 1543 895 1179 1355 879 1544 1151 477 1441 372 988 115 212 1209 125 1466 1208 68 382 1680 18 1366 1597 1263 860 1307 53 283 1421 590 1168 1825 266 56...

result:

ok Correct (1000 test cases)

Test #44:

score: 0
Accepted
time: 151ms
memory: 4004kb

input:

1001
877
49 700 741 217 744 510 396 418 592 791 227 164 749 311 865 750 573 45 199 173 98 443 310 157 413 773 63 567 248 33 798 481 171 4 466 656 392 281 868 873 588 845 201 703 124 365 184 154 505 256 565 180 179 754 513 651 468 140 30 558 678 89 126 736 735 721 346 587 692 393 451 529 377 330 775 ...

output:

1 49 505 486 18 45 124 284 85 877 69 692 27 63 126 796 534 383 34 4 217 757 60 558 582 855 751 547 423 206 794 679 384 322 614 473 406 11 227 224 660 388 212 464 652 115 825 668 397 506 47 184 866 308 465 84 143 863 176 113 57 468 127 270 803 455 846 674 595 51 565 273 192 424 724 354 538 671 719 43...

result:

ok Correct (1001 test cases)

Test #45:

score: 0
Accepted
time: 154ms
memory: 4020kb

input:

1002
92
21 2 48 88 66 41 7 8 71 16 12 57 67 60 15 10 17 79 61 20 1 22 19 24 84 26 27 29 33 85 50 32 28 64 11 80 81 38 52 77 6 42 76 44 5 46 47 30 92 31 51 39 25 49 9 91 35 65 59 14 23 62 69 34 58 45 13 73 40 37 55 72 68 74 75 43 63 78 4 36 3 82 90 53 70 86 87 18 89 83 56 54
152
146 18 123 92 116 29 ...

output:

2 7 8 11 12 57 35 15 10 16 17 20 1 21 22 24 26 27 28 29 33 32 38 6 41 42 44 46 47 31 50 51 39 52 59 14 60 19 61 23 62 34 64 58 65 5 66 45 13 67 9 71 55 72 68 73 74 75 43 76 40 77 63 69 78 36 80 82 25 84 53 3 48 30 85 70 37 81 86 87 4 88 18 79 89 83 90 56 91 49 92 54 
1 146 131 142 105 86 4 92 3 123 ...

result:

ok Correct (1002 test cases)

Test #46:

score: 0
Accepted
time: 149ms
memory: 4036kb

input:

1003
2339
1433 1479 282 611 118 1509 1150 1827 602 1702 2277 2323 801 1523 2076 1683 1708 688 1959 20 2230 395 1564 1709 2080 304 1305 2160 733 915 771 1611 2104 985 1178 1657 2112 632 1927 1998 911 1366 1251 1926 1527 1810 47 1570 572 1764 1161 1399 1464 1870 155 1092 2010 2060 2270 1372 786 1595 4...

output:

20 47 78 87 100 113 5 118 665 127 138 99 139 449 2041 1822 811 1375 323 2054 1058 2307 2013 1801 1845 151 55 155 2022 1223 44 1926 694 391 399 1128 89 174 1112 329 1369 1070 1206 1415 82 177 616 908 529 574 1991 837 156 1654 1811 655 1447 1802 759 105 184 736 1839 2167 131 190 1042 683 2168 1328 844...

result:

ok Correct (1003 test cases)

Test #47:

score: 0
Accepted
time: 148ms
memory: 4124kb

input:

1004
932
1 732 177 4 5 6 79 8 9 10 11 12 13 14 15 429 819 618 19 20 859 22 23 281 25 26 27 857 35 30 884 32 33 118 623 914 37 38 39 40 41 372 136 807 45 46 47 48 263 627 790 530 599 54 892 222 876 58 59 60 61 62 63 64 443 66 370 68 69 169 71 72 73 74 214 88 77 78 7 167 451 352 76 84 425 241 87 83 89...

output:

1 4 5 6 8 9 10 11 12 13 14 15 19 20 22 23 25 26 27 30 32 33 29 35 623 37 38 39 40 41 45 46 47 48 54 58 59 60 61 62 63 64 66 68 69 71 72 73 74 77 78 7 79 84 87 76 88 83 89 90 92 93 94 96 97 98 100 101 102 103 104 106 108 109 110 112 113 114 117 34 118 119 120 121 124 125 126 129 132 135 43 136 137 13...

result:

ok Correct (1004 test cases)

Test #48:

score: 0
Accepted
time: 155ms
memory: 4140kb

input:

1005
656
506 74 507 505 512 187 641 151 469 182 234 457 359 18 15 259 1 153 561 326 116 107 55 102 123 51 200 235 227 410 581 286 33 58 558 514 518 453 431 272 264 42 138 101 60 27 4 545 468 12 84 257 494 406 10 83 451 93 419 474 625 541 373 293 390 647 86 485 575 233 499 573 498 633 77 205 439 418 ...

output:

15 10 182 145 14 18 153 536 351 379 563 377 289 23 55 33 42 26 51 84 134 297 149 34 58 93 650 413 45 60 474 287 87 97 262 314 255 118 157 540 213 16 259 277 655 275 56 83 242 24 102 305 91 21 116 133 146 104 147 345 8 151 570 332 411 556 598 75 77 439 155 445 43 138 554 592 284 188 403 291 69 575 48...

result:

ok Correct (1005 test cases)

Test #49:

score: 0
Accepted
time: 144ms
memory: 3824kb

input:

10000
4
1 2 4 3
108
48 64 35 75 59 65 101 93 56 104 83 100 69 43 38 18 15 67 33 29 92 51 77 52 44 36 96 66 89 24 70 16 31 72 7 40 95 45 79 84 28 3 82 71 12 34 47 1 103 105 20 37 5 85 42 86 32 80 58 60 49 62 8 2 57 4 99 21 78 22 11 46 63 26 91 13 39 50 14 98 17 61 81 108 53 9 107 19 87 90 94 102 73 4...

output:

1 2 3 4 
6 65 57 32 16 18 67 99 68 21 92 102 14 43 82 61 49 103 88 19 33 31 70 22 51 20 29 89 87 107 23 77 39 79 26 36 40 84 108 97 27 96 74 11 83 81 17 15 38 45 12 100 25 44 71 47 1 48 24 52 37 95 30 9 56 86 3 35 7 101 54 85 53 5 59 58 80 98 55 42 60 62 2 64 4 75 91 94 41 28 66 13 69 78 50 105 106 ...

result:

ok Correct (10000 test cases)

Test #50:

score: 0
Accepted
time: 147ms
memory: 3800kb

input:

10001
35
13 31 11 23 35 1 26 21 34 3 10 20 14 5 16 24 33 2 9 32 17 30 15 8 29 18 28 27 6 19 12 22 4 7 25
27
5 18 17 26 6 19 25 21 3 1 2 27 4 12 13 20 7 23 14 9 11 22 24 8 15 16 10
309
92 183 305 4 100 249 93 83 101 245 226 56 131 58 186 179 94 187 71 11 52 147 16 207 75 146 3 122 285 123 152 150 259...

output:

3 11 10 1 13 14 5 35 25 29 6 4 23 15 16 24 8 21 17 33 27 28 2 31 12 20 32 22 30 19 9 34 7 26 18 
1 5 6 19 14 12 27 10 3 17 7 25 15 13 4 26 16 20 9 2 18 23 24 8 21 11 22 
4 21 52 107 233 181 12 56 14 58 209 287 96 264 19 71 289 55 174 116 221 105 8 83 17 94 88 172 63 45 87 136 167 104 296 78 267 290 ...

result:

ok Correct (10001 test cases)

Test #51:

score: 0
Accepted
time: 147ms
memory: 4036kb

input:

10002
402
275 227 367 402 91 249 345 167 268 222 290 36 215 156 280 23 78 119 240 231 129 300 270 293 378 352 10 107 76 112 234 301 216 82 336 221 252 386 37 147 110 348 173 118 127 385 377 286 135 214 287 132 384 382 321 61 387 83 272 172 186 150 370 210 116 28 332 140 397 284 322 64 103 209 188 26...

output:

4 402 202 219 108 99 178 12 36 221 257 331 74 209 283 359 223 42 348 53 384 246 349 306 120 368 235 190 251 381 180 333 304 341 388 45 127 101 296 203 136 187 174 340 258 328 364 379 267 353 49 135 96 318 97 6 249 396 330 183 24 293 48 286 208 316 194 362 244 311 342 160 43 173 54 382 104 393 373 69...

result:

ok Correct (10002 test cases)

Test #52:

score: 0
Accepted
time: 144ms
memory: 3728kb

input:

10003
18
16 7 15 4 13 14 17 11 10 3 6 2 18 9 12 1 8 5
40
20 22 33 29 25 19 40 28 36 30 9 7 12 34 38 24 6 14 18 15 37 8 3 1 13 35 26 27 5 31 21 39 10 4 11 23 32 2 17 16
19
19 13 10 4 16 15 8 14 3 9 5 12 2 11 18 7 6 1 17
187
1 2 3 4 5 6 40 8 154 10 11 12 13 14 15 141 17 18 19 20 21 22 23 24 25 26 27 2...

output:

4 5 13 18 2 7 17 8 11 6 14 9 10 3 15 12 1 16 
1 20 15 38 2 22 8 28 27 26 35 11 9 36 23 3 33 10 30 31 21 37 32 39 17 6 19 18 14 34 4 29 5 25 13 12 7 40 16 24 
4 3 10 9 12 2 13 1 19 17 6 15 18 5 16 7 8 14 11 
1 2 3 4 5 6 8 10 11 12 13 14 15 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 3...

result:

ok Correct (10003 test cases)

Test #53:

score: 0
Accepted
time: 149ms
memory: 3804kb

input:

10004
67
45 3 27 21 49 35 66 32 64 15 59 48 36 19 53 25 52 12 29 63 33 37 43 14 62 65 67 5 8 54 11 41 44 22 23 55 50 7 58 16 39 6 40 28 51 9 20 61 38 30 10 13 60 17 56 4 42 18 26 1 57 24 2 46 34 47 31
349
283 187 282 266 5 58 233 264 44 184 210 158 104 14 48 179 2 291 218 207 15 22 342 333 141 298 2...

output:

1 45 51 10 15 53 60 6 35 23 43 40 16 25 62 24 14 19 29 8 32 41 39 58 18 12 48 61 57 42 2 3 27 67 31 11 59 26 65 34 22 37 50 30 54 17 52 13 36 55 56 4 21 33 44 28 5 49 38 7 66 47 20 63 9 64 46 
5 14 22 39 41 9 44 80 297 206 131 76 344 183 246 175 129 347 107 42 45 155 244 272 55 221 328 15 48 21 49 6...

result:

ok Correct (10004 test cases)

Test #54:

score: 0
Accepted
time: 145ms
memory: 3700kb

input:

10005
64
12 21 16 34 42 8 54 19 22 48 59 55 62 47 13 64 61 60 29 6 23 2 49 5 44 56 33 26 25 37 39 57 27 52 14 11 20 18 3 36 30 50 53 58 46 38 35 10 32 4 31 24 45 1 7 28 51 41 63 43 9 15 40 17
43
41 33 31 14 12 27 11 16 22 40 8 19 30 10 6 5 29 35 24 1 42 20 38 34 13 17 4 18 21 37 25 43 3 2 15 9 36 39...

output:

6 8 19 29 25 44 58 41 30 37 20 1 12 55 7 54 2 21 23 49 32 57 51 31 39 3 16 64 17 61 9 22 27 33 4 34 52 24 5 42 50 14 47 35 10 48 26 56 28 11 59 63 40 36 18 60 43 53 45 46 38 13 62 15 
1 41 32 43 23 38 39 26 17 29 21 42 28 18 35 15 6 27 4 14 10 40 7 11 8 16 5 12 19 24 34 2 33 3 31 25 13 30 37 36 9 22...

result:

ok Correct (10005 test cases)

Test #55:

score: 0
Accepted
time: 149ms
memory: 3624kb

input:

99995
20
3 13 5 2 1 12 9 14 10 6 7 16 4 20 11 8 18 17 15 19
28
26 5 14 25 2 19 12 18 24 9 1 3 7 22 11 6 10 21 4 28 16 13 17 23 20 15 27 8
1
1
9
1 7 8 9 5 3 4 6 2
12
4 9 8 6 2 1 7 11 12 10 3 5
10
1 2 3 4 5 6 7 8 9 10
41
13 24 5 22 3 10 23 12 15 6 11 9 1 20 39 16 17 18 19 35 30 25 7 27 8 26 2 28 29 21...

output:

1 3 5 6 12 16 8 14 20 19 15 11 7 9 10 2 13 4 17 18 
2 5 3 14 22 13 7 12 4 25 20 28 8 18 21 16 6 19 9 24 23 17 10 1 26 15 11 27 
1 
1 5 3 8 6 2 7 4 9 
1 4 6 7 3 8 11 2 9 12 5 10 
1 2 3 4 5 6 7 8 9 10 
3 5 6 10 11 1 13 4 22 25 8 12 9 15 39 36 16 17 18 19 14 20 35 7 23 2 24 27 26 28 29 21 30 31 32 33 3...

result:

ok Correct (99995 test cases)

Test #56:

score: 0
Accepted
time: 148ms
memory: 3548kb

input:

99996
1
1
12
3 8 12 6 7 10 1 4 9 2 5 11
5
1 2 5 4 3
23
22 6 15 9 14 8 7 4 10 18 20 16 2 3 1 5 12 11 17 13 19 23 21
18
11 18 3 9 17 7 4 8 16 10 15 14 12 13 1 6 5 2
3
3 1 2
18
10 14 5 9 16 7 17 13 15 1 2 8 11 12 18 3 6 4
1
1
2
1 2
6
1 5 4 6 3 2
1
1
21
1 2 10 15 5 6 7 8 9 3 11 12 13 14 4 16 17 18 19 20...

output:

1 
1 3 12 11 5 7 2 8 4 6 10 9 
1 2 4 3 5 
2 6 8 4 9 10 18 11 20 13 7 1 22 23 21 19 17 12 16 5 14 3 15 
3 8 4 9 16 6 7 10 1 11 15 12 14 13 5 17 2 18 
1 3 2 
3 5 16 6 7 17 4 9 15 18 1 10 2 14 12 8 13 11 
1 
1 2 
1 2 5 3 4 6 
1 
1 2 5 6 7 8 9 3 10 11 12 13 14 4 15 16 17 18 19 20 21 
1 2 7 8 9 6 3 5 4 
...

result:

ok Correct (99996 test cases)

Test #57:

score: 0
Accepted
time: 142ms
memory: 3916kb

input:

99997
5
2 3 4 5 1
8
3 6 2 1 8 7 5 4
18
3 11 16 13 2 17 10 5 14 6 18 15 12 1 7 9 8 4
6
6 5 1 3 2 4
17
11 2 8 9 12 17 10 15 4 16 1 5 13 14 3 7 6
2
2 1
7
7 5 3 4 2 6 1
4
1 2 3 4
4
4 1 2 3
7
3 2 4 6 1 5 7
11
10 2 3 4 5 6 7 8 9 1 11
2
1 2
1
1
5
1 2 3 4 5
8
8 5 1 3 7 4 6 2
19
1 4 3 2 19 12 7 16 9 10 11 6 ...

output:

1 2 3 4 5 
1 3 2 6 7 5 8 4 
1 3 16 9 14 2 11 18 4 13 12 15 7 10 6 17 8 5 
2 5 1 6 4 3 
2 3 8 15 4 9 7 10 16 1 11 5 12 13 14 6 17 
1 2 
3 4 2 5 6 1 7 
1 2 3 4 
1 4 3 2 
2 1 3 4 6 5 7 
2 3 4 5 6 7 8 9 1 10 11 
1 2 
1 
1 2 3 4 5 
1 8 2 5 7 6 4 3 
1 3 2 4 7 9 10 11 6 12 13 14 15 8 16 17 18 5 19 
2 5 8 7...

result:

ok Correct (99997 test cases)

Test #58:

score: 0
Accepted
time: 149ms
memory: 3612kb

input:

99998
15
10 13 6 14 7 8 15 1 9 12 5 4 2 3 11
10
8 7 9 2 3 4 6 10 5 1
1
1
9
7 2 1 4 5 6 9 8 3
15
10 9 3 4 5 14 11 8 2 1 12 6 13 7 15
10
9 6 7 1 8 10 2 3 5 4
18
1 2 3 16 5 6 7 8 17 10 11 12 13 14 15 4 9 18
4
1 3 2 4
5
1 2 3 4 5
40
38 18 9 39 22 40 24 5 1 31 10 27 32 4 29 33 13 21 37 8 19 30 34 3 25 35...

output:

1 10 12 4 14 3 6 8 5 7 15 11 9 2 13 
2 7 6 4 1 8 10 3 9 5 
1 
2 4 5 6 1 7 9 3 8 
3 4 5 8 2 9 1 10 6 14 7 11 12 13 15 
1 9 5 8 3 7 2 6 10 4 
1 2 3 5 6 7 8 10 11 12 13 14 15 4 16 9 17 18 
1 2 3 4 
1 2 3 4 5 
2 18 21 19 37 36 20 8 5 22 30 23 34 6 40 25 10 31 17 13 32 11 15 29 16 33 1 38 7 24 3 9 4 39 2...

result:

ok Correct (99998 test cases)

Test #59:

score: 0
Accepted
time: 144ms
memory: 3672kb

input:

99999
33
7 26 21 23 17 27 13 16 28 2 11 19 15 20 4 14 6 1 5 8 30 9 12 22 32 10 29 3 33 31 18 24 25
16
13 15 5 1 16 14 2 6 3 10 4 12 7 8 11 9
19
17 16 6 9 1 10 5 7 4 14 11 3 2 12 15 13 18 8 19
15
4 5 11 13 3 12 6 15 14 7 10 1 8 2 9
3
1 2 3
7
1 3 7 6 4 2 5
6
2 4 1 3 6 5
9
3 8 4 9 1 7 5 2 6
25
12 3 21 ...

output:

1 7 13 15 4 23 12 19 5 17 6 27 29 33 25 32 24 22 9 28 3 21 30 31 18 11 8 16 14 20 2 26 10 
3 5 16 9 10 12 1 13 7 2 15 11 4 6 14 8 
3 6 10 14 12 4 9 11 15 2 16 13 1 17 18 8 7 5 19 
1 4 13 8 15 9 14 2 5 3 11 10 7 6 12 
1 2 3 
1 2 3 7 5 4 6 
1 2 4 3 5 6 
1 3 4 9 6 7 5 2 8 
2 3 21 5 4 10 1 12 9 13 15 16...

result:

ok Correct (99999 test cases)

Test #60:

score: 0
Accepted
time: 148ms
memory: 3672kb

input:

100000
1
1
9
8 1 2 7 5 3 4 6 9
14
4 2 10 5 6 12 13 1 8 11 9 3 14 7
7
4 6 5 3 7 2 1
46
31 34 46 5 4 36 24 21 3 16 23 2 29 38 14 10 15 35 45 12 19 39 25 37 33 7 22 43 1 41 9 13 27 40 17 42 26 20 11 18 30 28 44 6 8 32
4
1 4 3 2
1
1
14
1 2 3 10 14 12 13 4 9 8 7 6 5 11
1
1
27
11 25 22 26 5 14 27 21 13 15...

output:

1 
5 4 7 1 8 6 3 2 9 
2 1 4 5 6 12 3 10 11 9 8 7 13 14 
1 4 3 5 7 2 6 
4 5 10 16 11 23 25 33 27 22 39 7 24 37 26 1 31 9 3 46 32 13 29 6 36 42 28 43 44 2 34 40 18 35 17 15 14 38 20 12 30 41 8 21 19 45 
1 3 2 4 
1 
1 2 3 9 4 10 8 6 12 5 14 11 7 13 
1 
5 1 11 9 13 12 17 6 14 4 26 19 8 21 23 10 15 20 18...

result:

ok Correct (100000 test cases)

Extra Test:

score: 0
Extra Test Passed