QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#682240#7067. The Great WallZhaoZiLongML 4ms159584kbC++171.3kb2024-10-27 14:34:462024-10-27 14:34:47

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 5764kb

input:

5
1 2 3 4 5

output:

4
3
2
1
0

result:

ok 5 lines

Test #2:

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

input:

5
1 2 1 2 1

output:

1
2
2
1
0

result:

ok 5 lines

Test #3:

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

input:

6
1 1 4 5 1 4

output:

4
7
7
7
4
0

result:

ok 6 lines

Test #4:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

6
1 9 1 9 8 1

output:

8
16
23
16
8
0

result:

ok 6 lines

Test #5:

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

input:

12
1 1 4 5 1 4 1 9 1 9 8 1

output:

8
16
23
27
30
30
30
27
23
16
8
0

result:

ok 12 lines

Test #6:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

1
79932

output:

0

result:

ok single line: '0'

Test #7:

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

input:

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

output:

9
18
27
36
45
54
63
72
81
90
99
108
117
126
135
144
153
162
171
180
189
198
207
216
225
234
243
252
261
270
279
288
297
306
315
323
331
339
347
355
363
371
379
387
395
403
411
419
427
435
443
451
459
467
475
483
491
499
506
513
520
527
534
541
548
555
562
569
576
583
590
597
604
610
616
622
628
634
...

result:

ok 500 lines

Test #8:

score: 0
Accepted
time: 3ms
memory: 83500kb

input:

500
9 37 34 22 57 95 20 2 76 83 25 56 31 71 40 83 11 86 33 25 37 79 73 14 24 86 42 84 64 18 75 84 65 78 72 54 81 47 36 86 59 38 88 68 57 44 6 57 21 85 58 56 40 19 89 11 15 40 27 79 32 99 11 59 49 78 31 34 24 64 45 53 8 57 1 31 43 2 56 79 37 55 87 40 88 65 94 73 91 66 25 56 61 11 81 17 23 69 26 80 11...

output:

99
197
295
392
489
585
681
777
872
967
1061
1155
1248
1341
1433
1525
1616
1706
1796
1886
1975
2064
2152
2239
2326
2410
2494
2578
2661
2744
2827
2910
2991
3071
3151
3231
3310
3389
3468
3547
3626
3705
3783
3861
3938
4015
4091
4167
4242
4317
4392
4466
4540
4612
4684
4755
4826
4897
4967
5037
5107
5176
5...

result:

ok 500 lines

Test #9:

score: 0
Accepted
time: 0ms
memory: 81556kb

input:

500
512 827 515 514 318 775 202 145 590 439 202 674 798 112 879 270 992 171 114 862 716 416 243 284 595 176 354 534 166 235 150 427 845 274 485 454 267 435 122 373 495 927 740 701 989 881 242 755 379 397 493 745 16 106 918 75 214 269 503 509 608 588 718 259 119 980 59 444 967 16 282 948 246 654 36 9...

output:

997
1989
2981
3966
4943
5915
6885
7855
8820
9785
10741
11694
12637
13572
14507
15433
16350
17264
18177
19085
19985
20875
21765
22643
23520
24393
25260
26119
26965
27799
28632
29457
30274
31087
31899
32710
33521
34330
35138
35939
36737
37529
38318
39104
39888
40660
41417
42170
42923
43672
44419
45164...

result:

ok 500 lines

Test #10:

score: 0
Accepted
time: 0ms
memory: 83588kb

input:

500
6102 6761 7407 8427 2050 857 1245 3360 6946 7715 5520 8542 3240 2251 5914 9851 7529 2104 6551 2242 2453 6738 5913 6055 385 3289 7152 5288 7731 4609 1846 2207 6041 139 4484 341 7255 2320 3109 9409 2235 5830 2373 1933 6927 4917 693 8313 5690 2931 7582 9321 803 5835 5983 921 2243 7645 6980 833 597 ...

output:

9956
19900
29750
39589
49328
59020
68660
78276
87889
97377
106849
116302
125742
135118
144486
153764
163013
172193
181360
190405
199438
208443
217445
226425
235323
244086
252822
261504
270175
278789
287293
295761
304117
312413
320703
328958
337180
345324
353461
361581
369697
377766
385730
393542
401...

result:

ok 500 lines

Test #11:

score: 0
Accepted
time: 0ms
memory: 81432kb

input:

500
14684 16652 53320 24159 45781 16901 88460 67716 38222 88034 9388 54336 379 97286 91495 14388 99110 81541 82283 91330 68775 71056 41684 32845 72498 93087 25907 11853 40457 65305 75274 75404 89906 86787 12371 2976 74788 14307 38144 29797 74139 68463 4958 30870 61963 13015 38899 71624 50577 31372 2...

output:

98938
197609
296134
394567
492583
589684
685984
781382
876722
971983
1067074
1161162
1254848
1348529
1442102
1535544
1628539
1721336
1813348
1904053
1994398
2083690
2172809
2260563
2347978
2434719
2520827
2606118
2691110
2776063
2860750
2944628
3028391
3112115
3194778
3275882
3356980
3438047
3518367...

result:

ok 500 lines

Test #12:

score: 0
Accepted
time: 0ms
memory: 81564kb

input:

500
83 63 44 29 90 60 87 74 47 77 83 86 87 95 40 74 59 62 80 86 52 14 42 60 38 100 81 59 66 67 36 86 47 74 54 23 97 77 80 42 65 15 56 20 96 31 55 44 90 48 73 42 84 97 65 91 73 75 88 46 69 51 90 92 44 67 79 74 61 71 59 62 36 15 68 66 50 40 67 76 56 36 46 77 81 21 100 95 51 69 56 87 56 10 96 70 43 74 ...

output:

98
194
287
378
469
559
649
738
827
915
1002
1088
1173
1257
1341
1424
1507
1589
1669
1748
1826
1903
1979
2054
2127
2200
2272
2344
2416
2488
2560
2630
2700
2768
2835
2900
2965
3029
3093
3157
3220
3283
3346
3409
3471
3533
3594
3655
3716
3777
3836
3895
3953
4011
4069
4127
4185
4243
4301
4357
4413
4467
4...

result:

ok 500 lines

Test #13:

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

input:

500
526 782 718 652 946 975 772 980 551 726 966 916 749 974 895 302 602 833 616 934 862 671 500 687 992 304 948 862 876 521 822 929 677 682 487 916 800 706 718 627 976 946 787 736 551 909 782 725 833 571 783 732 958 693 892 938 842 794 932 610 967 555 920 753 669 778 861 917 663 378 988 745 950 710 ...

output:

841
1649
2437
3220
3994
4767
5536
6302
7058
7788
8484
9172
9860
10546
11213
11879
12543
13187
13830
14467
15095
15714
16327
16939
17541
18142
18739
19320
19894
20467
21039
21598
22155
22705
23253
23800
24347
24891
25434
25977
26514
27050
27571
28088
28589
29084
29577
30066
30554
31037
31517
31996
32...

result:

ok 500 lines

Test #14:

score: 0
Accepted
time: 0ms
memory: 81572kb

input:

500
6830 9304 7507 9033 2889 7701 9418 9379 9710 8810 9325 9360 8526 6345 6898 8677 7199 8858 7559 9718 8058 9853 9338 7039 9684 7501 6458 5022 6914 6800 8550 9322 9956 7768 7730 8349 6197 8502 8650 7041 8749 9102 6078 7980 9399 8340 8948 9024 7224 8969 7504 9411 9476 9837 8903 6668 9893 8737 8217 5...

output:

7654
15103
22442
29533
36396
43168
49799
56335
62443
68352
74253
80058
85842
91443
97024
102592
108022
113413
118710
123927
129104
134275
139407
144487
149496
154367
159233
164064
168866
173664
178401
183116
187602
192059
196505
200943
205378
209724
214054
218208
222349
226459
230545
234556
238541
2...

result:

ok 500 lines

Test #15:

score: 0
Accepted
time: 0ms
memory: 81544kb

input:

500
95528 97848 91153 82588 87492 82179 90149 72883 76671 86666 92966 67736 88594 84903 39826 93663 78435 57218 71099 83828 98376 97788 84784 89335 74670 66980 77839 86911 95041 72263 58565 94208 97678 90519 71769 92425 96165 91833 92372 74433 59484 81390 92781 94909 92009 91563 84598 98328 98034 99...

output:

74998
145722
205714
262792
318738
374290
428290
481859
534058
585131
633728
681612
728681
775416
821878
867605
912242
956751
1001081
1045368
1089161
1132411
1175552
1218343
1261063
1303464
1344676
1385705
1426667
1467342
1507972
1547778
1587541
1627113
1666542
1704929
1743233
1780349
1817372
1854220...

result:

ok 500 lines

Test #16:

score: 0
Accepted
time: 0ms
memory: 83612kb

input:

500
27 73 62 92 86 100 72 87 46 44 95 87 27 83 81 81 42 59 13 39 81 71 20 53 36 21 73 79 53 76 94 80 36 34 96 96 91 21 57 24 36 67 26 20 66 83 40 11 32 68 34 16 93 62 32 47 79 76 67 66 64 98 97 26 15 88 35 96 41 16 75 63 18 69 12 11 40 15 80 26 31 76 87 72 96 89 11 12 81 47 46 23 21 59 81 19 88 79 9...

output:

90
180
270
359
447
535
622
709
796
883
970
1055
1140
1224
1308
1392
1476
1560
1644
1727
1809
1890
1970
2050
2129
2208
2287
2365
2443
2520
2597
2674
2751
2827
2902
2977
3052
3127
3200
3272
3344
3416
3488
3559
3629
3699
3767
3834
3900
3965
4030
4095
4159
4223
4287
4350
4413
4476
4538
4600
4662
4724
47...

result:

ok 500 lines

Test #17:

score: 0
Accepted
time: 0ms
memory: 83596kb

input:

500
482 901 404 102 497 575 707 485 342 575 202 777 196 728 482 770 967 928 725 241 136 664 840 429 275 953 671 364 481 764 625 116 281 397 856 861 592 828 141 832 831 621 187 427 705 678 601 906 194 905 408 608 272 159 983 917 753 663 477 885 943 576 988 381 166 290 967 208 419 452 185 306 418 453 ...

output:

898
1788
2674
3557
4436
5313
6184
7041
7892
8743
9593
10438
11280
12120
12943
13764
14583
15400
16204
17005
17802
18597
19384
20170
20949
21719
22485
23241
23995
24742
25486
26229
26968
27706
28437
29155
29871
30586
31297
32008
32713
33414
34088
34744
35399
36053
36704
37353
37995
38630
39257
39883
...

result:

ok 500 lines

Test #18:

score: 0
Accepted
time: 0ms
memory: 81572kb

input:

500
6334 6991 6189 7121 6820 4780 7993 6290 1490 8483 8767 2095 2839 2605 2578 3276 9421 5911 6921 2233 4913 7057 6582 8636 1484 7977 5647 6291 6328 2183 4248 9462 9405 5981 8320 3658 1832 2538 2742 3643 1603 4494 1289 5903 9463 3685 5036 5420 1216 9451 7487 9856 1695 2497 1125 3314 9547 4854 7975 7...

output:

8968
17784
26587
35346
44042
52693
61332
69825
78311
86791
95240
103662
112080
120402
128720
137028
145202
153205
161183
169128
177059
184977
192846
200695
208508
216310
224071
231827
239531
247235
254912
262574
270230
277849
285448
292951
300297
307622
314753
321860
328953
336037
343108
350173
3571...

result:

ok 500 lines

Test #19:

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

input:

500
65902 72030 80473 71691 73343 31863 61636 45358 81813 20422 11032 66277 39084 96565 48896 12361 48907 56415 61877 76715 64129 92038 82735 49166 98957 87632 23602 23627 97365 79307 28333 95382 91570 57413 96589 36621 46164 15113 73115 87946 92993 88482 30756 19803 89038 99492 22561 16526 64111 29...

output:

89271
178382
267278
355968
444615
533025
620950
708319
795287
880729
965497
1049701
1133468
1216725
1299791
1382300
1464552
1546490
1626499
1706038
1785570
1863884
1942184
2020205
2097712
2174001
2249910
2325692
2401259
2476744
2551853
2626765
2701650
2774840
2847869
2920856
2993463
3065341
3135741
...

result:

ok 500 lines

Test #20:

score: 0
Accepted
time: 0ms
memory: 81632kb

input:

500
189 254 592 173 318 299 136 458 365 346 490 221 624 172 159 423 311 655 199 300 210 268 299 660 112 508 163 100 338 212 425 109 670 618 358 210 175 174 651 749 653 306 175 257 569 643 240 915 172 881 289 702 618 449 366 797 102 317 258 113 154 484 544 392 532 601 693 821 395 673 266 112 487 626 ...

output:

879
1747
2576
3389
4196
4998
5799
6578
7350
8108
8860
9585
10304
11017
11726
12428
13129
13820
14486
15152
15813
16471
17114
17746
18375
19000
19611
20212
20811
21401
21987
22565
23140
23714
24287
24855
25418
25979
26530
27072
27604
28127
28650
29171
29690
30207
30718
31226
31726
32222
32718
33214
3...

result:

ok 500 lines

Test #21:

score: 0
Accepted
time: 0ms
memory: 81508kb

input:

500
4259 1766 1102 2963 2322 7789 3686 1125 1252 2414 4801 1016 3785 2480 2488 1894 7425 3534 3969 1964 1725 4751 3311 3472 4082 3285 7849 4737 1502 4361 1458 3297 1480 6905 1961 3711 3895 2872 4153 2551 6640 4021 1457 2540 3983 3995 1364 4856 1890 1579 1432 1544 4840 1199 4404 2793 1011 6701 4018 2...

output:

7487
14841
21993
29073
36069
43055
49995
56854
63687
70424
77140
83784
90331
96786
103232
109636
115959
122189
128336
134434
140448
146419
152372
158247
164058
169838
175616
181336
186984
192607
198214
203756
209258
214746
220201
225648
231024
236384
241701
246881
252041
257169
262204
267227
272176
...

result:

ok 500 lines

Test #22:

score: 0
Accepted
time: 0ms
memory: 81436kb

input:

500
12436 14586 16617 31735 59792 15114 38132 23535 19881 22369 35266 41654 36450 67730 14116 25763 60463 48013 50177 14981 11571 11393 29800 53385 16378 43907 72287 10485 46889 16782 22325 43392 42246 30853 32553 20676 26184 64901 47876 33923 65452 20801 32199 34283 35661 39613 19155 20175 58740 48...

output:

75537
145877
214726
281785
346785
411099
474429
537432
600280
663008
724699
785514
845215
901783
958120
1014402
1070600
1125349
1179811
1234016
1288040
1341370
1394539
1446870
1498670
1550436
1601470
1652289
1702436
1751153
1799805
1847832
1894479
1940790
1986466
2031299
2075719
2120084
2163779
2207...

result:

ok 500 lines

Test #23:

score: 0
Accepted
time: 3ms
memory: 159584kb

input:

1000
445 489 516 538 731 794 1039 1258 1309 1345 1529 1763 1835 2030 2121 2370 2420 2706 2901 2946 3097 3277 3791 3804 3891 3943 4095 4140 4271 4334 4443 4458 4471 4532 4673 4720 4889 4892 4965 4985 5014 5115 5125 5127 5137 5158 5176 5295 5312 5322 5381 5404 5463 5539 5653 5758 5874 6101 6464 6628 6...

output:

99349
99348
99347
99346
99345
99344
99343
99342
99341
99340
99338
99336
99334
99332
99330
99328
99326
99323
99320
99317
99314
99311
99308
99305
99302
99299
99296
99293
99290
99287
99284
99281
99278
99275
99272
99268
99264
99260
99256
99252
99248
99244
99240
99236
99232
99228
99223
99218
99213
99208
...

result:

ok 1000 lines

Test #24:

score: 0
Accepted
time: 3ms
memory: 159456kb

input:

1000
99939 99839 99831 99824 99620 99588 99467 99341 99300 99293 99254 99134 98816 98686 98610 98598 98572 98316 98180 98127 98025 97952 97943 97568 97535 97437 97411 97331 97328 97305 97010 96977 96829 96570 96533 96142 95988 95981 95886 95717 95646 95637 95387 95364 95146 95092 95076 95064 94820 9...

output:

99900
99899
99898
99897
99896
99895
99894
99893
99892
99891
99889
99887
99885
99883
99881
99879
99877
99875
99872
99869
99866
99863
99860
99857
99854
99851
99848
99845
99842
99838
99834
99830
99826
99821
99816
99811
99806
99801
99796
99791
99786
99781
99776
99771
99766
99761
99755
99749
99743
99737
...

result:

ok 1000 lines

Test #25:

score: -100
Memory Limit Exceeded

input:

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

output:

9
18
27
36
45
54
63
72
81
90
99
108
117
126
135
144
153
162
171
180
189
198
207
216
225
234
243
252
261
270
279
288
297
306
315
324
333
342
351
360
369
378
387
396
405
414
423
432
441
450
459
468
477
486
495
504
513
522
531
540
549
558
567
576
585
594
603
612
621
630
639
648
657
666
675
684
693
702
...

result: