QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#808078#9853. Easy String ProblemBreakPlusAC ✓55ms7476kbC++141.7kb2024-12-10 16:55:022024-12-10 16:55:03

详细

Test #1:

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

input:

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

output:

4
5
3
2
2
1

result:

ok 6 numbers

Test #2:

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

input:

100
3 7 9 13 13 10 13 5 12 17 6 1 18 25 20 17 2 18 20 9 21 14 13 15 19 7 10 7 10 17 13 24 13 24 14 17 23 23 5 14 16 23 26 7 26 24 18 5 12 10 1 4 13 10 14 3 22 26 21 3 20 3 23 3 14 18 23 20 14 22 18 2 20 11 8 23 17 5 21 7 15 11 8 24 13 20 10 7 15 3 21 17 10 23 14 9 26 16 5 9
100
96 100
43 56
16 24
43...

output:

96
1855
1185
2347
1812
1669
1756
1921
539
1276
2086
1810
1664
2075
1691
1864
461
1655
654
187
2167
2224
2019
273
1873
1328
1282
1474
918
481
456
2018
2014
2256
452
2028
1655
1879
100
1312
1894
1428
2118
1773
1602
1752
1772
2246
2129
517
1694
325
591
885
1882
287
619
796
1965
1845
1035
1656
1725
801
...

result:

ok 100 numbers

Test #3:

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

input:

100
42 68 35 1 70 25 79 59 63 65 6 46 82 28 62 92 96 43 28 37 92 5 3 54 93 83 22 17 19 96 48 27 72 39 70 13 68 100 36 95 4 12 23 34 74 65 42 12 54 69 48 45 63 58 38 60 24 42 30 79 17 36 91 43 89 7 41 43 65 49 47 6 91 30 71 51 7 2 94 49 30 24 85 55 57 41 67 77 32 9 45 40 27 24 38 39 19 83 30 42
100
3...

output:

2092
2104
476
1313
1540
1615
1836
1477
1546
288
1204
2029
2115
2281
2127
2533
2293
2257
730
682
2074
2359
2103
823
1550
1643
653
1096
99
2062
882
1712
2384
377
290
634
1932
285
2093
1916
1217
2040
1393
92
1835
1986
2384
730
904
1152
843
2287
91
1487
99
1687
2102
797
472
648
1668
1234
2530
1991
1122
...

result:

ok 100 numbers

Test #4:

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

input:

100
51 5 23 9 91 93 14 6 39 30 36 49 17 95 15 59 96 68 54 75 50 46 28 82 73 45 95 35 94 42 20 90 64 68 33 13 56 81 44 36 73 12 50 65 7 81 76 94 68 86 48 69 54 65 91 32 1 68 6 59 95 91 39 14 35 48 5 63 20 35 95 64 46 25 84 61 13 47 63 25 76 43 57 45 55 14 63 89 61 10 54 10 20 57 16 75 74 67 69 64
100...

output:

1880
2070
1321
2271
776
833
749
2406
2116
1208
939
363
2277
190
1928
1525
383
2118
1365
833
2002
959
2335
1610
863
1464
833
1175
2521
2320
1709
2106
691
1987
1468
1525
1848
184
1058
1084
1516
1744
1031
99
1320
369
2447
2047
983
2099
1950
434
2209
2094
2054
1993
2241
2215
1997
1679
98
2142
1884
2215
...

result:

ok 100 numbers

Test #5:

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

input:

1000
42 468 335 501 170 725 479 359 963 465 706 146 282 828 962 492 996 943 828 437 392 605 903 154 293 383 422 717 719 896 448 727 772 539 870 913 668 300 36 895 704 812 323 334 674 665 142 712 254 869 548 645 663 758 38 860 724 742 530 779 317 36 191 843 289 107 41 943 265 649 447 806 891 730 371 ...

output:

216894
215359
241961
138802
246872
217900
214631
222775
21473
198360
212431
85704
109259
188552
243956
149952
216687
78014
248931
118246
100745
77269
205516
3985
51700
201164
249181
114060
243058
197913
2986
194731
181210
69780
219569
247138
247442
133414
125113
36363
223344
235530
89205
207220
1987...

result:

ok 1000 numbers

Test #6:

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

input:

1000
170 859 536 817 42 85 420 711 504 610 849 513 778 769 896 984 464 647 970 251 539 28 113 902 686 262 674 86 116 149 126 139 147 511 609 767 391 564 50 62 697 604 981 942 569 664 285 665 242 935 854 609 749 802 753 692 769 962 953 512 738 920 479 153 23 589 929 552 113 659 552 478 352 548 113 60...

output:

133756
212374
244573
237234
223728
207907
242738
100453
95923
220564
230508
239573
141124
41156
241964
240751
109146
89906
246009
142768
216030
26252
239148
20501
181713
215108
243996
241152
235725
31852
245663
239175
150449
150704
129395
211689
170773
186079
245716
137651
247713
240964
37447
179304...

result:

ok 1000 numbers

Test #7:

score: 0
Accepted
time: 23ms
memory: 7152kb

input:

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

output:

1595515722
1546937649
1922022743
1628223414
1667083008
1469008421
1732606197
1511295965
1902115405
1492058814
1364988533
1501865960
1266798327
1349948880
1601724403
1544137060
302722455
450210851
146312419
2046939837
369445091
345494836
1172133510
1941450403
1160240183
1091275914
266472316
126593146...

result:

ok 100000 numbers

Test #8:

score: 0
Accepted
time: 27ms
memory: 6512kb

input:

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

output:

1477651739
1787671227
1477666442
476432181
1199623379
674874991
1813784048
1388950405
653591503
969329474
312981042
1393371994
606900835
798554668
1878800006
1930377777
1246510858
46227907
1941525007
2023925793
1890797999
528235933
192360113
1566312494
1175713437
642653112
1762500974
1074076848
1769...

result:

ok 100000 numbers

Test #9:

score: 0
Accepted
time: 25ms
memory: 6948kb

input:

100000
8242 2948 6332 8921 7587 1937 6358 3847 4311 2192 595 482 3313 572 7604 7206 9636 3786 3478 505 3304 929 2759 3383 2272 9179 2710 5103 2585 1868 3611 395 5717 2275 4455 9397 7081 6639 9484 3049 1220 5907 6640 2630 6161 5869 7199 4153 3326 7956 3839 5659 8430 6352 5336 5545 9756 3870 3251 7029...

output:

1895850807
798168077
1234574101
900147002
2030327600
344132552
1724012633
1181873825
1861179818
805040308
1964666227
1611692482
905775043
564459593
2105268459
582789708
406684522
1298444734
2053817730
1498408492
1834701643
306005491
2140599273
1010175646
972958177
438954333
1869023520
2071932132
282...

result:

ok 100000 numbers

Test #10:

score: 0
Accepted
time: 33ms
memory: 6828kb

input:

100000
28278 10109 6230 1474 22743 2363 7827 24415 2099 100 1736 10967 27465 18742 2341 11317 19722 29855 848 7133 17803 27379 24082 15007 9065 19754 17728 22495 24204 16728 23853 755 5119 20273 12878 27597 29694 26060 14318 14042 22097 28327 7970 18473 26841 4588 6656 18896 11369 4082 24332 29068 1...

output:

2073973477
746805459
1545361059
331895710
1678343715
620662546
501137132
301994619
1569877432
1827498483
1723118233
1366550292
1453684545
1549930917
1770649768
81460890
689943367
1621723352
1510714064
1845157579
1528364635
1750199291
1999034407
906129840
1793282544
830301749
464951189
704745127
3607...

result:

ok 100000 numbers

Test #11:

score: 0
Accepted
time: 24ms
memory: 7296kb

input:

100000
28311 19289 21032 9963 27585 6095 6184 27910 607 1387 30257 11407 19478 20365 24887 20858 25758 17500 19155 13003 886 18348 10390 19617 24022 32038 1438 23412 25830 23970 21094 15515 13357 15320 26338 14353 17484 31800 27340 6008 13804 1046 6201 11870 18677 9226 3183 14272 21504 407 6906 1146...

output:

1516668553
218866802
1311380998
1536749171
2101414043
187536636
964630719
1640908406
2146569646
1384765334
701070604
2026967160
145606617
195994054
2062428948
1584852223
1744873976
1799590069
1151960372
41623532
239168166
204531969
1220613345
1092716553
1957542911
1645477761
1222843823
1480093857
18...

result:

ok 100000 numbers

Test #12:

score: 0
Accepted
time: 10ms
memory: 6780kb

input:

100000
28366 5404 29810 25823 6325 7313 26327 10914 19160 27942 27742 12156 2623 6740 8938 20693 22912 3048 17509 19707 31110 19380 3498 7793 10129 23429 3235 8587 31870 10069 6574 14391 20809 26561 70 24606 19664 2237 6879 28396 32473 26758 26129 26859 11351 728 20217 9687 12521 23650 16605 14318 6...

output:

1340888608
450367151
1020228345
1294058909
2019978602
2041628734
1778867084
703342527
749075143
1387935210
676821097
2155174336
1906129423
1110605471
7290501
2182356365
1692705100
1890248216
1650657993
705962472
1627085011
268265260
1347353490
1907612229
199556846
1920533650
1569614222
227126053
181...

result:

ok 100000 numbers

Test #13:

score: 0
Accepted
time: 24ms
memory: 7048kb

input:

100000
4483 21425 32022 21579 10994 20184 30087 27779 8168 28765 25600 11073 15220 13223 157 10559 12347 19028 6605 4417 31677 630 12724 22509 3801 23804 2765 9693 24467 26734 26580 10227 18454 13278 739 14828 22261 28187 32731 7992 29878 1319 24069 15881 657 23019 11513 4267 22133 23594 2239 16659 ...

output:

1913504081
1989455412
1289261971
1220884560
1235190722
670086249
564480793
560285228
1681316395
1659887757
2001473466
1084202358
383392405
2029445691
1616389602
495068687
1368732034
1321279252
1015104724
2174968935
1341878365
1897141210
1293179039
1899199787
1499397174
780129977
1397999495
198870662...

result:

ok 100000 numbers

Test #14:

score: 0
Accepted
time: 26ms
memory: 7364kb

input:

100000
3 99992 2079 3 99997 70778 8 99995 30404 4 99995 94938 9 99994 95263 10 99995 42188 3 99994 2143 9 99998 49635 3 100000 56714 10 99993 39182 7 99999 92664 4 99997 60087 2 99992 24368 4 99998 23671 4 99991 44386 1 100000 95836 9 99991 9894 1 99992 34655 9 99998 1043 3 99995 52799 6 99991 83683...

output:

1697495516
2143079760
979970623
2069579659
2113049846
2064255041
359262113
1999842925
1881166859
2050334868
2326430166
251346933
2311363470
740239487
459943696
1581891790
1980935434
1784607906
2287948249
2185372672
2441583538
1217676295
2417378247
660827313
1871549692
2288990044
2110450522
229598884...

result:

ok 100000 numbers

Test #15:

score: 0
Accepted
time: 30ms
memory: 7408kb

input:

100000
5 99996 26193 5 99997 39894 6 99996 11874 9 99993 79611 1 99992 37828 2 99996 206 4 99995 43478 1 99994 51387 9 100000 70699 8 99991 25567 8 99992 81942 7 99998 47765 3 99996 72052 2 99997 33824 6 99996 93786 1 99993 39385 10 99996 26272 9 99993 3003 8 99997 45742 3 99999 32653 1 99991 99237 ...

output:

927193820
2114922003
1364763313
924695491
1297177457
1942773392
2141150699
2381129276
2028824572
1550024022
202141715
700688490
1411769279
2268365048
2424561132
600077246
737846112
1436168234
1748543388
2101140537
165533490
671305071
1873015255
1274219899
939594312
707586458
2272070102
1660304053
61...

result:

ok 100000 numbers

Test #16:

score: 0
Accepted
time: 25ms
memory: 7376kb

input:

100000
4 99993 65628 3 99993 87435 10 99992 42663 7 99999 24755 7 99997 92797 7 99998 71600 1 99994 40514 2 99995 20322 2 99994 41805 7 100000 24221 5 100000 21666 4 99993 35723 2 99991 37167 4 99991 24743 9 99999 59177 4 99994 54744 4 99998 80231 4 99991 27883 1 99993 41376 7 99997 66837 5 99996 26...

output:

2320516458
2437375571
1860165644
2297535903
176602052
1319646507
2356169237
2231107650
2394655960
1482759982
1498863619
2381210832
1287347593
419190995
2290843047
1294540532
2432964471
1584340515
1898436220
1885851792
1506912308
2295294346
1827119590
1942098326
2097552889
1877017875
815479652
950962...

result:

ok 100000 numbers

Test #17:

score: 0
Accepted
time: 30ms
memory: 7476kb

input:

100000
10 99991 73325 9 99993 91016 9 99992 24133 2 99994 9428 1 99998 19010 9 99991 64082 1 99994 14618 2 99992 5721 6 99992 21327 5 99998 10605 9 99993 27296 10 99994 23401 9 99995 17619 4 99991 34896 1 99994 41345 3 99995 31061 9 99993 96610 4 100000 63464 5 99995 20538 9 99993 46691 6 99996 4233...

output:

1849091714
125608424
1515674402
1922010081
176342253
1062133329
2268760643
254564986
2441245158
2405354379
2390561767
127965516
927202602
975290665
1339681340
2433346030
847333525
2069895010
11109432
495011081
2079740978
838899008
236498630
1516911758
157575669
2387234736
1571771415
2432682921
46141...

result:

ok 100000 numbers

Test #18:

score: 0
Accepted
time: 53ms
memory: 7368kb

input:

100000
2 16822 100000 10 74795 99996 7 29383 99998 10 31533 100000 4 88778 99994 3 63889 99991 10 79097 99997 3 8008 99991 4 74630 99994 8 17747 99997 10 37398 99991 8 71165 99996 2 27201 99996 5 47383 99995 3 45640 99998 4 4851 99992 8 90455 99991 6 79747 99997 5 77500 99994 1 62322 99994 10 89862 ...

output:

579264944
269857572
90031720
348787144
625341520
781023796
1273028191
804356642
1397899502
570142706
60938251
1038982813
559633065
9664900
846243500
543941788
1092721348
360808517
647520738
576913427
89060391
21694712
777217557
312132531
192109261
546211165
772994466
726500144
1194073943
1529356323
...

result:

ok 100000 numbers

Test #19:

score: 0
Accepted
time: 55ms
memory: 7312kb

input:

100000
59278 3853 99992 57820 93687 99995 82091 10266 100000 73134 25874 99997 47854 46417 99996 59793 413 99999 93401 59552 99996 89492 75606 99991 13641 58215 99994 72836 95197 99997 87072 57159 99999 48560 192 99998 73974 52401 99993 28280 73195 99992 20898 91885 99998 16764 14927 99991 49476 140...

output:

861319788
542914471
661249812
57119851
1371511440
118159189
1117544735
1537825694
16147821
1085679850
995667387
1413049148
2038053595
979999717
860306414
1567596841
1570364
604532284
28977333
2410680618
598713640
1023679872
556711598
866886506
506287977
647591285
529553489
1104267450
39085552
112821...

result:

ok 100000 numbers

Test #20:

score: 0
Accepted
time: 49ms
memory: 7364kb

input:

100000
57229 9 8 75881 7 1 77237 9 7 94754 1 3 80864 4 6 21502 7 7 88015 7 3 63520 10 1 8061 8 6 46233 1 10 95185 10 3 24430 7 2 4293 8 2 14026 1 2 30293 1 6 39782 9 2 31819 3 2 11318 4 1 56233 4 1 60728 10 2 19320 6 1 29112 9 2 55056 2 8 21095 7 1 51304 4 5 22813 2 7 24192 8 10 41419 5 7 73005 8 8 ...

output:

1262973974
547651614
873118298
1423767040
68705657
117493926
13160950
457004494
656105993
196820495
1981993106
629091460
391752459
805381620
1576078484
73744747
2042224614
1018284469
657197466
343606184
1130420800
45554748
250986815
1041005279
1371697294
18298898
722782873
208949291
1076379957
11795...

result:

ok 100000 numbers

Test #21:

score: 0
Accepted
time: 53ms
memory: 7352kb

input:

100000
66904 5 6 92237 3 3 87107 10 3 1374 4 5 98449 8 7 74819 10 3 25590 9 9 93082 7 3 23706 8 2 54325 9 7 37825 3 1 578 5 9 14399 10 4 69882 10 2 11035 4 8 75337 9 10 3522 8 6 55165 10 4 64175 4 4 35025 9 7 41017 2 8 94203 9 7 42205 5 8 22420 5 1 41549 3 6 72200 3 9 4408 4 2 98814 7 4 76954 8 3 38...

output:

506869725
1774251489
93952076
753638106
122527296
449674074
343603421
630570644
2058400085
21420065
686573678
443622361
1158438308
875653627
1136663216
592393045
2232964242
900079901
140890641
206539541
55230561
380792008
1903886756
130406525
345331430
258562842
139006374
1418805891
661414575
158633...

result:

ok 100000 numbers

Extra Test:

score: 0
Extra Test Passed