QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#522490#1365. Dominating DuosZhaoZiLongAC ✓54ms7292kbC++23525b2024-08-17 00:13:202024-08-17 00:13:21

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

6
5
4
1
3
2
6

output:

9

result:

ok single line: '9'

Test #2:

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

input:

7
7
5
3
1
2
4
6

output:

11

result:

ok single line: '11'

Test #3:

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

input:

2
1
2

output:

1

result:

ok single line: '1'

Test #4:

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

input:

2
2
1

output:

1

result:

ok single line: '1'

Test #5:

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

input:

1000000
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
...

output:

999999

result:

ok single line: '999999'

Test #6:

score: 0
Accepted
time: 52ms
memory: 3580kb

input:

1000000
132688
285164
789988
995739
957234
130646
181990
390985
39400
169852
338142
243039
138781
101935
65454
181372
669660
552019
306420
956162
250294
690026
762175
81413
111955
706117
559279
227057
329009
170181
31563
832603
284155
435293
806726
908654
2086
183340
740499
786030
466870
235655
7314...

output:

1999975

result:

ok single line: '1999975'

Test #7:

score: 0
Accepted
time: 43ms
memory: 7292kb

input:

1000000
1000000
999999
999998
999997
999996
999995
999994
999993
999992
999991
999990
999989
999988
999987
999986
999985
999984
999983
999982
999981
999980
999979
999978
999977
999976
999975
999974
999973
999972
999971
999970
999969
999968
999967
999966
999965
999964
999963
999962
999961
999960
9999...

output:

999999

result:

ok single line: '999999'

Test #8:

score: 0
Accepted
time: 47ms
memory: 5940kb

input:

1000000
1000000
999998
999996
999994
999992
999990
999988
999986
999984
999982
999980
999978
999976
999974
999972
999970
999968
999966
999964
999962
999960
999958
999956
999954
999952
999950
999948
999946
999944
999942
999940
999938
999936
999934
999932
999930
999928
999926
999924
999922
999920
9999...

output:

1999997

result:

ok single line: '1999997'

Test #9:

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

input:

1000000
1
3
5
7
9
11
13
15
17
19
21
23
25
27
29
31
33
35
37
39
41
43
45
47
49
51
53
55
57
59
61
63
65
67
69
71
73
75
77
79
81
83
85
87
89
91
93
95
97
99
101
103
105
107
109
111
113
115
117
119
121
123
125
127
129
131
133
135
137
139
141
143
145
147
149
151
153
155
157
159
161
163
165
167
169
171
173...

output:

999999

result:

ok single line: '999999'

Test #10:

score: 0
Accepted
time: 52ms
memory: 3848kb

input:

1000000
337797
203097
236860
865126
543423
61858
481710
408580
297968
91437
31136
171854
787011
226820
754784
40023
145010
359212
631215
31698
772587
797247
250481
383284
217285
58099
648128
130733
22390
881861
487374
216476
958000
497478
229846
577205
163656
287148
699792
936572
984840
276225
29816...

output:

1999976

result:

ok single line: '1999976'

Test #11:

score: 0
Accepted
time: 46ms
memory: 3588kb

input:

1000000
673837
797266
510963
254248
13430
483474
837350
50074
700533
242241
230110
440315
185351
444253
207160
253498
948305
744966
78889
102864
636401
684630
305587
294176
600274
471943
135247
148504
672589
392850
345380
736448
303704
94133
108650
34863
667351
437483
54827
718070
45577
392673
96373...

output:

1999962

result:

ok single line: '1999962'

Test #12:

score: 0
Accepted
time: 54ms
memory: 3580kb

input:

1000000
327972
326281
681409
735858
756844
259353
374674
761914
122194
955302
884641
632105
221601
33531
654301
4287
418605
552998
654262
428460
164206
722364
404226
90520
692255
315429
795290
695807
603028
733212
707347
15921
607362
202958
66473
184500
252820
891566
319860
473292
504545
120087
5437...

output:

1999976

result:

ok single line: '1999976'

Test #13:

score: 0
Accepted
time: 51ms
memory: 3652kb

input:

1000000
416083
864576
527877
370035
116102
808795
327984
170796
205941
140392
567168
604125
492140
782682
397165
247376
586565
75480
19463
366661
661866
802895
435373
532505
676951
480728
694120
700019
305600
273297
247734
789740
622332
470625
639610
159421
272730
855600
862359
545455
634570
203687
...

output:

1999971

result:

ok single line: '1999971'

Test #14:

score: 0
Accepted
time: 54ms
memory: 3580kb

input:

1000000
199055
144639
173154
455157
240891
762427
572211
339536
747565
768041
543857
32881
84456
358024
901190
131457
249557
329412
341805
229822
874580
854642
375474
514882
270194
638371
62564
404941
211448
171215
678268
144888
695971
598430
185697
104684
423733
654433
457245
330503
741697
25102
97...

output:

1999970

result:

ok single line: '1999970'

Test #15:

score: 0
Accepted
time: 46ms
memory: 3616kb

input:

830261
767972
267074
19373
102358
362220
290434
254657
421114
382178
489500
327847
430258
476006
662738
162433
448624
45104
569034
430581
454621
123743
310615
285474
441775
410869
493192
608556
28415
294933
389041
698040
602700
457083
69512
170721
418407
215850
771777
145875
46163
207662
87049
1153
...

output:

1660498

result:

ok single line: '1660498'

Test #16:

score: 0
Accepted
time: 9ms
memory: 3636kb

input:

157371
87916
34968
35100
65676
95352
97845
93262
79662
39556
154855
134617
41017
57875
38914
36979
53365
298
105384
118973
133256
136277
55982
413
38698
67695
115856
24876
98853
19408
100947
105536
147410
35822
90222
70542
20548
63079
25802
125029
110710
7718
140237
10195
99476
125265
19627
142762
5...

output:

314724

result:

ok single line: '314724'

Test #17:

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

input:

519525
45611
171943
113713
109866
119074
290576
118916
508864
352356
205928
453792
321117
50169
465013
89922
297257
279567
218702
66094
311095
364510
123463
207014
491052
43977
252690
80642
256993
118396
272599
401246
297077
173377
54486
158425
159897
16438
27038
216927
111072
269922
182179
26582
77...

output:

1039014

result:

ok single line: '1039014'

Test #18:

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

input:

8638
2908
148
928
3685
5096
2907
8513
7252
1056
207
2375
6701
1841
4057
4577
1070
83
8250
2624
2053
6414
6752
1909
482
4
6515
3963
7816
3918
4722
1011
6202
7335
2006
66
829
5651
527
3577
2540
1178
1202
3440
8419
5304
5832
6425
3228
1097
7551
2536
4720
601
2475
378
1324
8115
2276
6264
93
808
2777
714...

output:

17256

result:

ok single line: '17256'

Test #19:

score: 0
Accepted
time: 40ms
memory: 3576kb

input:

793943
529927
520907
689960
348007
116812
586703
94030
89155
161391
557863
38610
465132
281240
277
111111
651752
640145
117867
133270
332307
15133
132605
328591
85185
613776
612332
563030
647244
307822
428319
234954
556971
117206
328877
688595
361685
609138
675657
326201
293342
295080
225626
17273
1...

output:

1587858

result:

ok single line: '1587858'