QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#118352#6645. 百合monstersqwqAC ✓1841ms31052kbC++142.9kb2023-07-03 13:46:322023-07-03 13:46:40

详细

Test #1:

score: 100
Accepted
time: 1517ms
memory: 30416kb

input:

17 176734 32035
174241040 312806717 869838047 1051792036 618192507 729602782 144984364 904057367 922632751 676477964 651564213 314995751 370303789 14711019 7843270 941966995 532030000
50422 32035 12218
70235 32035 1913
84994 70235 27964
94874 84994 3469
32802 50422 6989
18176 32802 17541
91233 50422...

output:

104839 7871804 62870 66963 79027 7868957 77164 7858869 7869592 7863873 7863873 64039 51115 104082 70150 72482 57864 60745 69433 62907 88618 7858789 7881299 7872044 51092 68271 7855529 7881281 94531 87056 7877506 59789 80215 7863790 87126 74831 74335 62096 51671 68573 7863873 44764 7875532 7860660 78...

result:

ok 131072 numbers

Test #2:

score: 0
Accepted
time: 1603ms
memory: 30420kb

input:

17 176212 20091
392277488 698823094 582086238 447385832 622518764 208690926 775619442 567863179 13977589 50850816 267403222 328363485 916183112 944905238 1011929351 249009753 401848904
64159 20091 30248
74808 64159 10702
48713 20091 22684
21556 64159 25421
75628 21556 6453
85932 48713 4419
33928 215...

output:

13979591 13977589 85812 59060 13978387 13978365 70640 60270 83204 79777 83619 59898 62096 90330 65127 76343 84817 111495 13978894 68954 73780 58077 33835 13978365 61002 38772 13978827 80311 68651 13978894 105697 13978387 74211 62661 13979545 13979878 13978365 88993 88616 13978365 79178 88064 1398377...

result:

ok 131072 numbers

Test #3:

score: 0
Accepted
time: 1528ms
memory: 29952kb

input:

17 164940 23052
895581829 956189191 390262621 44470209 625381090 219286607 838161654 701625817 481927460 1065410894 727101932 1053070422 922199642 133378952 249675230 860791006 315050583
106085 23052 31345
34166 106085 16561
57294 23052 19164
125595 106085 18210
60488 125595 17019
87411 60488 6594
6...

output:

75531 74615 60203 94558 103143 83075 90846 74715 107443 85113 84009 70884 121361 44485466 89948 44480503 96332 44500297 44500318 53038 96780 76667 78369 68241 69258 91845 73450 44480503 99030 72507 44480503 103214 44485466 87358 66746 75261 71860 62452 44491718 44482441 78818 75606 59082 82455 88224...

result:

ok 131072 numbers

Test #4:

score: 0
Accepted
time: 1349ms
memory: 30536kb

input:

17 175166 28972
828350383 397146793 6582620 312380785 631204045 240609039 963246078 969151092 344150914 947047401 572790296 355131720 934199934 657810028 872617866 1010644454 141486710
26097 28972 772
51185 28972 28279
41688 26097 12124
5993 26097 3789
30207 5993 5381
90370 28972 10942
50389 41688 7...

output:

78682 6599844 86789 67028 52360 71175 6611542 73131 88255 79628 76907 101914 73825 76900 66991 75572 6599844 88596 116415 70460 6598304 77636 81676 6609054 55516 6599844 45759 44715 63090 6586402 83934 6599813 34294 47515 35675 64502 69165 82774 50336 6606825 6600992 51502 6611024 58541 6608304 6874...

result:

ok 131072 numbers

Test #5:

score: 0
Accepted
time: 1546ms
memory: 30276kb

input:

17 163895 31933
257912900 654447354 888468059 983206985 634066371 251204719 1025755522 29204673 812100785 887832887 1032489005 6096833 940216464 920025566 110330976 548683882 54688390
68023 31933 1869
10543 31933 1370
50268 10543 8604
110033 68023 29346
113371 110033 15947
91850 110033 13117
77721 5...

output:

68166 63674 56588 58633 6096938 6104762 66086 77005 48536 63619 73379 52854 75020 6096938 79211 57627 6096938 89780 59761 84005 67802 93895 54226 95525 63955 56419 62074 73126 6096938 6100312 40452 71482 73826 53131 91311 6103846 6097212 6099564 82809 6097212 6097212 70830 73106 78305 6096938 73539 ...

result:

ok 131072 numbers

Test #6:

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

input:

6 72 34
2766517 2961211 8045573 1495370 169156 5190353
21 47 24232
16 36 287
33 44 31867
8 55 24615
32 46 32384
13 4 3612
55 28 4976
38 45 23398
55 58 17408
23 25 23270
30 25 13777
14 10 8448
52 27 609
24 61 6586
39 19 12451
10 7 11358
33 17 11820
60 15 7312
35 20 19731
15 23 25523
47 48 24059
17 49...

output:

85506 100727 171231 243379 93319 82930 224879 110783 73527 135302 99425 190108 116948 89707 90977 43624 113901 123463 58481 91539 55587 69243 139136 69147 67637 92417 126877 98858 96441 124407 106194 95645 85365 111643 0 75318 113614 117827 70177 103990 88047 114333 127948 204207 79776 46779 117749 ...

result:

ok 64 numbers

Test #7:

score: 0
Accepted
time: 2ms
memory: 9660kb

input:

8 93 96
4960016 6151038 8168693 1343995 6059085 2753465 3573178 599297
89 128 29200
240 77 1329
184 155 26495
97 112 7994
122 182 12214
175 41 17220
12 77 25649
74 140 11361
70 215 30537
241 24 3305
156 79 5157
68 210 4795
81 39 21839
254 72 17574
69 129 22928
189 177 5261
36 171 29953
135 144 770
2...

output:

1370449 1360064 1966467 1343995 1359429 1343995 1343995 1966467 1966467 634293 1253298 1966467 1343995 1966467 1946597 1944621 1946479 1343995 1343995 1945224 1343995 1966467 1347902 1978288 1343995 1966467 2010587 2687990 1960250 2008296 1978288 2591349 1990691 2008296 1978288 1992466 1978288 13445...

result:

ok 256 numbers

Test #8:

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

input:

1 53 0
1856189
1 1 4987
0 1 4654
0 1 27189
1 0 1103
1 1 17105
0 1 16668
0 0 27408
0 0 6395
0 0 14181
1 1 30658
1 0 24150
0 1 22410
1 1 28334
0 1 4896
0 1 18345
1 0 19744
1 1 23682
1 0 24052
0 0 26887
0 0 10834
1 0 8991
0 1 13549
0 0 30062
1 1 374
0 1 31086
0 0 17439
1 1 19393
0 0 12346
1 0 901
1 1 2...

output:

0 70 

result:

ok 2 number(s): "0 70"

Test #9:

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

input:

2 14 1
7129195 923585
0 3 13928
2 0 18847
0 1 6663
3 2 7422
1 3 13152
0 0 28138
3 1 22699
3 1 12726
1 0 16416
1 0 14949
0 1 28038
2 2 32719
1 3 27846
1 1 25825

output:

6663 0 20148 12726 

result:

ok 4 number(s): "6663 0 20148 12726"

Test #10:

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

input:

2 74 3
4014616 2526690
0 3 25438
2 0 22929
1 3 3924
1 3 7605
3 0 8246
0 3 22732
1 2 28899
0 0 31462
1 0 24415
3 2 20080
3 3 18562
2 0 27659
1 2 17492
2 3 508
3 3 12275
1 1 20212
3 0 14906
1 3 31549
2 2 14983
1 2 10397
1 1 9540
1 2 28766
0 3 2088
3 1 26723
0 2 10321
0 1 31547
1 3 13977
0 2 13436
2 3 ...

output:

2088 2064 508 0 

result:

ok 4 number(s): "2088 2064 508 0"

Test #11:

score: 0
Accepted
time: 233ms
memory: 20528kb

input:

15 151529 0
1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823 1073741823
29864 29863 20164
2302 2301 20220
24385 20289 1
31319 27223 1
26426 30523 22800
23215 27311 1
26415 30511 1
27436 27435 259...

output:

0 549 982 1482 2512 4269 4932 4972 6713 8309 8954 9358 10463 12201 12274 13582 13930 14879 15230 15804 16733 17633 17960 18151 18879 19880 20355 21107 21670 21821 21907 23112 23167 23484 23754 24510 26085 27288 28983 29223 30775 31632 32494 32798 34346 34566 34592 36321 37143 37522 38299 38896 39590...

result:

ok 32768 numbers

Test #12:

score: 0
Accepted
time: 1841ms
memory: 30880kb

input:

17 200000 8165
100000 12000 11000 17000 11000 10000 100030 100008 100009 10000 120001 10003 10007 110011 10009 10008 100005
92941 8165 6
107795 8165 5
94451 92941 4
42940 8165 3
69326 92941 2
55260 107795 6
70477 42940 1
95333 42940 1
28019 92941 10
93769 42940 2
43629 8165 10
22517 28019 3
55563 92...

output:

25 24 10004 29 23 22 20 10 29 26 28 20 28 26 23 10000 31 27 10003 10004 21 32 20 30 10003 10004 29 10003 20 30 10003 10004 21 10003 26 10004 28 42 18 24 31 24 10004 43 10005 17 30 24 10000 10004 24 10000 29 31 10000 27 35 10000 21 25 24 16 28 30 24 21 22 18 29 31 25 10004 27 10004 29 21 29 28 31 30 ...

result:

ok 131072 numbers

Test #13:

score: 0
Accepted
time: 1751ms
memory: 30896kb

input:

17 200000 4569
12331230 10656881 18000781 17479335 17637643 17797043 11175394 15082501 17428007 10090363 10655438 15298775 13808578 10486640 19573686 11402664 14307509
58781 4569 438
3311 58781 524
118685 58781 407
102551 58781 867
50697 58781 411
18865 102551 100
94330 102551 180
93155 118685 849
4...

output:

2112 1785 2057 10090386 2388 2627 2725 2375 2469 10090664 2124 1794 2060 2479 10090649 2138 2380 10090386 2175 2099 1997 3158 1599 3005 10090736 10090649 2417 2094 2337 2295 2025 1959 2554 2380 10090386 2452 10090788 2165 2118 2948 2350 10090649 2147 10090386 1158 2144 1979 2269 2391 2768 2727 10090...

result:

ok 131072 numbers

Test #14:

score: 0
Accepted
time: 1754ms
memory: 31020kb

input:

17 200000 7475
25947966 25721094 24522766 29806828 24686197 22345950 26075090 20120141 29436733 27115190 24372670 28182903 24264124 20751713 24312376 28963342 29564859
98293 7475 8825
113135 98293 6094
90859 98293 2678
122679 7475 1992
4878 7475 2412
95826 113135 9354
109027 90859 8403
117157 90859 ...

output:

21851 20273 20121794 6608 15256 24067 26187 21371 17445 28772 11834 20121575 25173 16565 23650 22034 19704 20122392 32267 15077 21478 20121695 20120777 20122392 18884 18854 15090 17931 13965 23714 20120141 21457 24164 21042 28859 20120777 20120141 20121695 20120777 20149 20120141 14970 17239 20381 2...

result:

ok 131072 numbers

Test #15:

score: 0
Accepted
time: 1576ms
memory: 31052kb

input:

17 200000 16718
634430690 663154371 574368096 917353927 964155312 877139960 752868853 699024955 978012372 769810429 833177816 992592575 817177877 933006801 584581900 542095197 528570831
11944 16718 6168
40090 16718 10563
77581 40090 10577
23609 11944 2505
89099 77581 1276
78781 89099 1010
46020 7758...

output:

25853 24916 28612 34543 28968 22713 32683 528604639 28916 24252 31543 27214 32679 34646 31740 36589 528607045 23530 33732 528600751 17607 27174 28871 37789 29044 25831 15354 37577 528607960 528598446 528598153 26854 29697 30799 528601585 35647 29692 19163 29269 15758 542110138 26203 19108 23849 5421...

result:

ok 131072 numbers

Test #16:

score: 0
Accepted
time: 578ms
memory: 22780kb

input:

16 24289 3861
413061728 472631742 380229159 672331564 367040247 877817633 73798994 3175878 1011348277 456711848 385371967 612655360 921295638 824410423 826749191 329986985
11500 40106 9621
47817 1629 23004
49229 26595 21413
6511 54673 357
8202 39281 18829
38066 20534 22320
24970 7079 26050
2215 4435...

output:

6351771 6351756 3175878 6351771 6351756 6351771 6351780 3196820 3175878 3204774 6351771 3175878 3208951 3182959 3175878 6351771 3199661 6351771 6351773 6351756 3182406 3191477 6351756 6351782 6351771 6351756 3175878 6351771 6351756 6351771 3205903 3222113 3175878 6351782 6351771 3175878 6351764 3195...

result:

ok 65536 numbers

Test #17:

score: 0
Accepted
time: 574ms
memory: 16568kb

input:

16 13018 6821
916300533 729997839 188372774 269415940 369935341 888413314 136341206 136938515 405589092 397530101 845103445 263620473 927312168 12884137 64462301 941768237
48380 49264 27675
16147 26523 27925
22321 2408 1017
2991 27640 24423
992 24140 14624
48631 22013 12360
27144 34412 21802
23398 5...

output:

25826004 38661887 38661887 38654111 25773123 25801461 25814791 25848598 38661887 25786341 38667051 38661873 38653498 25792051 25799963 25899256 25807588 25803912 38664275 25970804 25929832 25904970 38661887 38667287 38656202 38661887 25796074 25804282 38661887 38667287 38670876 38655153 38659538 257...

result:

ok 65536 numbers

Test #18:

score: 0
Accepted
time: 470ms
memory: 16204kb

input:

16 1746 9782
345863050 987331168 1070290981 940242140 372830434 899074530 198850650 270701153 873538963 338348355 231060331 988392946 933328698 275099675 375950003 479807666
19723 25654 12961
17244 18649 78
28180 10989 13389
65008 33376 15721
26549 9000 10420
59197 23493 2400
62087 61744 17554
11814...

output:

198850650 270701153 397701300 198850650 397701300 198850650 372830434 397701300 270701153 397701369 198850650 270701153 198850650 270701153 397701300 198850650 397701300 198850650 372830434 397701300 372830434 397701300 397701300 372830434 198850650 270701153 397701300 198850650 198880069 198850650 ...

result:

ok 65536 numbers

Test #19:

score: 0
Accepted
time: 614ms
memory: 22944kb

input:

16 23243 12742
849101855 170889905 878434596 537326516 375692760 909735746 261392862 404496558 267779778 279166609 690759041 639390827 939312460 537315213 687437705 17847094
23835 2044 31015
51109 43543 4998
1271 19569 25761
61488 39111 7019
19338 59396 6215
36994 57740 25208
64261 56308 13306
32997...

output:

206767433 242593202 143236087 178996299 242545744 206775146 107536769 224606529 188944802 188806730 188799785 196776919 125535682 125480112 89500014 143385543 206854276 188856687 206767433 171089769 178916539 224697186 188930559 107443428 188856687 188961464 125340264 188806730 188918355 188856687 1...

result:

ok 65536 numbers

Test #20:

score: 0
Accepted
time: 551ms
memory: 23296kb

input:

16 22720 798
1067138303 556939050 590650019 1006694905 380019017 388823891 892060708 68269603 432833672 727248517 306598050 652791329 411449959 393800376 617749194 398664444
30002 15781 25328
36371 48115 28763
42827 16057 27935
23440 64097 26734
8522 3918 16292
3690 59960 26652
51139 64539 6933
3200...

output:

68288261 68292753 68282552 68278843 68273943 68293875 68354151 68292753 68292753 68301368 68293875 68307611 68293875 68284114 68292753 68293875 68321590 68336761 68281276 68292753 68293875 68307611 68304968 68293875 68294921 68289039 68292753 68334936 68307611 68274416 68293875 68280114 68273943 682...

result:

ok 65536 numbers

Test #21:

score: 0
Accepted
time: 1687ms
memory: 30032kb

input:

17 168537 3555
663946237 423811829 436053657 466609179 414694606 516463575 568628819 599843268 679785148 17067561 454371753 759798734 483582782 319095822 60503251 223879470 208745964
125677 57707 16772
19161 11664 14832
119026 8918 13970
1846 97113 20299
84379 105374 32172
77713 98042 11697
32079 88...

output:

157675 139842 146220 17092897 121831 183856 191436 149983 64014 146854 177495 161186 158038 136376 126675 165244 152187 151714 17101480 150389 131388 140014 169738 156336 121177 155780 87538 17101480 145610 171520 17067561 186552 17085665 208770 17071189 102919 167551 17085665 75614 166683 138608 14...

result:

ok 131072 numbers

Test #22:

score: 0
Accepted
time: 1555ms
memory: 30084kb

input:

17 157266 6515
93508754 681177926 244197272 63693555 417589700 527092023 631171031 733605905 74025963 1031627639 914070463 410829383 489566544 581311360 371990953 835660722 121980411
36531 121584 17869
11286 45360 20691
127607 11986 10450
105885 1229 13088
36471 118544 9969
79193 75910 13871
26643 2...

output:

240550 208224 137817 181466 220345 207826 205476 213905 252963 63770426 245344 200278 190341 206658 226051 63733541 203933 208496 177796 63784126 206053 225330 177021 214177 210894 211953 225811 165816 63760721 63745274 63753568 191138 216119 205813 63733541 204694 245241 202575 172197 180035 178461...

result:

ok 131072 numbers

Test #23:

score: 0
Accepted
time: 1540ms
memory: 30608kb

input:

17 178763 9475
596747559 938478487 52373655 734519755 420452025 537753239 693680475 867401311 542008602 972445892 300060117 61860032 495583074 843526898 683445887 373732918 35182091
111225 54390 18967
3412 79056 26550
103419 15055 6930
78852 69185 5877
54099 66178 20535
80672 86546 16046
53976 29453...

output:

159037 35371252 214446 203578 216069 168179 187956 188111 186633 195698 202581 173743 35408540 183385 204159 204577 180599 208229 185651 159088 204838 216315 170086 211019 207989 202092 202047 207423 167387 185250 186606 52482569 196647 180500 207589 206735 179010 195619 201831 198952 189699 201638 ...

result:

ok 131072 numbers

Test #24:

score: 0
Accepted
time: 1426ms
memory: 30440kb

input:

17 167492 12436
26310076 122102760 934259095 331604131 423347119 548381688 756222687 1001131180 1009991241 913264146 759791595 786566969 501599604 32033380 994966357 985514170 1022125594
87615 118267 20064
126610 79983 32410
112000 50891 3410
19052 6069 31435
6191 46581 31100
82152 97182 18220
48540...

output:

26381281 26438676 26394864 26435086 26418804 26417545 26430892 26449589 26487234 26436207 26450520 26422810 26396770 26432807 26423785 26423691 26410394 26400928 26361783 52671859 26461443 26464222 26437257 26423365 26418815 52706157 26448184 52648940 26463520 26401031 26438970 26512043 26403142 264...

result:

ok 131072 numbers

Test #25:

score: 0
Accepted
time: 1570ms
memory: 30132kb

input:

17 155698 3452
747585329 765452466 454683669 398024128 430568470 38098281 375658153 798699630 569285951 228422484 835296546 450965352 1053462688 150668545 162990956 904338181 805113409
12206 81352 6424
90540 383 14289
117068 107715 27378
49773 77655 13408
1108 95890 8362
118618 74621 7272
116871 122...

output:

176072 191620 199682 38128452 189899 38145388 216331 213606 201303 227218 185667 149299 207981 169718 187883 165248 215793 148078 201613 192244 38098281 177432 120710 190376 38098281 38150388 103742 180628 38147636 231165 166062 137134 141539 202514 193147 160970 179776 146479 225125 166550 127932 1...

result:

ok 131072 numbers

Test #26:

score: 0
Accepted
time: 1549ms
memory: 30472kb

input:

17 169123 20295
224999303 15541820 544858983 584555934 590771037 91646923 87818951 170084920 235008752 701850026 579328228 946063017 850099587 208017969 806921173 1035575980 282855837
94493 20295 18176
95889 20295 11788
85397 20295 28634
122310 20295 6434
45562 95889 21305
102425 20295 13268
93720 1...

output:

52200 75805 74651 15560277 77426 91458 90612 28310 56165 69758 15561155 34344 15564852 15570130 15570130 15564852 67824 71274 15576538 15568274 67829 40982 15569785 15576538 52475 15568274 39806 15577099 70341 63227 38176 69473 75204 74706 15561155 65630 15565723 90605 91292 86198 15561155 48123 155...

result:

ok 131072 numbers

Test #27:

score: 0
Accepted
time: 1657ms
memory: 30604kb

input:

17 178826 14273
375837073 916257623 947136228 248060307 600887481 665766556 843571221 101448775 262286100 1031601210 40822833 261426513 334237378 588934208 286466242 492472186 1052819923
126546 14273 5633
19177 126546 32295
66278 126546 16315
125999 19177 13964
58107 14273 9132
42068 58107 4494
5831...

output:

40828848 40828466 40830156 66144 84668 76399 91319 40828466 110821 110987 78291 80437 65562 90990 40822833 64834 73304 40830309 77214 83020 78280 121355 61547 115525 63360 91194 40822833 31351 74935 67379 84529 78594 40828466 40828848 40828848 40828466 84694 40834035 83439 56748 78906 40828549 69084...

result:

ok 131072 numbers

Test #28:

score: 0
Accepted
time: 1665ms
memory: 30456kb

input:

17 178303 2329
593873521 228499409 659417187 717428695 605213737 144854700 400464475 838930875 427372763 405941294 730370898 274827014 880116701 445353835 216810499 873289536 922638827
74747 2329 23663
23749 74747 8315
95533 23749 11035
19914 2329 3148
68165 23749 8596
109823 95533 24140
99310 19914...

output:

144866538 64034 144854700 70609 62077 84487 55707 144854700 66188 68398 62310 79204 144862076 62022 67827 57402 144857028 74350 144866354 41875 60308 78606 69670 57954 78451 59704 48360 90104 144870373 73850 97057 78985 95752 107713 74608 72249 100029 70585 93711 144862076 144862076 144857028 85052 ...

result:

ok 131072 numbers

Test #29:

score: 0
Accepted
time: 1527ms
memory: 30412kb

input:

17 177780 23154
811909968 614548554 371632610 113055260 609539994 697684669 1031132320 502736687 592459426 854055971 346209907 288194748 352286968 301806230 147187524 180332295 792457730
88484 23154 8925
126626 23154 17104
92020 23154 5755
77668 126626 25100
110991 77668 8061
46506 88484 11018
74772...

output:

77010 62416 113077190 71440 113074826 57785 74149 113074643 75338 70263 73611 41698 113073818 78464 75825 104961 72372 72570 113073818 99027 113073818 72289 113074246 56557 186383 90111 77161 74020 113069476 128751 113073818 113069476 97843 58032 113075108 75114 101810 71767 113074826 69306 11307381...

result:

ok 131072 numbers

Test #30:

score: 0
Accepted
time: 1543ms
memory: 30572kb

input:

17 177257 11210
1029946416 1000564931 83880801 582423648 613866251 176772813 588058342 166542499 757546088 228363287 1035790740 301595250 898166291 158258625 77499013 561149645 662243865
36685 11210 26956
98431 11210 25893
88507 98431 475
4351 36685 14284
22744 98431 7525
114261 36685 30664
17467 43...

output:

76146 66600 89093 116380 62678 71043 87366 84947 77539162 98198 77522878 58868 67215 77535928 90458 67344 77529699 102410 77535935 77542890 71026 77529699 86858 86935 77794 77544482 66397 77540436 57983 76281 70584 84839 76331 73127 70030 66639 87688 69818 93355 77536674 77528503 59648 56576 73479 4...

result:

ok 131072 numbers