QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#405209#8271. Sequencemonstersqwq31 24ms97548kbC++144.2kb2024-05-05 13:48:122024-05-05 13:48:12

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 11
Accepted

Test #1:

score: 11
Accepted
time: 11ms
memory: 97492kb

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: 11
Accepted
time: 12ms
memory: 97372kb

input:

5
2
3
5
8
11

output:

2
5
10
13
24

result:

ok 5 lines

Test #3:

score: 11
Accepted
time: 16ms
memory: 97384kb

input:

5
11
8
5
3
2

output:

11
19
24
22
24

result:

ok 5 lines

Test #4:

score: 11
Accepted
time: 11ms
memory: 97496kb

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: 11
Accepted
time: 16ms
memory: 97264kb

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: 11
Accepted
time: 12ms
memory: 97192kb

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: 11
Accepted
time: 7ms
memory: 97332kb

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: 11
Accepted
time: 12ms
memory: 97328kb

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: 11
Accepted
time: 15ms
memory: 97388kb

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: 11
Accepted
time: 11ms
memory: 97332kb

input:

7
1
1
6
1
1
1
1

output:

1
2
8
3
4
5
6

result:

ok 7 lines

Test #11:

score: 11
Accepted
time: 12ms
memory: 97444kb

input:

3
10
42
1

output:

10
52
53

result:

ok 3 lines

Subtask #2:

score: 10
Accepted

Test #12:

score: 10
Accepted
time: 21ms
memory: 97444kb

input:

1
1

output:

1

result:

ok single line: '1'

Test #13:

score: 10
Accepted
time: 16ms
memory: 97440kb

input:

5
1
1
1
1
1

output:

1
2
3
3
4

result:

ok 5 lines

Test #14:

score: 10
Accepted
time: 24ms
memory: 97432kb

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: 10
Accepted
time: 8ms
memory: 97444kb

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: 10
Accepted
time: 15ms
memory: 97372kb

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: 11ms
memory: 97188kb

input:

1
1

output:

1

result:

ok single line: '1'

Test #18:

score: 10
Accepted
time: 11ms
memory: 97448kb

input:

5
1
1
1
1
1

output:

1
2
3
3
4

result:

ok 5 lines

Test #19:

score: 10
Accepted
time: 12ms
memory: 97428kb

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: 10
Accepted
time: 8ms
memory: 97444kb

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: 10
Accepted
time: 12ms
memory: 97420kb

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: 10
Accepted
time: 12ms
memory: 97424kb

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: 10
Accepted
time: 16ms
memory: 97424kb

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: 10
Accepted
time: 12ms
memory: 97376kb

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: 10
Accepted
time: 18ms
memory: 97420kb

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: 10
Accepted
time: 8ms
memory: 97400kb

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: 10
Accepted
time: 11ms
memory: 97460kb

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: 10
Accepted
time: 16ms
memory: 97416kb

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: 10
Accepted
time: 11ms
memory: 97548kb

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
Time Limit Exceeded

Dependency #2:

100%
Accepted

Test #30:

score: 9
Accepted
time: 15ms
memory: 97192kb

input:

1
1

output:

1

result:

ok single line: '1'

Test #31:

score: 9
Accepted
time: 7ms
memory: 97344kb

input:

5
1
1
1
1
1

output:

1
2
3
3
4

result:

ok 5 lines

Test #32:

score: 9
Accepted
time: 15ms
memory: 97284kb

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: 9
Accepted
time: 23ms
memory: 97384kb

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: 9
Accepted
time: 7ms
memory: 97448kb

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
Accepted
time: 12ms
memory: 97536kb

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:

ok 301 lines

Test #36:

score: 0
Time Limit Exceeded

input:

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


result:


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%