QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#646336#7470. WBLTHuluobo60 1439ms18468kbC++146.4kb2024-10-16 22:18:112024-10-16 22:18:13

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 30
Accepted

Test #1:

score: 30
Accepted
time: 14ms
memory: 10652kb

input:

1000
233 991 831 426 140 881 289 287 957 886 561 109 305 469 961 577 683 593 277 601 181 255 100 997 161 619 632 413 987 811 357 635 99 809 888 511 945 881 261 434 851 311 21 641 508 701 661 158 696 560 577 501 951 786 909 238 546 573 617 236 270 705 786 353 651 296 353 720 261 429 855 176 977 57 50...

output:

3
3
2
4
4
0
3
2
2
2
2
2
1
4
2
2
3
3
2
2
5
3
1
2
2
2
2
1
3
3
2
3
1
3
5
2
0
4
2
1
5
2
2
2
2
2
2
2
2
2
2
6
1
3
2
1
2
2
1
0
0
2
2
2
3
2
1
3
2
2
2
3
2
4
0
2
2
2
3
3
2
2
0
2
3
2
2
2
4
1
2
2
4
3
2
2
5
3
2
2
1
1
2
2
2
6
3
2
1
2
3
1
1
0
3
3
2
2
2
1
2
2
2
3
3
3
2
4
3
2
1
5
2
4
2
1
1
2
2
3
2
2
2
3
3
2
2
1
2
2
...

result:

ok 1000 numbers

Subtask #2:

score: 30
Accepted

Test #2:

score: 30
Accepted
time: 136ms
memory: 15092kb

input:

100000
241 721 861 909 540 928 171 159 637 60 145 227 110 975 766 220 311 761 191 980 887 793 773 957 625 61 994 606 465 625 598 667 181 197 15 826 136 499 199 331 621 327 945 726 197 997 681 641 465 805 211 531 333 505 483 345 612 241 376 700 5 338 661 777 241 412 118 585 121 1 398 658 855 598 300 ...

output:

2
6
17
3
2
2
2
2
2
3
2
2
11
2
7
2
4
2
2
3
9
5
2
2
4
2
2
4
2
2
2
2
7
8
2
2
9
2
3
4
4
2
3
2
2
3
2
2
1
2
2
2
13
167
11
2
3
0
2
2
2
2
2
2
3
3
4
7
2
3
2
4
2
5
2
23
2
3
2
0
2
2
2
4
2
4
2
2
4
2
2
5
2
91
5
2
2
2
3
3
2
2
3
2
0
2
3
2
2
2
3
2
5
2
2
5
2
77
21
2
7
3
2
3
2
2
2
2
13
2
4
4
2
2
9
2
2
2
3
13
3
5
2
4
...

result:

ok 100000 numbers

Test #3:

score: 30
Accepted
time: 163ms
memory: 16852kb

input:

100000
6 8 75 85 89 8 88 56 1 64 37 6 28 16 87 74 57 51 5 72 39 85 100 54 1 97 77 40 97 95 65 56 37 13 44 23 68 49 85 79 27 57 75 81 1 26 61 45 97 31 85 61 51 37 30 53 1 51 11 57 49 22 40 67 49 85 53 89 1 97 88 57 79 6 61 61 36 75 71 53 81 91 91 1 91 1 29 67 47 81 81 37 71 14 17 26 65 59 36 7 97 77 ...

output:

5
2
4
2
4
4
4
0
6
2
2
7
8
2
3
2
4
8
2
2
2
8
2
2
2
0
4
1
3
2
2
4
10
2
3
0
2
13
2
2
3
2
2
2
5
2
3
2
0
3
6
2
0
2
3
2
3
34
2
2
7
2
2
8
2
2
10
2
0
0
2
2
2
3
2
2
2
3
2
5
2
2
2
2
2
2
5
10
34
2
2
3
3
2
3
2
2
2
2
20
4
13
4
4
2
50
5
3
2
2
10
2
3
2
3
4
2
12
3
7
12
5
2
5
3
4
2
2
3
2
2
2
2
2
2
2
4
2
2
2
2
2
0
13...

result:

ok 100000 numbers

Test #4:

score: 30
Accepted
time: 81ms
memory: 18468kb

input:

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

output:

2
4
2
2
2
0
0
2
0
5
2
0
2
2
2
0
3
2
0
2
2
0
2
1
3
2
4
0
0
1
2
4
2
2
0
2
0
0
2
0
2
0
4
2
2
2
2
0
2
2
3
2
2
5
4
3
0
2
2
2
3
3
2
1
2
0
1
2
2
2
4
2
2
2
0
2
4
0
2
2
3
4
2
0
3
2
2
4
2
2
0
0
4
4
1
2
2
2
3
2
2
2
0
2
2
5
0
2
4
1
2
2
2
2
2
2
0
2
2
2
2
0
4
2
2
5
0
2
4
2
2
5
2
0
2
4
2
0
4
2
2
2
2
2
0
2
5
2
4
2
...

result:

ok 100000 numbers

Subtask #3:

score: 0
Wrong Answer

Test #5:

score: 40
Accepted
time: 1094ms
memory: 15568kb

input:

99917
24947 3268 49683 43610 87927 86331 16017 19557 72137 16689 28231 87819 9481 2403 18661 8145 86091 90410 54635 10896 53999 43367 95987 23733 17359 94625 81763 44331 63663 6075 20784 94229 61578 3890 95047 32681 39491 33139 51629 34573 859 31797 22897 7647 52199 17817 6311 46787 20619 81037 5374...

output:

3
7
9
5
3123
34
5
3
2
7
8
45
34
350
11
515
3
0
40
1
11
2
5
2
3
267
6
2
3
11
333
13
0
5
11
424
676
17
7
103
5
11
4
10
3
4
1
23
2
7
4
63
7
1
0
93
10
7
9
5674
16
1
16
9
141
2
1
2
18
1
6
4
1
0
714
8
18
14
3
1
4
13
5
4
1
278
6
19
130
9
7
763
3
26
5
2
1427
4
3348
389
41
11
1564
362
10
5
8
1
2271
15
18
3
3...

result:

ok 99968 numbers

Test #6:

score: 40
Accepted
time: 1439ms
memory: 15772kb

input:

99904
10367 10479 10591 10703 10815 10927 11039 11151 11263 11375 11487 11599 11711 11823 11935 12047 12159 12271 12383 12495 12607 12719 12831 12943 13055 13167 13279 13391 13503 13615 13727 13839 13951 14063 14175 14287 14399 14511 14623 14735 14847 14959 15071 15183 15295 15407 15519 15631 15743 ...

output:

12
9
342
3028
0
0
4
617
1
4
1
0
516
4
655
0
482
1
56
8
2
7
366
6
5551
3
1
102
25
648
25
19
0
1
2
2
813
261
1
33301
48
0
2
1
3
3
412
5
12
5
10
12
680
193
246
10
8
388
3
2
1
25
4
8
709
10
106
45
2
231
88
3
3
140
296
3
26
1
20
108
9
3
573
641
3
2
6
3
5551
29
9
4
10
1
6
26
2
117
2
1
6
143
1
2
276
7
31
0...

result:

ok 99924 numbers

Test #7:

score: 40
Accepted
time: 1069ms
memory: 15412kb

input:

99969
25648 25858 26068 26278 26488 26698 26908 27118 27328 27538 27748 27958 28168 28378 28588 28798 29008 29218 29428 29638 29848 30058 30268 30478 30688 30898 31108 31318 31528 31738 31948 32158 32368 32578 32788 32998 33208 33418 33628 33838 34048 34258 34468 34678 34888 35098 35308 35518 35728 ...

output:

367
3
23
26
0
4
1
5
1
50
4
0
5
324
15
529
2
5
215
25
2
36
1
1
7
1
4
1
5
1
58
265
1
2
94
11
4
102
122
9
17
17
562
271
2
0
18
3
7
3
26
5
87
3
7
1
2
172
13
5
65
5
75
1
36
13
83
1
79
260
1
758
10
29
6
6
94
26
5
529
54
1667
5
8
5
2
318
1
6
85
282
2381
1
6
124
5
2
221
75
10
28
74
39
22
128
186
5
11108
45
...

result:

ok 99968 numbers

Test #8:

score: 40
Accepted
time: 824ms
memory: 15692kb

input:

99906
36465 45696 53812 65157 8362 50390 8938 66579 26693 23509 59735 63357 37477 90628 20147 72910 99559 37162 99384 68055 41090 33886 85000 37741 67533 62838 51629 98159 34652 32219 64124 29772 82734 49142 4703 53488 34548 33792 92462 74455 72552 15702 95270 78539 95968 59919 73874 85989 75481 135...

output:

0
10
4344
1
1
5
2351
11
1199
17
1
9
49
8
8
21
58
135
3
4
9
30
21
3
331
1
232
544
65
2
5
9
6
209
540
21
7
3
4
1
24
13
4
1
132
4
4
7
3
27
1
12
15
47
4
4344
2
17
8
3
1
111
0
22
4
6
3752
108
3
3
1052
4
4
101
7
360
3
1444
2
55
3
6
3
2
73
233
114
9
52
0
13
59
2
4
13
106
8
101
5
9
6
2
6
345
1
13
3
4
5
4
18...

result:

ok 99917 numbers

Test #9:

score: 0
Wrong Answer
time: 763ms
memory: 15508kb

input:

99966
44799 72530 81392 43798 83470 66203 36496 90621 14743 58886 57175 17632 39281 51952 84112 28506 46662 77651 3258 5736 3873 75583 60096 4179 68022 6864 52499 86228 51707 9717 33268 6141 16004 41257 12889 34449 56219 68531 41082 10477 88198 76466 4391 66838 90572 15137 16809 59816 94083 13212 42...

output:

75
3
1
1
28
110
2
4
2
3
12
5
36
3
404
2
9
27
206
11
1
2
132
6
6
17
33
1
68
10
2
3
10
1
14
4
72
3610
148
1
9
2
7
4
78
9
16
208
3
1
6
3
3
2
62
1
8
5
8
2
154
2
2
101
2
115
1
9
83
518
1
138
11
6
6
7
1
5
109
54
14743
63
5
2
7
15
130
2
3
6
209
1
4
4
6
758
4
43
1
400
5
64
14
0
9
2
9
14
5
11
3
2
15
2
2
3
25...

result:

wrong answer 501st numbers differ - expected: '1613', found: '1615'