QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#403216#6103. A+B ProblemdXqwqAC ✓142ms76424kbC++231.9kb2024-05-01 22:19:282024-05-01 22:19:35

详细

Test #1:

score: 100
Accepted
time: 3ms
memory: 24204kb

input:

4
1
1
1

output:

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

result:

ok partial = 0

Test #2:

score: 0
Accepted
time: 7ms
memory: 22840kb

input:

11
1
1
3
4
4
3
1
8
8
10

output:

31
2 1 2 
4 1 3 5 7 
4 3 4 5 6 
2 4 5 
2 4 6 
2 3 7 
4 1 8 9 11 
2 8 9 
3 8 10 11 
2 10 11 
2 1 2 
3 1 2 5 
4 1 2 5 7 
4 1 2 7 9 
4 1 2 9 11 
1 2 
3 3 5 6 
4 3 5 6 7 
3 3 5 7 
2 4 5 
3 4 5 6 
3 4 5 6 
1 5 
1 6 
1 7 
2 8 9 
3 8 9 11 
3 8 9 11 
1 9 
2 10 11 
1 11 
1 11
11 12
12 13
2 13
13 14
14 15
7 1...

result:

ok partial = 0

Test #3:

score: 0
Accepted
time: 73ms
memory: 53760kb

input:

99998
1
1
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
1
94
95
96
97
98
99
100
101...

output:

200893
2 1 2 
3 1 3 93 
3 3 4 93 
3 4 5 93 
3 5 6 93 
3 6 7 93 
3 7 8 93 
3 8 9 93 
3 9 10 93 
3 10 11 93 
3 11 12 93 
3 12 13 93 
3 13 14 93 
3 14 15 93 
3 15 16 93 
3 16 17 93 
3 17 18 93 
3 18 19 93 
3 19 20 93 
3 20 21 93 
3 21 22 93 
3 22 23 93 
3 23 24 93 
3 24 25 93 
3 25 26 93 
3 26 27 93 
3...

result:

ok partial = 0

Test #4:

score: 0
Accepted
time: 79ms
memory: 60064kb

input:

99998
1
1
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
10...

output:

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

result:

ok partial = 0

Test #5:

score: 0
Accepted
time: 117ms
memory: 71192kb

input:

99998
1
2
3
3
5
6
6
8
9
10
11
11
11
14
15
15
17
17
19
20
21
21
23
23
25
25
27
27
29
30
31
32
33
34
35
35
37
38
39
40
40
42
42
44
45
46
47
48
48
50
50
52
53
54
55
55
57
58
58
60
61
62
63
64
65
65
67
68
69
70
70
72
73
74
75
76
76
78
79
80
80
82
82
84
85
85
87
87
89
90
91
91
93
93
93
96
96
98
98
100
10...

output:

318303
4 1 2 4 43354 
4 2 3 4 43354 
2 3 4 
4 3 5 7 43352 
4 5 6 7 43352 
2 6 7 
4 6 8 12 43352 
4 8 9 12 43352 
4 9 10 12 43352 
4 10 11 12 43352 
2 11 12 
2 11 13 
4 11 14 16 43352 
4 14 15 16 43351 
2 15 16 
4 15 17 18 43350 
2 17 18 
4 17 19 22 43349 
4 19 20 22 43348 
4 20 21 22 43347 
2 21 22 ...

result:

ok partial = 0

Test #6:

score: 0
Accepted
time: 101ms
memory: 69848kb

input:

99997
1
1
3
4
4
6
6
8
9
9
11
11
13
13
15
15
17
18
19
20
21
22
23
23
25
25
27
28
29
30
31
31
33
33
35
35
37
37
39
40
40
42
42
44
44
46
46
48
48
50
51
51
53
53
55
56
57
57
59
59
61
62
62
64
64
66
66
68
69
69
71
72
73
73
75
76
76
78
78
80
80
82
82
84
84
86
86
88
88
90
91
91
93
93
95
95
97
97
99
99
101
...

output:

300007
2 1 2 
4 1 3 5 95334 
4 3 4 5 95333 
2 4 5 
4 4 6 7 95333 
2 6 7 
4 6 8 10 95333 
4 8 9 10 95332 
2 9 10 
4 9 11 12 95332 
2 11 12 
4 11 13 14 95332 
2 13 14 
4 13 15 16 95332 
2 15 16 
4 15 17 24 95332 
4 17 18 24 95331 
4 18 19 24 95330 
4 19 20 24 95329 
4 20 21 24 95328 
4 21 22 24 95327 ...

result:

ok partial = 0

Test #7:

score: 0
Accepted
time: 142ms
memory: 75744kb

input:

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

399987
2 1 2 
2 1 3 
2 1 4 
2 1 5 
2 1 6 
2 1 7 
2 1 8 
2 1 9 
2 1 10 
2 1 11 
2 1 12 
2 1 13 
2 1 14 
2 1 15 
2 1 16 
2 1 17 
2 1 18 
2 1 19 
2 1 20 
2 1 21 
2 1 22 
2 1 23 
2 1 24 
2 1 25 
2 1 26 
2 1 27 
2 1 28 
2 1 29 
2 1 30 
2 1 31 
2 1 32 
2 1 33 
2 1 34 
2 1 35 
2 1 36 
2 1 37 
2 1 38 
2 1 3...

result:

ok partial = 0

Test #8:

score: 0
Accepted
time: 124ms
memory: 68688kb

input:

99998
1
1
3
1
5
6
6
8
9
10
10
12
13
13
15
15
17
18
13
20
21
22
23
23
25
26
27
28
29
30
30
28
25
34
35
36
37
38
39
40
41
42
43
40
45
39
47
48
49
39
51
51
53
54
55
54
54
51
59
38
61
62
37
64
64
66
66
68
69
70
70
72
73
74
74
74
68
66
79
80
81
82
83
81
80
86
87
64
89
90
91
92
92
90
95
89
97
98
98
100
10...

output:

281113
2 1 2 
3 1 3 4 
2 3 4 
4 1 5 7 99998 
4 5 6 7 99998 
2 6 7 
4 6 8 11 99998 
4 8 9 11 99998 
4 9 10 11 99998 
2 10 11 
4 10 12 14 99992 
4 12 13 14 99989 
2 13 14 
4 13 15 16 19 
2 15 16 
3 15 17 19 
3 17 18 19 
2 18 19 
4 13 20 24 99989 
4 20 21 24 99989 
4 21 22 24 99989 
4 22 23 24 99895 
2...

result:

ok partial = 0

Test #9:

score: 0
Accepted
time: 110ms
memory: 67780kb

input:

99998
1
1
3
4
3
6
6
6
3
10
11
12
13
12
12
10
10
18
19
20
21
22
22
22
20
26
27
28
27
30
30
32
33
30
35
36
36
36
39
36
41
41
43
35
35
46
47
48
49
47
51
47
53
46
55
35
57
35
59
59
61
30
63
27
65
65
65
68
68
65
65
72
72
27
75
26
77
78
79
80
78
82
83
78
77
86
77
88
89
88
77
92
92
94
94
96
26
26
99
99
26
...

output:

299483
2 1 2 
4 1 3 5 99993 
3 3 4 5 
2 4 5 
4 3 6 7 9 
2 6 7 
2 6 8 
2 6 9 
4 3 10 14 99993 
4 10 11 14 16 
4 11 12 14 16 
3 12 13 14 
2 13 14 
2 12 15 
2 12 16 
2 10 17 
4 10 18 23 99993 
4 18 19 23 99993 
4 19 20 23 99949 
4 20 21 23 25 
4 21 22 23 25 
2 22 23 
2 22 24 
2 22 25 
4 20 26 29 184 
4...

result:

ok partial = 0

Test #10:

score: 0
Accepted
time: 116ms
memory: 68368kb

input:

99999
1
1
3
3
5
6
6
5
9
10
11
12
13
13
12
16
16
11
19
20
20
19
23
23
10
26
27
27
29
30
31
32
33
33
32
36
36
31
39
40
40
39
43
43
30
46
47
48
48
47
51
51
46
54
55
55
54
58
58
29
61
62
63
64
64
63
67
67
62
70
71
71
70
74
74
61
77
78
79
79
81
78
83
83
77
86
87
87
86
90
90
27
93
94
95
96
97
98
99
100
10...

output:

299979
2 1 2 
4 1 3 4 99998 
2 3 4 
4 3 5 7 99998 
4 5 6 7 8 
2 6 7 
2 6 8 
4 5 9 14 99998 
4 9 10 14 99991 
4 10 11 14 25 
4 11 12 14 18 
4 12 13 14 15 
2 13 14 
2 13 15 
4 12 16 17 18 
2 16 17 
2 16 18 
4 11 19 21 25 
4 19 20 21 22 
2 20 21 
2 20 22 
4 19 23 24 25 
2 23 24 
2 23 25 
4 10 26 28 999...

result:

ok partial = 0

Test #11:

score: 0
Accepted
time: 124ms
memory: 74296kb

input:

99999
1
1
3
3
3
6
7
7
7
7
7
7
7
7
15
7
7
6
19
19
19
19
19
19
19
19
19
19
6
30
30
30
30
30
30
30
30
30
30
6
41
41
41
41
41
41
41
41
41
41
6
52
52
52
52
52
52
52
52
52
52
6
63
63
63
63
63
63
63
63
63
63
6
74
74
74
74
74
74
74
74
74
74
6
85
85
85
85
85
85
85
85
85
85
6
96
96
96
96
96
96
96
96
96
96
6
1...

output:

378399
2 1 2 
4 1 3 4 99998 
2 3 4 
2 3 5 
4 3 6 8 99991 
4 6 7 8 18 
2 7 8 
2 7 9 
2 7 10 
2 7 11 
2 7 12 
2 7 13 
2 7 14 
3 7 15 16 
2 15 16 
2 7 17 
2 7 18 
4 6 19 20 29 
2 19 20 
2 19 21 
2 19 22 
2 19 23 
2 19 24 
2 19 25 
2 19 26 
2 19 27 
2 19 28 
2 19 29 
4 6 30 31 40 
2 30 31 
2 30 32 
2 30...

result:

ok partial = 0

Test #12:

score: 0
Accepted
time: 132ms
memory: 76424kb

input:

99999
1
1
3
3
3
3
3
3
3
3
3
3
13
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
31
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
...

output:

396037
2 1 2 
4 1 3 4 99998 
2 3 4 
2 3 5 
2 3 6 
2 3 7 
2 3 8 
2 3 9 
2 3 10 
2 3 11 
2 3 12 
4 3 13 15 99908 
4 13 14 15 116 
2 14 15 
2 14 16 
2 14 17 
2 14 18 
2 14 19 
2 14 20 
2 14 21 
2 14 22 
2 14 23 
2 14 24 
2 14 25 
2 14 26 
2 14 27 
2 14 28 
2 14 29 
2 14 30 
3 14 31 32 
2 31 32 
2 14 33...

result:

ok partial = 0

Test #13:

score: 0
Accepted
time: 139ms
memory: 76148kb

input:

99999
1
1
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
36
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
134
3
3
3
3
3
3
3
3
3
3
3
3...

output:

397809
2 1 2 
4 1 3 4 99998 
2 3 4 
2 3 5 
2 3 6 
2 3 7 
2 3 8 
2 3 9 
2 3 10 
2 3 11 
2 3 12 
2 3 13 
2 3 14 
2 3 15 
2 3 16 
2 3 17 
2 3 18 
2 3 19 
2 3 20 
2 3 21 
2 3 22 
2 3 23 
2 3 24 
2 3 25 
2 3 26 
2 3 27 
2 3 28 
2 3 29 
2 3 30 
2 3 31 
2 3 32 
2 3 33 
2 3 34 
2 3 35 
3 3 36 37 
2 36 37 
2...

result:

ok partial = 0

Test #14:

score: 0
Accepted
time: 108ms
memory: 68504kb

input:

99998
1
2
3
4
5
6
7
7
9
10
11
12
11
14
14
16
17
18
16
20
16
10
10
10
6
26
27
28
29
30
30
32
30
34
28
27
26
38
5
40
41
42
43
44
45
46
47
47
49
50
49
47
53
54
54
56
57
58
53
60
61
62
63
53
65
66
46
68
69
70
71
72
73
74
74
68
77
46
79
80
81
82
83
82
85
81
87
88
89
88
79
92
93
94
95
95
97
98
95
93
101
1...

output:

286629
4 1 2 8 99996 
4 2 3 8 99953 
4 3 4 8 43101 
4 4 5 8 43100 
4 5 6 8 39 
4 6 7 8 25 
2 7 8 
4 7 9 13 25 
4 9 10 13 25 
4 10 11 13 22 
3 11 12 13 
2 12 13 
4 11 14 15 22 
2 14 15 
4 14 16 19 22 
3 16 17 19 
3 17 18 19 
2 18 19 
3 16 20 21 
2 20 21 
2 16 22 
2 10 23 
2 10 24 
2 10 25 
4 6 26 31 ...

result:

ok partial = 0

Test #15:

score: 0
Accepted
time: 95ms
memory: 65840kb

input:

99999
1
1
3
4
5
6
7
8
9
10
11
11
11
14
14
16
17
17
19
20
21
22
23
24
25
26
27
25
29
30
31
31
25
24
35
35
21
20
39
40
39
42
43
44
42
46
16
11
10
50
51
52
53
53
55
56
57
58
58
60
60
62
62
62
65
65
58
55
69
70
71
70
73
74
70
76
77
70
79
80
79
79
83
84
85
86
87
88
86
90
91
91
93
94
95
86
97
98
99
100
10...

output:

282149
2 1 2 
4 1 3 12 99998 
4 3 4 12 99998 
4 4 5 12 99998 
4 5 6 12 8588 
4 6 7 12 8588 
4 7 8 12 2043 
4 8 9 12 2034 
4 9 10 12 2034 
4 10 11 12 49 
2 11 12 
2 11 13 
4 11 14 15 48 
2 14 15 
4 14 16 18 48 
4 16 17 18 47 
2 17 18 
4 17 19 28 47 
4 19 20 28 47 
4 20 21 28 38 
4 21 22 28 37 
4 22 2...

result:

ok partial = 0

Test #16:

score: 0
Accepted
time: 98ms
memory: 68228kb

input:

100000
1
1
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
51
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
68
73
74
75
76
77
78
79
80
81
80
83
83
80
86
87
88
89
90
91
92
93
93
95
96
96
98
99
99
10...

output:

273541
2 1 2 
4 1 3 52 99999 
4 3 4 52 99999 
4 4 5 52 99999 
4 5 6 52 99999 
4 6 7 52 99999 
4 7 8 52 99999 
4 8 9 52 99999 
4 9 10 52 99999 
4 10 11 52 99999 
4 11 12 52 99999 
4 12 13 52 99999 
4 13 14 52 99999 
4 14 15 52 99999 
4 15 16 52 99999 
4 16 17 52 99999 
4 17 18 52 99999 
4 18 19 52 99...

result:

ok partial = 0

Test #17:

score: 0
Accepted
time: 121ms
memory: 68464kb

input:

99998
1
2
3
4
4
6
6
6
9
9
11
12
12
14
14
16
17
17
19
19
19
22
23
23
23
26
27
27
29
29
31
32
33
33
35
36
37
38
38
40
41
42
43
44
44
46
46
48
48
50
51
52
53
54
55
56
57
58
59
59
61
62
63
64
65
66
67
68
69
69
69
72
72
72
75
75
75
78
79
80
80
80
83
84
84
86
87
88
89
90
90
92
93
93
95
95
95
98
99
99
99
1...

output:

300741
4 1 2 5 6975 
4 2 3 5 6974 
4 3 4 5 6974 
2 4 5 
4 4 6 7 6973 
2 6 7 
2 6 8 
4 6 9 10 6973 
2 9 10 
4 9 11 13 6972 
4 11 12 13 6972 
2 12 13 
4 12 14 15 6971 
2 14 15 
4 14 16 18 6970 
4 16 17 18 6968 
2 17 18 
4 17 19 20 6968 
2 19 20 
2 19 21 
4 19 22 24 6967 
4 22 23 24 6967 
2 23 24 
2 23...

result:

ok partial = 0

Test #18:

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

input:

50313
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
10...

output:

101257
4 1 2 315 50084 
4 2 3 315 50084 
4 3 4 315 50084 
4 4 5 315 50084 
4 5 6 315 50084 
4 6 7 315 50084 
4 7 8 315 50084 
4 8 9 315 50084 
4 9 10 315 50084 
4 10 11 315 50084 
4 11 12 315 50084 
4 12 13 315 50084 
4 13 14 315 50084 
4 14 15 315 50084 
4 15 16 315 50084 
4 16 17 315 50084 
4 17 1...

result:

ok partial = 0

Test #19:

score: 0
Accepted
time: 112ms
memory: 69296kb

input:

99990
1
1
3
3
5
5
7
7
9
9
11
11
13
13
15
15
17
17
19
19
21
21
23
23
25
25
27
27
29
29
31
31
33
33
35
35
37
37
39
39
41
41
43
43
45
45
47
47
49
49
51
51
53
53
55
55
57
57
59
59
61
61
63
63
65
65
67
67
69
69
71
71
73
73
75
75
77
77
79
79
81
81
83
83
85
85
87
87
89
89
91
91
93
93
95
95
97
97
99
99
101
...

output:

299967
2 1 2 
4 1 3 4 99990 
2 3 4 
4 3 5 6 99990 
2 5 6 
4 5 7 8 99990 
2 7 8 
4 7 9 10 99990 
2 9 10 
4 9 11 12 99990 
2 11 12 
4 11 13 14 99990 
2 13 14 
4 13 15 16 99990 
2 15 16 
4 15 17 18 99990 
2 17 18 
4 17 19 20 99990 
2 19 20 
4 19 21 22 99990 
2 21 22 
4 21 23 24 99990 
2 23 24 
4 23 25 ...

result:

ok partial = 0

Test #20:

score: 0
Accepted
time: 71ms
memory: 52500kb

input:

70338
1
1
3
4
5
6
6
8
9
9
11
8
13
14
15
16
17
16
19
15
21
22
23
24
22
26
27
28
28
30
31
27
33
34
35
36
37
37
39
36
41
42
43
44
45
44
47
48
48
50
47
52
53
54
55
52
57
58
59
58
61
62
43
64
14
66
67
68
69
68
71
67
73
74
75
76
77
78
79
80
81
81
83
84
80
86
87
88
88
90
91
92
93
93
95
96
96
98
91
100
87
1...

output:

181357
2 1 2 
4 1 3 7 70338 
4 3 4 7 70336 
4 4 5 7 70336 
4 5 6 7 70333 
2 6 7 
4 6 8 10 70333 
4 8 9 10 12 
2 9 10 
3 9 11 12 
2 11 12 
4 8 13 18 70333 
4 13 14 18 70333 
4 14 15 18 65 
4 15 16 18 20 
3 16 17 18 
2 17 18 
3 16 19 20 
2 19 20 
4 15 21 25 65 
4 21 22 25 65 
3 22 23 25 
3 23 24 25 
2...

result:

ok partial = 0

Test #21:

score: 0
Accepted
time: 82ms
memory: 53704kb

input:

75063
1
2
3
4
5
6
7
8
8
10
6
12
5
14
14
16
17
18
18
20
21
22
21
24
24
26
20
28
29
29
31
32
33
31
35
28
37
17
39
40
39
42
43
43
45
46
47
48
46
50
51
52
53
45
55
55
57
42
59
60
59
62
63
64
63
66
67
67
69
69
71
72
73
73
75
76
71
78
62
80
81
82
82
84
85
86
86
88
81
90
91
92
92
94
91
96
97
97
99
100
96
1...

output:

200255
4 1 2 9 75059 
4 2 3 9 75059 
4 3 4 9 75059 
4 4 5 9 75059 
4 5 6 9 13 
4 6 7 9 11 
4 7 8 9 11 
2 8 9 
3 8 10 11 
2 10 11 
3 6 12 13 
2 12 13 
4 5 14 15 75059 
2 14 15 
4 14 16 19 75059 
4 16 17 19 75057 
4 17 18 19 38 
2 18 19 
4 18 20 23 38 
4 20 21 23 27 
3 21 22 23 
2 22 23 
4 21 24 25 27...

result:

ok partial = 0

Test #22:

score: 0
Accepted
time: 60ms
memory: 53500kb

input:

71756
1
2
1
4
5
5
7
8
9
10
11
12
13
14
15
16
17
18
19
17
21
13
23
24
25
26
27
27
29
24
31
32
32
34
12
36
11
38
39
40
40
42
43
43
45
46
38
48
49
50
51
51
53
54
55
56
55
58
59
60
61
62
59
64
65
58
67
68
53
70
71
72
73
74
73
76
76
78
71
80
81
82
83
82
85
80
87
88
89
90
91
89
93
93
95
96
97
98
98
100
10...

output:

187029
3 1 2 3 
2 2 3 
4 1 4 6 71756 
4 4 5 6 71754 
2 5 6 
4 5 7 20 71754 
4 7 8 20 886 
4 8 9 20 836 
4 9 10 20 836 
4 10 11 20 149 
4 11 12 20 37 
4 12 13 20 35 
4 13 14 20 22 
4 14 15 20 22 
4 15 16 20 22 
4 16 17 20 22 
3 17 18 20 
3 18 19 20 
2 19 20 
3 17 21 22 
2 21 22 
4 13 23 28 35 
4 23 2...

result:

ok partial = 0

Test #23:

score: 0
Accepted
time: 63ms
memory: 52216kb

input:

70450
1
2
3
4
5
6
7
8
8
10
11
12
13
14
13
16
17
18
18
20
20
22
23
24
25
17
27
28
28
30
31
32
33
32
35
36
37
38
39
40
41
42
42
44
44
46
39
48
37
50
50
52
53
54
54
56
57
58
59
58
61
62
63
63
65
61
67
68
69
69
71
72
73
74
72
76
77
78
79
80
81
81
83
84
80
86
77
88
89
90
68
92
92
94
95
95
97
98
99
99
101...

output:

181803
4 1 2 9 70446 
4 2 3 9 70446 
4 3 4 9 70446 
4 4 5 9 70444 
4 5 6 9 50294 
4 6 7 9 50294 
4 7 8 9 50294 
2 8 9 
4 8 10 15 50294 
4 10 11 15 47704 
4 11 12 15 6493 
4 12 13 15 1013 
3 13 14 15 
2 14 15 
4 13 16 19 1013 
4 16 17 19 1013 
4 17 18 19 26 
2 18 19 
4 18 20 21 26 
2 20 21 
3 20 22 2...

result:

ok partial = 0

Test #24:

score: 0
Accepted
time: 64ms
memory: 52232kb

input:

68358
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
38
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
58
60
61
62
63
64
64
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
91
93
94
95
96
97
98
99
100
10...

output:

173435
4 1 2 39 68354 
4 2 3 39 68354 
4 3 4 39 68354 
4 4 5 39 68354 
4 5 6 39 68354 
4 6 7 39 68354 
4 7 8 39 68354 
4 8 9 39 68354 
4 9 10 39 68354 
4 10 11 39 68354 
4 11 12 39 68354 
4 12 13 39 68354 
4 13 14 39 68354 
4 14 15 39 68354 
4 15 16 39 68354 
4 16 17 39 68354 
4 17 18 39 68354 
4 18...

result:

ok partial = 0

Test #25:

score: 0
Accepted
time: 95ms
memory: 59304kb

input:

98004
1
2
2
4
4
6
6
8
8
10
10
12
12
14
14
16
16
18
18
20
20
22
22
24
24
26
26
28
28
30
30
32
32
34
34
36
36
38
38
40
40
42
42
44
44
46
46
48
48
50
50
52
52
54
54
56
56
58
58
60
60
62
62
64
64
66
66
68
68
70
70
72
72
74
74
76
76
78
78
80
80
82
82
84
84
86
86
88
88
90
90
92
92
94
94
96
96
98
98
100
10...

output:

244011
4 1 2 3 98000 
2 2 3 
4 2 4 5 98000 
2 4 5 
4 4 6 7 98000 
2 6 7 
4 6 8 9 98000 
2 8 9 
4 8 10 11 98000 
2 10 11 
4 10 12 13 98000 
2 12 13 
4 12 14 15 98000 
2 14 15 
4 14 16 17 98000 
2 16 17 
4 16 18 19 98000 
2 18 19 
4 18 20 21 98000 
2 20 21 
4 20 22 23 98000 
2 22 23 
4 22 24 25 98000 ...

result:

ok partial = 0

Test #26:

score: 0
Accepted
time: 82ms
memory: 62408kb

input:

98003
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
10...

output:

244009
4 1 2 15371 88369 
4 2 3 15371 88369 
4 3 4 15371 88369 
4 4 5 15371 88369 
4 5 6 15371 88369 
4 6 7 15371 88369 
4 7 8 15371 88369 
4 8 9 15371 88369 
4 9 10 15371 88369 
4 10 11 15371 88369 
4 11 12 15371 88369 
4 12 13 15371 88369 
4 13 14 15371 88369 
4 14 15 15371 88369 
4 15 16 15371 88...

result:

ok partial = 0

Test #27:

score: 0
Accepted
time: 80ms
memory: 61508kb

input:

98003
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
10...

output:

244009
4 1 2 9939 82938 
4 2 3 9939 82938 
4 3 4 9939 82938 
4 4 5 9939 82938 
4 5 6 9939 82938 
4 6 7 9939 82938 
4 7 8 9939 82938 
4 8 9 9939 82938 
4 9 10 9939 82938 
4 10 11 9939 82938 
4 11 12 9939 82938 
4 12 13 9939 82938 
4 13 14 9939 82938 
4 14 15 9939 82938 
4 15 16 9939 82938 
4 16 17 99...

result:

ok partial = 0