QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#352948#8271. SequenceDec0Dedd#31 1ms3936kbC++142.0kb2024-03-13 18:51:102024-07-04 03:29:32

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 11
Accepted

Test #1:

score: 11
Accepted
time: 0ms
memory: 3648kb

input:

10
1
1
300
1
300
300
300
1
1
1

output:

1
2
302
3
303
602
902
4
5
6

result:

ok 10 lines

Test #2:

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

input:

5
2
3
5
8
11

output:

2
5
10
13
24

result:

ok 5 lines

Test #3:

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

input:

5
11
8
5
3
2

output:

11
19
24
22
24

result:

ok 5 lines

Test #4:

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

input:

10
923992
541947
567511
357324
813558
178420
173977
186266
158267
115992

output:

923992
1465939
2033450
1823263
2636821
2211870
2385847
2009529
2167796
2283788

result:

ok 10 lines

Test #5:

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

input:

10
7
9
9
5
10
5
9
3
1
3

output:

7
16
25
21
31
30
39
24
25
28

result:

ok 10 lines

Test #6:

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

input:

10
541685
317557
788550
628270
601073
863693
536
94813
86706
349169

output:

541685
859242
1647792
1487512
2088585
2511485
2512021
1582325
1669031
2018200

result:

ok 10 lines

Test #7:

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

input:

10
3
5
4
1
5
4
4
2
2
4

output:

3
8
12
9
14
16
20
11
13
17

result:

ok 10 lines

Test #8:

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

input:

10
1
1
1
1
1
1
1
1
1
1

output:

1
2
3
3
4
4
5
4
4
5

result:

ok 10 lines

Test #9:

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

input:

9
1
1
1
1
1
1
1
1
1

output:

1
2
3
3
4
4
5
4
4

result:

ok 9 lines

Test #10:

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

input:

7
1
1
6
1
1
1
1

output:

1
2
8
3
4
5
6

result:

ok 7 lines

Test #11:

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

input:

3
10
42
1

output:

10
52
53

result:

ok 3 lines

Subtask #2:

score: 10
Accepted

Test #12:

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

input:

1
1

output:

1

result:

ok single line: '1'

Test #13:

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

input:

5
1
1
1
1
1

output:

1
2
3
3
4

result:

ok 5 lines

Test #14:

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

input:

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

output:

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

result:

ok 300 lines

Test #15:

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

input:

11
1
1
1
1
1
1
1
1
1
1
1

output:

1
2
3
3
4
4
5
4
4
5
6

result:

ok 11 lines

Test #16:

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

input:

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

output:

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

result:

ok 299 lines

Subtask #3:

score: 10
Accepted

Dependency #2:

100%
Accepted

Test #17:

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

input:

1
1

output:

1

result:

ok single line: '1'

Test #18:

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

input:

5
1
1
1
1
1

output:

1
2
3
3
4

result:

ok 5 lines

Test #19:

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

input:

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

output:

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

result:

ok 300 lines

Test #20:

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

input:

11
1
1
1
1
1
1
1
1
1
1
1

output:

1
2
3
3
4
4
5
4
4
5
6

result:

ok 11 lines

Test #21:

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

input:

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

output:

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

result:

ok 299 lines

Test #22:

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

input:

300
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
...

output:

2
4
6
6
8
8
10
8
8
10
12
10
12
12
12
8
10
10
12
10
12
14
16
12
10
12
10
12
14
12
14
10
12
12
14
10
12
14
14
12
14
12
14
14
14
16
18
12
12
12
14
14
16
12
14
14
14
16
18
14
16
16
14
10
12
14
16
12
14
16
18
12
14
14
14
16
18
14
16
12
10
12
14
14
14
16
16
16
18
12
14
16
16
18
18
14
16
14
14
12
14
16
18
...

result:

ok 300 lines

Test #23:

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

input:

300
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
...

output:

3
6
9
9
12
12
15
12
12
15
18
15
18
18
18
12
15
15
18
15
18
21
24
18
15
18
15
18
21
18
21
15
18
18
21
15
18
21
21
18
21
18
21
21
21
24
27
18
18
18
21
21
24
18
21
21
21
24
27
21
24
24
21
15
18
21
24
18
21
24
27
18
21
21
21
24
27
21
24
18
15
18
21
21
21
24
24
24
27
18
21
24
24
27
27
21
24
21
21
18
21
2...

result:

ok 300 lines

Test #24:

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

input:

300
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10...

output:

10
20
30
30
40
40
50
40
40
50
60
50
60
60
60
40
50
50
60
50
60
70
80
60
50
60
50
60
70
60
70
50
60
60
70
50
60
70
70
60
70
60
70
70
70
80
90
60
60
60
70
70
80
60
70
70
70
80
90
70
80
80
70
50
60
70
80
60
70
80
90
60
70
70
70
80
90
70
80
60
50
60
70
70
70
80
80
80
90
60
70
80
80
90
90
70
80
70
70
60
...

result:

ok 300 lines

Test #25:

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

input:

300
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
...

output:

100
200
300
300
400
400
500
400
400
500
600
500
600
600
600
400
500
500
600
500
600
700
800
600
500
600
500
600
700
600
700
500
600
600
700
500
600
700
700
600
700
600
700
700
700
800
900
600
600
600
700
700
800
600
700
700
700
800
900
700
800
800
700
500
600
700
800
600
700
800
900
600
700
700
700
...

result:

ok 300 lines

Test #26:

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

input:

300
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
1000000
...

output:

1000000
2000000
3000000
3000000
4000000
4000000
5000000
4000000
4000000
5000000
6000000
5000000
6000000
6000000
6000000
4000000
5000000
5000000
6000000
5000000
6000000
7000000
8000000
6000000
5000000
6000000
5000000
6000000
7000000
6000000
7000000
5000000
6000000
6000000
7000000
5000000
6000000
7000...

result:

ok 300 lines

Test #27:

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

input:

300
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
999999
99...

output:

999999
1999998
2999997
2999997
3999996
3999996
4999995
3999996
3999996
4999995
5999994
4999995
5999994
5999994
5999994
3999996
4999995
4999995
5999994
4999995
5999994
6999993
7999992
5999994
4999995
5999994
4999995
5999994
6999993
5999994
6999993
4999995
5999994
5999994
6999993
4999995
5999994
69999...

result:

ok 300 lines

Test #28:

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

input:

300
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
123456
12...

output:

123456
246912
370368
370368
493824
493824
617280
493824
493824
617280
740736
617280
740736
740736
740736
493824
617280
617280
740736
617280
740736
864192
987648
740736
617280
740736
617280
740736
864192
740736
864192
617280
740736
740736
864192
617280
740736
864192
864192
740736
864192
740736
864192...

result:

ok 300 lines

Test #29:

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

input:

300
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
392845
39...

output:

392845
785690
1178535
1178535
1571380
1571380
1964225
1571380
1571380
1964225
2357070
1964225
2357070
2357070
2357070
1571380
1964225
1964225
2357070
1964225
2357070
2749915
3142760
2357070
1964225
2357070
1964225
2357070
2749915
2357070
2749915
1964225
2357070
2357070
2749915
1964225
2357070
274991...

result:

ok 300 lines

Subtask #4:

score: 0
Wrong Answer

Dependency #2:

100%
Accepted

Test #30:

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

input:

1
1

output:

1

result:

ok single line: '1'

Test #31:

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

input:

5
1
1
1
1
1

output:

1
2
3
3
4

result:

ok 5 lines

Test #32:

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

input:

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

output:

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

result:

ok 300 lines

Test #33:

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

input:

11
1
1
1
1
1
1
1
1
1
1
1

output:

1
2
3
3
4
4
5
4
4
5
6

result:

ok 11 lines

Test #34:

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

input:

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

output:

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

result:

ok 299 lines

Test #35:

score: -9
Wrong Answer
time: 0ms
memory: 3712kb

input:

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

output:

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

result:

wrong answer 301st lines differ - expected: '8', found: '0'

Subtask #5:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%

Subtask #6:

score: 0
Skipped

Dependency #5:

0%