QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#566641#7437. 博丽灵梦ucup-team34074 6583ms33484kbC++143.7kb2024-09-16 00:56:072024-09-16 00:56:07

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

score: 4
Accepted
time: 0ms
memory: 16172kb

input:

10
7 6 3 5 9 1 10 8 4 2
1 9 7 4 1 4 1 1 9 7
9 2 4 9 1 8 5 5 6 7
10
2 7 6 8
2 5 4 10
6 9 8 9
6 9 7 9
4 5 6 7
4 9 8 8
2 9 3 5
3 7 4 8
4 6 1 10
6 7 8 9

output:

6
24
9
9
0
9
20
9
18
0

result:

ok 10 numbers

Test #2:

score: 0
Wrong Answer
time: 23ms
memory: 16224kb

input:

5000
4584 3973 1352 4671 419 4060 2422 1887 1113 4149 3583 511 2168 3996 963 870 1871 1972 2974 3771 2725 2276 4578 194 4600 114 4297 1714 3530 3353 2904 4842 366 744 116 1785 3646 2473 1421 4245 1366 4483 1555 4595 1179 1394 3648 3066 4024 1935 2263 4237 4268 29 2148 4647 4515 2135 4131 4589 3314 2...

output:

327117
136689
1478910
1136737
437595
1727498
454308
744746
861706
807158
284267
1970224
1648203
1531841
417402
1109543
770506
3606
5497
491686
1800425
252458
96255
3425452
114586
1464483
21547
716733
1449681
334971
2300791
1496875
169612
3684651
347639
28409
370949
363513
248207
1946125
129945
67408...

result:

wrong answer 3rd numbers differ - expected: '1479698', found: '1478910'

Test #3:

score: 0
Wrong Answer
time: 75ms
memory: 15420kb

input:

25000
17933 12647 4126 561 20565 17721 3237 20956 23810 15182 1371 1964 19155 23873 16313 20143 23077 15413 14837 23101 15220 2217 22784 2221 17865 11528 9072 23426 15666 9562 23566 7278 11913 6636 10360 8741 13378 13274 515 17382 15017 11838 24731 10977 643 23193 24811 18852 20273 17879 16016 2687 ...

output:

44736178
96137351
88927419
38553245
58173530
56300475
67851317
37776293
23474101
104343043
60000742
97696040
29808270
87002555
65983340
95529301
26427029
90266362
13893441
52542710
86367836
77294146
12576933
82299047
34031867
88591055
72129900
73760721
52734867
35081529
88328266
51218732
90850030
10...

result:

wrong answer 1st numbers differ - expected: '44331710', found: '44736178'

Test #4:

score: 0
Wrong Answer
time: 194ms
memory: 15716kb

input:

50000
34190 30883 11333 45339 39327 7782 31720 17826 49088 48395 26423 1963 15006 13296 31887 39411 41575 47505 26979 39758 29082 5053 35619 36746 28511 45672 37295 30506 46420 36833 48283 34088 32552 48561 22638 32469 22093 49328 21194 8280 24202 26909 49400 11332 12274 29937 15451 42485 48625 4052...

output:

228235797
53381809
209222883
337022693
91405679
402046015
413159507
225569873
48972059
17481750
193409490
347812129
137469936
34170288
256827126
229733252
160377328
413238083
354211142
116680458
233879700
410702463
415869436
317124832
173809360
310010212
355213264
291799656
386342664
323640600
75194...

result:

wrong answer 1st numbers differ - expected: '227264514', found: '228235797'

Test #5:

score: 0
Wrong Answer
time: 320ms
memory: 17888kb

input:

75000
30149 54180 3798 34212 67897 28067 50060 44816 38037 27530 70405 68069 16326 14256 66092 36541 72536 72996 63812 65847 23781 72137 39834 29700 11212 11156 41911 9140 57560 21211 39159 53063 71051 45303 39914 9566 32134 69835 24071 7055 58777 70053 69284 73900 53302 28963 74142 46429 7921 57247...

output:

545698595
171427927
285484227
545291282
321555901
550091914
271178350
243016133
625966175
291622732
469858097
310107533
643688605
218421901
28119134
118646829
131766710
212273347
196418612
72047749
449449913
596192023
180252787
562143353
549460003
270560171
173557222
626718737
619340597
337726234
31...

result:

wrong answer 1st numbers differ - expected: '498247291', found: '545698595'

Test #6:

score: 0
Wrong Answer
time: 405ms
memory: 23116kb

input:

100000
47534 82358 90198 90311 86971 78138 57685 92820 95572 82397 45779 74859 67319 89881 76297 71344 68227 55217 75262 94126 96422 87581 94223 87931 88679 42475 75545 30649 91491 96694 85088 94656 24494 69871 78199 69331 99352 18668 74574 78408 79693 61591 99297 49169 83870 93128 88383 69981 66151...

output:

860809923
809741070
883273920
515640301
401758344
642803391
774287700
69865551
291454121
466283541
196133023
469859838
838932724
754768000
842367954
973455754
636303881
756277771
220424673
561693853
707850821
190073001
229752873
836981123
137745242
780028106
852741444
818544798
159168011
934997125
8...

result:

wrong answer 1st numbers differ - expected: '786293990', found: '860809923'

Test #7:

score: 0
Wrong Answer
time: 133ms
memory: 15076kb

input:

20000
11616 14681 9191 15174 9118 13157 14663 13691 19020 4289 1661 17151 11530 10198 10148 7691 1626 8200 5742 16570 17497 342 19688 4812 9998 16500 8667 16256 16815 5543 2734 13845 2182 8140 17207 15824 4253 474 9157 8209 14695 6161 8064 19843 1130 13147 19730 10224 7634 12957 14900 7442 11608 138...

output:

2097633
6689737
16469630
7257187
8129785
20382699
8614253
37153220
6684778
1707073
21670721
32673113
6404798
13489060
3015074
32926912
2401713
13648644
23245221
116740
12730505
3120774
26092
35829439
5561229
580396
46081470
16127431
3243736
8965478
12224452
1402777
21414976
130204
10058757
31278280
...

result:

wrong answer 1st numbers differ - expected: '2016662', found: '2097633'

Test #8:

score: 0
Wrong Answer
time: 351ms
memory: 15260kb

input:

30000
18100 17984 29616 26532 16351 25306 28940 17968 12149 21623 10913 25728 7504 1694 18649 20697 12374 28510 28482 24090 23186 26948 24342 8516 28375 24474 26716 10580 18582 25290 29675 5255 22335 21818 28936 918 11068 8231 14805 25816 29904 26304 12336 12440 28867 27898 20999 18451 17788 10485 2...

output:

58138774
14714457
7903237
111571865
4838310
59659876
10273198
50920670
5221720
113715902
25335393
22498185
61095691
39389586
37294808
9114242
24898507
84839519
6132515
28307612
54918861
56062613
72978890
2090556
131646754
13779996
3846050
36207789
11946266
42509990
9084655
3568559
7500469
6008509
48...

result:

wrong answer 1st numbers differ - expected: '57833084', found: '58138774'

Test #9:

score: 0
Wrong Answer
time: 521ms
memory: 16436kb

input:

40000
6155 33310 18982 32436 23117 11936 23625 36826 24896 18185 2373 31232 5057 20465 18997 36213 39297 32273 32461 29674 18962 13728 30106 33069 4625 35639 28937 32955 36807 31210 12487 33040 26415 13758 38447 20070 16135 32305 34756 22396 24672 32400 28184 22671 5895 5628 7054 27520 28612 17575 2...

output:

59786080
70119926
59851973
196310531
1744154
25089188
57616284
117714581
35112011
36143619
52485372
50111583
9837103
23496418
42774621
19078527
22688173
50298068
1589526
9107048
190515441
220898616
66317136
491745
26975746
195891801
155439526
28536924
6771622
126770013
15027847
62829568
86958022
635...

result:

wrong answer 1st numbers differ - expected: '59904501', found: '59786080'

Test #10:

score: 0
Wrong Answer
time: 736ms
memory: 18620kb

input:

50000
38469 24525 32217 24789 47311 24293 3571 14829 26717 913 21309 8308 37327 8734 17912 43870 48997 10733 2270 26728 7330 16464 40796 11288 47560 48672 46090 18389 25933 46137 41744 48976 38039 41118 38084 40612 47921 45345 45410 48851 31754 38299 27413 23608 24009 31513 40500 49878 8252 41404 10...

output:

147524039
0
216686285
5831
16783
127408952
0
0
34124
80805911
16106222
54155661
63339534
166125144
161678093
0
127696983
11027176
5880098
17588728
130668622
14058
178297177
37209907
377044695
300034387
16357888
18056649
67979698
127664301
129360946
54713531
64255672
304213542
19870148
17716856
11453...

result:

wrong answer 1st numbers differ - expected: '148215047', found: '147524039'

Test #11:

score: 0
Wrong Answer
time: 1128ms
memory: 15784kb

input:

60000
28929 27272 6259 45423 15780 40321 15580 4868 47291 3546 27936 45710 20567 26606 30216 52113 50838 55739 49818 56542 31288 49488 50806 8957 57695 52604 58066 14076 38002 58344 26180 36232 22180 32879 34138 51711 34760 25593 43389 31396 51616 13814 58547 40038 55058 48403 34408 25186 51758 5163...

output:

245093814
0
291074972
0
0
153319962
0
0
1668
107431130
9015377
45299410
106103848
206288327
236024386
17978070
151197164
226595725
20683211
16185461
186360678
0
804258
41578569
477763439
120529920
16873150
8051384
99435983
200079876
135387667
75259953
134533549
167533585
28439334
31380192
58283901
3...

result:

wrong answer 1st numbers differ - expected: '244276857', found: '245093814'

Test #12:

score: 0
Wrong Answer
time: 1501ms
memory: 18848kb

input:

70000
52924 17320 66317 8157 30299 14111 65609 39835 21071 62191 51780 53198 44998 54574 66213 14371 58818 68483 39851 47765 42611 69393 63471 60519 9205 11577 69131 61430 13885 29809 66714 44006 62051 58921 12599 53974 40692 64816 36682 3519 24905 52640 10114 68493 49109 41844 48600 66776 38530 433...

output:

0
361089577
0
44095
146358229
20361
0
872
150061948
4372536
44269748
180619500
276984492
318983145
26825559
204852839
27964829
47649908
12631777
239124163
98808
550133518
68849495
569146640
264680230
20991160
0
124010497
285651619
155201499
83690947
134880287
167241998
27295181
335475543
140536428
1...

result:

wrong answer 2nd numbers differ - expected: '353884553', found: '361089577'

Test #13:

score: 0
Wrong Answer
time: 1700ms
memory: 19020kb

input:

100000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...

output:

0
541752355
0
0
514330031
199252651
0
131085315
850030149
27275602
477678233
393606011
53946173
40142895
0
0
0
524716553
216077144
826258298
376687724
0
11786890
725130075
0
0
0
102484696
605223931
0
157526958
251792977
17776344
0
221863890
400524242
0
178428721
0
12178669
279481496
18298387
7313717...

result:

wrong answer 2nd numbers differ - expected: '541365899', found: '541752355'

Test #14:

score: 0
Wrong Answer
time: 1703ms
memory: 18496kb

input:

100000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...

output:

340948192
671537921
491129420
123074590
628648083
199275192
440168007
0
854928293
0
860263403
164282503
0
490812122
294908433
341292996
0
233273733
12799823
792170840
216436396
396915634
0
672710420
0
547502846
613450153
201721971
701325703
0
631426804
0
0
391026022
384188945
0
774055083
0
121279039...

result:

wrong answer 2nd numbers differ - expected: '666834767', found: '671537921'

Test #15:

score: 0
Wrong Answer
time: 1682ms
memory: 19156kb

input:

100000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...

output:

55356
0
800875150
47778
0
471761412
142219
30193
0
0
0
417342124
0
652696020
128385818
0
661831114
62201132
105270105
0
439039730
57249
818793420
241912788
818100982
909499873
0
0
361206456
705016003
278071749
0
0
265178251
0
0
0
0
0
512825448
239691567
96100
606737753
233659585
196248877
663203810
...

result:

wrong answer 15th numbers differ - expected: '111577391', found: '128385818'

Test #16:

score: 0
Wrong Answer
time: 2499ms
memory: 23068kb

input:

95000
54869 89685 84021 77335 29643 94178 67158 60183 31735 63706 79776 89995 89643 62925 35391 76241 81318 59689 94539 42088 29258 71464 41104 76091 24922 72978 89700 92047 64960 12525 70519 82967 85527 88068 85048 89273 19561 66101 53150 88863 43065 94970 41214 71260 82429 52175 75847 14693 94497 ...

output:

9762394
357582303
663838994
571309902
418399054
137857494
397999938
800814081
63126027
47684456
20108540
12037446
317311742
536084668
72638390
69657567
599493651
245054751
626354363
298559
384052698
90574816
387052992
29374981
132710
5809360
58711106
475335168
723864983
90729786
493139618
36214148
1...

result:

wrong answer 1st numbers differ - expected: '688866', found: '9762394'

Test #17:

score: 0
Wrong Answer
time: 2675ms
memory: 23188kb

input:

100000
85963 54232 81192 62832 86584 80503 31766 74547 68821 73102 73096 72267 89495 33829 99520 43962 54837 89342 84555 71099 98465 64321 69793 39525 70934 87510 76927 85543 80068 25394 93361 4064 75959 51666 98914 15652 80946 90768 98387 88616 95082 44075 76628 84428 90891 63623 85280 43215 12888 ...

output:

235120393
0
898110179
273537549
84839976
830496278
0
190374
476452072
167764035
0
369958148
708936366
44003
0
0
103310637
324501223
595905598
176533774
33473641
286676689
155290218
222582655
314112549
33576123
235447142
80077330
24559377
453795930
3660246
118713173
0
213098711
761893702
76294447
133...

result:

wrong answer 1st numbers differ - expected: '195238536', found: '235120393'

Test #18:

score: 0
Wrong Answer
time: 2718ms
memory: 23044kb

input:

100000
90787 49393 38459 68555 92570 80827 83843 39871 57205 59948 85227 96519 94578 78479 78947 89776 58887 21176 89863 99298 44414 29776 25867 88717 53798 75196 76719 87201 71049 86356 44186 47657 77140 74621 90681 81634 99004 97417 67801 73807 30440 47271 98457 50945 68642 92999 98340 99414 14611...

output:

0
0
808071010
0
18194
210119819
141750288
304066941
46101
836763236
0
216901053
199134514
11935734
257697908
58803
352819782
0
88703
667698267
315380865
23731
366656627
39094976
88154776
839909520
4612537
0
244766181
560299893
106289815
58803
67508207
210583807
0
0
272351727
112748915
170670418
2142...

result:

wrong answer 3rd numbers differ - expected: '785519681', found: '808071010'

Test #19:

score: 0
Wrong Answer
time: 3676ms
memory: 25188kb

input:

100000
56193 78732 53570 44033 95995 99805 99585 94328 86681 87057 38285 74770 35856 6475 67612 52118 61883 18643 94607 31187 29338 88506 19752 84313 95851 96938 75747 72293 99364 67597 58337 99189 57651 74675 88241 44625 85781 27224 95532 74927 99055 98502 50279 27215 87270 20715 81841 89907 89718 ...

output:

15676598
128011304
30774978
142192326
4222552
43880529
111967488
227481121
1184187
119160457
237445801
8168491
47944934
35614421
261838057
58065285
85876214
127784671
391119506
226200431
6776128
57000303
120408137
470742460
171095577
91836749
361671484
354126170
197973469
5415300
2075803
0
43807763
...

result:

wrong answer 1st numbers differ - expected: '14061144', found: '15676598'

Test #20:

score: 0
Wrong Answer
time: 4356ms
memory: 27140kb

input:

100000
54722 84563 96554 77985 99277 67108 96381 71428 89162 91934 89671 74392 31632 30282 14966 88796 75550 96930 3617 82001 88145 28169 71044 85311 22416 30942 30195 99275 88970 30785 61892 84018 48484 19580 65559 90924 92214 43453 76013 9855 77640 76849 60741 31437 99618 3508 5054 87130 26889 946...

output:

194805789
84002183
2065227
10761628
183470388
3208631
0
281115494
0
12601342
161475065
37182466
229189809
26679371
178288350
212207729
182184025
19148295
329898817
39623568
166477840
281907557
15451979
384265998
112865865
4329351
210603147
397617836
275534778
9816135
9536821
142279492
431850558
1069...

result:

wrong answer 1st numbers differ - expected: '191231349', found: '194805789'

Test #21:

score: 0
Wrong Answer
time: 4705ms
memory: 26820kb

input:

100000
69536 76666 30096 75927 68899 60112 50144 27911 91674 77923 64608 95868 89728 87803 87234 62536 90788 95452 75434 48468 83595 97682 61133 69084 86299 99064 81737 90986 94384 95563 96802 37554 83608 94954 80895 23078 92537 56143 80659 14842 93617 92962 91436 39232 97232 67436 98527 67131 73774...

output:

347415262
120653411
472526311
77465237
33288155
32125511
491119593
383596895
60320954
896395606
28153688
342703961
664356685
512010439
689762158
622339162
963056570
342516461
488125349
717232104
520142962
218510728
201420804
164695845
80962327
190309179
312240253
113212083
28375287
47060657
13450326...

result:

wrong answer 1st numbers differ - expected: '288529716', found: '347415262'

Test #22:

score: 0
Wrong Answer
time: 5597ms
memory: 28804kb

input:

100000
25377 81949 73151 50640 84530 48045 12139 82295 59977 92190 83405 82243 94236 93605 83319 98058 89610 91310 38547 86841 81877 90240 70172 35462 69666 93781 81392 54806 87407 99453 99244 58440 95573 88739 5938 84504 56614 23803 77556 47383 87088 73684 82110 83163 35349 92668 73141 20736 70294 ...

output:

72320976
7309861
86238279
17468748
373133455
3181879
494099367
121370165
2325982
13425603
350441619
0
28830907
28177824
379490523
701761790
418970951
272855652
387300794
253488047
1059792
512922484
117238258
203934339
5266033
31287174
175068351
326508787
31120413
16104752
2478663
412503058
296778511...

result:

wrong answer 2nd numbers differ - expected: '7143666', found: '7309861'

Test #23:

score: 0
Wrong Answer
time: 6583ms
memory: 33484kb

input:

100000
68911 78955 67125 63739 77253 93872 98284 30234 65137 93114 55561 50049 18255 97663 75460 27811 96088 82376 74231 62398 67493 59605 51358 41605 88345 83081 83446 37670 52929 59276 32521 95748 30602 11042 62878 97612 83929 41373 30569 82057 79198 90481 19440 97993 30901 96818 84076 87404 9354 ...

output:

487501502
129530643
327723819
519370085
60820284
248405912
402396437
120974047
325772413
523602079
76238669
32764198
6963070
88394261
1825216
123719
499874697
350896430
245961273
2516581
188860347
26204951
228664087
94918940
7311155
157770043
46697880
50159704
194908497
475716417
19730677
63135766
2...

result:

wrong answer 1st numbers differ - expected: '482253646', found: '487501502'

Test #24:

score: 0
Time Limit Exceeded

input:

100000
38458 39973 76990 86656 70315 70763 69153 94522 73043 96732 91705 43575 10537 63472 87305 65815 77792 96549 40795 68033 60805 57972 92038 84405 83637 18269 75531 94024 85636 83976 61301 74283 59778 5838 70252 73510 86230 62884 52089 84610 88915 78999 96146 35458 90912 98152 93863 35686 99939 ...

output:

105243411
65926466
2409685
84292461
235530639
23627229
146383103
44566001
8896497
546255
94800651
98370661
133048225
668449308
25627427
483749178
18607995
72943142
450146479
11466343
21351608
147529912
137132703
11573148
6777906
23347144
261367560
45917010
505062100
35398998
47982930
93977391
421613...

result:


Test #25:

score: 0
Time Limit Exceeded

input:

100000
17357 75572 76084 97973 70590 40014 38940 43780 66344 53972 29698 53880 32667 26551 87331 3607 91253 63177 86190 42335 94989 38370 32515 59279 35119 38533 93007 8473 46782 85420 98270 27516 83838 66639 57364 91913 46439 83749 30263 97990 18522 97105 87000 80718 98885 29744 95730 93844 98301 2...

output:


result: