QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#252977#7679. Master of Both IVucup-team1099TL 529ms37100kbC++204.8kb2023-11-16 16:06:412023-11-16 16:06:41

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
3
1 2 3
5
3 3 5 1 1

output:

4
11

result:

ok 2 number(s): "4 11"

Test #2:

score: 0
Accepted
time: 529ms
memory: 7644kb

input:

40000
5
4 2 5 5 5
5
5 5 5 5 4
5
1 4 4 4 2
5
2 5 2 4 1
5
3 2 4 5 3
5
1 5 5 3 4
5
5 5 5 4 3
5
4 3 3 5 1
5
4 5 5 2 1
5
2 5 4 2 5
5
3 4 3 4 3
5
5 3 5 1 3
5
5 1 2 4 4
5
4 2 5 1 5
5
5 4 2 5 4
5
5 2 5 2 4
5
1 4 5 4 5
5
4 2 3 2 3
5
1 4 1 3 5
5
1 1 2 1 5
5
5 2 5 1 3
5
3 1 2 5 3
5
5 5 1 1 5
5
2 2 2 1 3
5
3 1 ...

output:

9
16
9
9
8
8
9
8
8
9
13
8
8
8
8
9
12
9
11
15
8
8
17
13
8
11
8
8
8
13
15
9
9
8
8
8
11
9
11
13
15
9
17
9
8
8
8
13
11
8
9
11
8
8
11
15
9
8
9
8
8
15
11
8
17
9
15
8
8
8
12
9
9
11
8
13
9
8
15
8
8
9
8
8
8
15
8
11
13
8
9
11
8
19
11
13
19
17
13
15
8
8
8
9
8
9
13
15
17
9
9
17
9
11
9
9
11
9
9
11
8
9
9
13
15
11...

result:

ok 40000 numbers

Test #3:

score: 0
Accepted
time: 318ms
memory: 7776kb

input:

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

output:

97
77
82
74
75
84
75
105
159
95
81
74
78
75
73
73
83
93
90
84
79
77
73
89
77
74
81
79
80
207
83
77
83
78
87
85
84
97
75
80
117
75
113
74
75
95
77
83
86
77
99
73
77
83
91
96
77
80
77
76
84
81
73
95
83
74
75
81
77
79
75
78
78
81
97
77
85
73
92
83
73
80
73
81
74
73
142
83
99
78
91
77
76
81
77
74
78
76
...

result:

ok 20000 numbers

Test #4:

score: 0
Accepted
time: 189ms
memory: 7756kb

input:

10000
20
5 12 4 16 11 20 3 1 3 13 19 16 3 17 15 9 10 18 19 13
20
4 17 14 3 3 10 6 17 16 17 16 8 1 15 13 12 8 12 10 9
20
18 11 5 11 5 5 9 3 17 10 6 8 5 10 11 15 19 9 10 11
20
7 7 12 13 20 9 14 17 1 10 13 20 10 19 3 12 1 8 8 3
20
13 20 17 12 6 1 16 5 3 2 18 7 2 7 20 1 12 4 7 1
20
15 6 13 1 10 5 13 3 4...

output:

32801
32799
32832
32817
32955
65621
32919
32865
32843
32798
32792
32843
32796
32823
32803
32807
32797
32859
32806
32799
32806
32813
32893
32798
32798
32799
32832
32792
32825
32817
32867
32795
32806
32796
32794
32943
32795
32791
65732
32842
32841
32841
32806
32804
32852
32795
32867
32798
32841
32823
...

result:

ok 10000 numbers

Test #5:

score: 0
Accepted
time: 262ms
memory: 7776kb

input:

16666
12
11 11 9 7 10 9 7 5 4 8 3 3
12
8 6 8 9 3 10 10 9 1 4 5 10
12
2 1 4 1 2 8 7 11 8 7 5 9
12
4 6 11 11 9 11 3 10 4 9 10 6
12
6 2 11 4 10 9 5 9 5 8 9 2
12
9 10 5 2 2 2 3 6 4 11 8 8
12
7 6 5 4 1 11 1 6 11 9 9 3
12
4 5 11 12 1 3 3 9 4 4 1 11
12
6 9 9 11 4 7 10 5 6 9 8 1
12
7 1 2 1 6 11 8 5 8 8 2 6
...

output:

269
268
283
268
274
283
277
295
268
291
269
855
275
287
344
299
291
277
329
274
281
276
267
268
268
270
338
275
297
315
273
307
303
302
269
279
272
278
281
302
270
301
295
268
303
279
303
267
279
297
326
272
270
287
287
277
273
276
296
307
274
271
281
278
277
311
273
277
275
315
272
272
293
278
285
...

result:

ok 16666 numbers

Test #6:

score: 0
Accepted
time: 381ms
memory: 33400kb

input:

1
199999
31326 93089 143392 198151 77233 59844 54715 190000 165927 171095 37063 5018 63088 44405 71037 25580 164377 88095 161549 177275 27730 70339 43759 118378 142428 109706 184253 60233 148241 30394 137958 92664 199171 166535 103239 164430 53636 191124 72007 81005 84139 162416 72120 123920 67659 1...

output:

201346582

result:

ok 1 number(s): "201346582"

Test #7:

score: 0
Accepted
time: 375ms
memory: 33608kb

input:

1
200000
170638 5636 88928 129268 153767 88291 149068 48393 141101 184304 94311 9175 191831 49369 148252 116494 143778 82929 154524 119427 98000 4334 67480 110892 23718 90985 175496 1895 30892 65569 66919 99699 93681 154168 93236 151988 192901 64308 133298 132467 145277 32832 174696 98652 70963 7005...

output:

91986751

result:

ok 1 number(s): "91986751"

Test #8:

score: 0
Accepted
time: 181ms
memory: 7972kb

input:

10000
20
1 1 1 1 1 1 1 6 1 7 1 7 8 17 9 6 4 4 12 1
20
10 1 1 1 1 1 8 1 1 1 1 6 1 1 11 18 16 17 1 5
20
8 1 8 4 18 1 8 1 15 1 13 1 3 7 7 20 1 1 18 6
20
1 12 1 1 2 1 1 1 1 1 1 4 1 1 20 1 4 1 1 4
20
1 1 11 13 9 6 1 16 1 1 1 1 1 6 20 1 1 19 19 4
20
17 1 8 6 1 4 1 1 9 14 1 8 1 20 17 1 14 1 6 2
20
1 1 7 1 ...

output:

40447
51199
33727
147455
38399
34431
75775
44031
43519
39935
53247
47103
61439
71423
43007
38399
35839
38399
34431
39423
51199
65535
65535
39423
33919
43007
35455
76799
36607
69631
34303
33919
34815
39423
34943
40447
83967
44031
53247
43007
43007
61439
43007
38911
34239
43007
38399
36351
146431
3942...

result:

ok 10000 numbers

Test #9:

score: 0
Accepted
time: 267ms
memory: 28328kb

input:

1
200000
337 89 53250 295 11 52707 208 194232 272 48579 42662 7 134511 375 126116 204 203 23 154649 257 47442 219 122 626 133238 12761 125572 240 1746 264 83473 165545 386 85154 420 736 36400 91303 71984 140 103 2 83438 163 678 67336 130520 464 155504 202 393 758 28195 257 137 165 469 178634 385 265...

output:

399453367

result:

ok 1 number(s): "399453367"

Test #10:

score: 0
Accepted
time: 262ms
memory: 28264kb

input:

1
199999
334 31415 2 88681 173009 93665 47 392 6 145850 37791 382 96220 160151 28469 52299 139234 144008 168 9690 217 114488 414 5000 113 269 145035 178 177807 248 139 48314 60601 234 67019 20308 17 55 22881 212 72 81873 929 86915 111 185437 178991 657 609 133 39 211 609 219 99908 77856 31177 64 644...

output:

198391398

result:

ok 1 number(s): "198391398"

Test #11:

score: 0
Accepted
time: 509ms
memory: 36904kb

input:

1
200000
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:

797193212

result:

ok 1 number(s): "797193212"

Test #12:

score: 0
Accepted
time: 512ms
memory: 37100kb

input:

1
199999
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:

883064837

result:

ok 1 number(s): "883064837"

Test #13:

score: 0
Accepted
time: 226ms
memory: 17864kb

input:

2
100000
36897 43 23607 5522 77238 3 36262 218 61672 90359 156 233 87 87100 263 27042 96656 334 31389 12 88845 18919 78780 214 50549 11 22758 1727 22810 6114 182 70041 147 42626 166 84476 25553 44119 82 43747 74160 58 36290 694 147 43135 84111 15 266 503 47753 56 12930 54880 64358 35344 92159 66 224...

output:

839775113
741669021

result:

ok 2 number(s): "839775113 741669021"

Test #14:

score: 0
Accepted
time: 262ms
memory: 28316kb

input:

1
198989
158 85097 186 206 525 575 105386 99561 11794 184 289 19 79753 126796 108148 131374 145483 41597 593 291 14640 159064 73 184628 561 186 72043 96 5323 398 15 13562 70812 99 62 169090 75017 143560 29690 118200 122412 1007 122274 78 51038 10433 59897 244 181 137246 345 26 37 169768 106486 173 4...

output:

457061394

result:

ok 1 number(s): "457061394"

Test #15:

score: -100
Time Limit Exceeded

input:

200000
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result: