QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#136947#6774. Ancient Machine 2hyforces92 53ms4292kbC++206.2kb2023-08-09 14:34:572023-08-09 14:34:58

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 92
Acceptable Answer

Test #1:

score: 92
Acceptable Answer
time: 45ms
memory: 4232kb

input:

1000
62
67
70
101
83
88
93
91
72
84
76
80
83
94
100
87
89
94
98
98
97
101
98
99
100
100
29
37
40
55
30
52
29
2
50
56
36
5
30
46
19
49
38
41
39
44
15
56
19
3
12
35
6
0
14
47
39
48
22
16
55
57
2
16
55
54
2
18
49
14
3
14
8
22
5
1
55
17
55
26
54
48
42
29
13
48
39
23
25
42
3
29
44
5
0
36
41
3
20
15
42
2
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #2:

score: 92
Acceptable Answer
time: 33ms
memory: 4172kb

input:

1000
62
67
72
77
82
80
96
98
71
75
79
94
83
100
97
101
89
98
97
93
96
96
100
99
99
100
28
6
33
55
8
3
40
39
21
4
38
50
16
41
28
4
27
25
31
4
54
11
0
49
8
16
6
22
17
27
21
54
2
41
24
22
17
58
22
44
22
32
45
14
21
2
45
49
31
25
13
36
1
26
54
37
21
34
12
16
43
43
14
48
3
14
45
22
8
2
46
35
50
59
16
6
1...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #3:

score: 92
Acceptable Answer
time: 45ms
memory: 4240kb

input:

1000
63
69
75
81
87
93
99
73
78
83
88
93
98
87
91
95
99
95
98
97
99
99
100
29
57
44
43
4
18
33
57
0
46
51
45
22
44
57
51
33
15
41
19
31
52
13
54
5
39
0
52
9
48
16
38
9
54
58
13
11
49
21
0
17
48
20
43
29
34
29
4
39
41
41
50
45
38
4
1
38
17
13
7
34
44
11
19
22
60
2
48
60
3
12
11
41
48
1
41
26
49
32
12...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #4:

score: 92
Acceptable Answer
time: 43ms
memory: 4188kb

input:

1000
52
99
73
78
83
83
83
77
93
87
82
87
92
97
86
90
94
98
94
97
100
98
99
100
101
30
13
22
27
1
16
27
11
40
32
36
45
57
58
7
3
32
29
7
43
35
44
36
1
5
45
23
0
36
53
40
2
42
24
2
24
25
52
50
21
17
16
18
50
41
39
27
46
14
50
40
24
2
15
48
52
32
18
14
2
48
13
3
10
53
29
36
55
12
47
16
41
21
28
30
53
2...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #5:

score: 92
Acceptable Answer
time: 47ms
memory: 4240kb

input:

1000
52
89
95
101
64
80
74
95
97
78
82
86
90
94
98
86
89
92
95
98
101
96
98
100
98
99
100
101
30
3
13
24
28
36
1
48
48
14
1
34
20
43
13
2
44
35
46
18
13
23
4
41
41
21
7
44
28
9
49
40
30
24
33
54
54
32
34
43
5
53
11
53
28
20
51
58
53
38
32
35
47
29
43
28
10
44
14
33
17
33
57
28
44
15
6
35
22
23
13
40...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #6:

score: 92
Acceptable Answer
time: 37ms
memory: 4192kb

input:

1000
63
69
75
81
87
93
99
73
78
83
88
93
98
87
91
95
99
95
98
97
99
99
100
30
30
45
48
49
49
22
56
52
50
52
19
16
47
35
26
16
10
0
10
24
14
11
25
46
3
38
26
1
32
55
24
43
28
26
35
29
13
23
51
6
40
31
19
33
46
18
20
58
36
21
23
56
28
10
55
41
11
14
21
6
22
56
43
45
29
13
14
51
0
59
30
3
31
37
50
7
16...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #7:

score: 92
Acceptable Answer
time: 40ms
memory: 4240kb

input:

1000
62
89
95
101
64
80
74
90
84
100
94
83
87
91
95
99
90
101
94
100
100
99
98
101
100
28
33
53
7
41
37
21
13
27
25
9
37
16
56
7
35
35
7
54
11
7
10
29
39
10
2
21
30
54
42
39
32
45
16
25
20
49
15
14
7
53
29
57
24
39
19
10
55
19
39
13
27
58
43
21
47
26
8
12
36
18
51
0
37
38
44
32
17
51
56
26
28
2
34
5...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #8:

score: 92
Acceptable Answer
time: 42ms
memory: 4192kb

input:

1000
52
89
95
101
64
80
74
90
84
100
94
83
87
91
95
99
90
101
94
100
100
99
98
101
100
29
37
41
37
9
29
33
22
13
52
32
6
0
15
33
45
3
57
22
26
56
28
36
50
54
47
31
22
3
50
24
53
15
26
54
50
36
15
23
14
24
1
30
8
5
9
11
42
36
53
26
27
22
19
48
53
41
25
13
2
34
34
38
38
59
59
58
53
50
3
12
13
19
36
24...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #9:

score: 92
Acceptable Answer
time: 48ms
memory: 4176kb

input:

1000
63
69
75
81
87
93
99
73
78
83
88
93
98
87
91
95
99
95
98
97
99
99
100
27
16
19
27
28
17
1
53
57
27
24
49
25
16
23
57
9
54
3
53
49
56
47
30
25
15
19
51
51
0
37
30
15
44
58
6
39
23
6
7
39
36
36
3
47
41
7
50
51
34
23
12
18
52
47
6
13
50
11
53
39
20
49
48
5
33
27
46
1
37
35
2
36
18
45
55
55
3
57
25...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #10:

score: 92
Acceptable Answer
time: 43ms
memory: 4236kb

input:

1000
62
67
72
77
82
87
92
97
70
74
78
82
86
90
94
98
86
89
92
95
98
101
96
98
100
98
99
100
101
28
51
6
55
18
33
11
43
30
25
36
38
11
50
31
3
50
16
39
39
30
49
18
16
34
43
28
55
31
34
20
33
17
14
49
13
4
21
49
18
54
8
39
54
55
58
45
29
1
35
19
36
27
47
26
56
42
0
12
27
0
52
22
42
35
0
0
58
0
53
48
1...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #11:

score: 92
Acceptable Answer
time: 46ms
memory: 4180kb

input:

1000
63
69
75
81
87
93
99
73
78
83
88
93
98
87
91
95
99
95
98
97
99
99
100
28
48
31
33
2
39
23
34
24
3
41
47
58
11
32
53
47
53
8
38
13
29
11
21
23
2
41
10
44
14
9
42
20
6
9
44
12
15
19
40
24
50
40
31
18
43
51
15
19
28
26
27
48
38
51
14
43
0
12
46
0
4
42
58
28
0
0
42
0
51
14
15
12
60
16
35
21
0
45
8
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #12:

score: 92
Acceptable Answer
time: 35ms
memory: 4188kb

input:

1000
62
67
56
61
82
87
92
97
70
72
77
82
86
90
94
98
86
89
92
95
98
101
96
98
100
98
99
100
100
32
45
57
16
4
8
27
28
8
49
13
8
41
34
0
58
14
22
32
54
9
57
56
56
24
17
50
10
58
18
33
50
45
48
21
39
18
25
34
4
21
37
52
49
45
38
42
30
39
49
42
16
5
5
9
5
2
53
16
54
50
20
52
58
60
44
48
40
12
18
35
35
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #13:

score: 92
Acceptable Answer
time: 30ms
memory: 4236kb

input:

1000
63
53
78
80
86
92
74
71
76
81
78
94
95
86
88
92
96
100
95
100
97
99
99
100
46
19
57
50
6
0
49
15
14
19
56
7
32
32
30
32
55
15
14
57
6
34
51
53
1
41
2
19
48
58
50
22
54
50
43
28
40
34
45
24
51
0
20
23
52
25
30
4
10
23
57
54
17
26
5
9
50
55
30
52
36
54
45
11
26
0
11
19
49
41
5
43
40
33
5
47
36
55...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #14:

score: 92
Acceptable Answer
time: 36ms
memory: 4236kb

input:

1000
62
67
72
61
78
87
88
97
70
74
78
80
86
90
94
98
86
101
93
96
99
94
96
98
100
98
99
100
101
39
30
32
17
8
7
4
49
58
35
14
33
24
53
48
31
40
37
20
39
39
51
2
2
54
4
46
47
21
28
33
22
2
49
38
25
25
34
35
5
48
19
35
46
18
37
53
56
56
4
43
56
42
40
40
31
0
15
23
41
60
35
9
53
33
22
42
56
55
12
54
19...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #15:

score: 92
Acceptable Answer
time: 29ms
memory: 4180kb

input:

1000
63
69
75
81
87
93
99
73
78
83
88
83
97
86
90
94
100
94
97
100
99
99
100
39
57
31
37
24
20
28
54
43
9
56
3
13
48
14
25
13
15
41
49
18
9
29
14
15
8
36
40
32
3
56
10
21
26
19
13
4
30
26
20
37
7
58
35
14
8
17
38
49
39
29
54
46
13
8
51
29
3
23
18
60
24
16
2
24
13
33
30
53
23
18
40
0
9
34
42
20
1
22
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #16:

score: 92
Acceptable Answer
time: 39ms
memory: 4240kb

input:

1000
52
89
95
101
64
80
74
90
84
100
94
83
87
91
95
99
90
101
94
100
100
99
98
101
100
28
7
13
35
56
28
15
16
25
4
46
24
43
53
48
18
49
25
24
34
33
31
45
19
48
4
56
18
43
16
41
3
55
11
40
14
28
26
25
35
34
10
41
11
6
16
35
13
55
34
43
44
31
3
24
46
52
31
12
8
0
57
33
16
17
0
0
41
0
35
14
13
52
23
15...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #17:

score: 92
Acceptable Answer
time: 40ms
memory: 4188kb

input:

1000
84
90
96
59
75
69
85
79
95
89
78
82
86
90
94
98
89
100
93
99
99
98
100
99
99
101
28
33
24
53
23
44
19
2
29
24
31
2
26
8
15
38
48
44
23
43
10
47
43
18
9
41
13
47
32
32
47
13
41
9
18
43
47
10
43
23
44
48
38
15
8
26
2
31
24
29
2
19
44
23
53
24
33
28
12
4
0
60
31
23
46
0
0
59
0
8
48
14
36
51
26
21
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #18:

score: 92
Acceptable Answer
time: 40ms
memory: 4256kb

input:

1000
52
89
79
101
91
70
94
80
96
90
79
81
87
91
93
100
90
101
101
95
100
99
98
101
100
17
13
52
7
11
46
48
58
56
36
3
4
37
35
17
26
27
32
3
52
55
48
55
18
58
1
9
54
49
0
55
37
7
45
20
14
15
17
52
14
51
21
21
53
51
45
56
56
53
46
41
11
31
44
40
0
38
25
1
46
49
26
33
14
13
57
30
27
16
6
23
60
34
28
47...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #19:

score: 92
Acceptable Answer
time: 51ms
memory: 4192kb

input:

1000
84
90
96
59
75
69
84
79
95
85
78
82
86
90
94
98
100
92
93
99
99
98
100
99
99
101
31
32
38
48
41
3
4
57
11
53
57
57
33
54
18
46
7
12
36
13
50
39
54
51
8
39
14
7
30
55
12
3
41
51
52
49
35
40
9
3
27
32
3
46
54
16
16
30
41
30
14
39
42
7
21
11
44
46
15
29
2
9
20
58
19
56
58
4
42
36
25
10
8
13
44
7
7...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #20:

score: 92
Acceptable Answer
time: 42ms
memory: 4240kb

input:

1000
52
89
95
101
64
80
74
90
84
100
94
83
87
91
95
99
90
101
94
100
100
99
98
101
100
30
9
3
1
25
52
33
30
27
40
45
18
54
42
55
52
31
51
20
47
41
46
20
58
1
27
25
30
27
33
18
13
33
28
7
2
45
15
36
37
7
11
21
3
14
51
30
15
40
51
21
19
55
48
22
18
37
41
14
23
1
54
33
13
6
40
17
47
57
17
1
60
27
57
58...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #21:

score: 92
Acceptable Answer
time: 48ms
memory: 4256kb

input:

1000
84
90
96
59
75
67
81
79
95
89
78
82
86
90
94
98
89
93
95
95
101
96
98
100
99
101
35
21
57
23
31
28
55
13
23
49
41
41
55
47
21
33
50
46
9
27
47
27
57
56
8
5
33
18
3
37
43
53
33
2
14
31
9
33
25
54
40
1
8
45
56
55
42
18
18
44
11
4
11
5
3
18
46
34
19
5
49
58
0
34
10
57
3
37
37
31
2
57
50
47
20
7
36...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #22:

score: 92
Acceptable Answer
time: 32ms
memory: 4196kb

input:

1000
62
67
72
77
82
87
92
97
70
74
78
97
87
91
95
99
87
98
94
97
100
95
97
99
101
99
100
101
37
24
38
22
17
37
7
26
23
0
23
24
1
12
29
24
41
57
13
34
55
2
19
29
29
58
55
17
19
28
13
48
21
20
20
11
17
8
21
36
18
50
4
49
56
6
45
33
35
50
32
45
7
46
2
24
25
42
21
24
55
9
50
35
30
29
3
46
18
53
44
33
23...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #23:

score: 92
Acceptable Answer
time: 44ms
memory: 4236kb

input:

1000
63
69
76
81
87
93
99
73
78
83
88
81
98
86
90
94
98
94
95
97
97
99
99
100
33
57
57
49
41
7
3
13
30
49
6
10
16
15
1
56
35
15
45
19
58
18
28
10
23
46
5
13
0
9
49
45
36
43
27
44
50
32
10
7
12
53
0
7
33
58
50
49
28
16
30
58
52
26
30
49
30
11
17
40
32
27
32
34
41
4
56
56
57
16
53
35
58
14
56
42
33
53...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #24:

score: 92
Acceptable Answer
time: 43ms
memory: 4292kb

input:

1000
62
67
72
77
82
86
92
97
70
74
78
82
86
90
94
98
94
90
93
96
99
94
96
96
100
98
99
100
101
22
3
46
2
24
3
46
56
28
15
33
33
41
52
1
47
33
52
19
24
15
24
53
17
11
49
48
22
15
22
43
4
3
25
48
13
52
50
34
4
44
33
20
12
27
53
1
20
11
6
20
16
26
50
2
17
15
18
6
56
28
24
5
43
58
38
26
42
23
26
32
54
2...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #25:

score: 92
Acceptable Answer
time: 39ms
memory: 4172kb

input:

1000
63
69
75
81
88
93
99
73
78
83
96
93
98
87
93
95
99
95
98
97
99
99
100
25
35
27
10
36
32
33
4
10
26
55
36
8
7
45
20
24
57
42
24
41
41
38
18
0
49
2
2
8
45
43
50
43
44
3
54
12
14
1
54
35
21
9
7
31
38
54
40
33
13
55
26
9
51
52
18
45
48
9
42
44
53
26
55
49
37
17
5
26
41
42
57
11
25
46
37
31
48
6
50
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #26:

score: 92
Acceptable Answer
time: 36ms
memory: 4188kb

input:

1000
64
62
65
78
68
88
68
74
99
95
87
81
98
86
99
92
92
96
93
97
96
99
100
100
101
35
10
35
37
9
3
14
3
58
52
18
21
15
57
48
34
28
2
24
9
39
43
41
44
58
30
12
44
10
10
21
19
36
55
38
45
46
47
33
27
38
51
37
5
2
6
7
33
44
13
3
35
19
0
24
43
0
11
19
25
57
30
47
16
9
45
44
36
48
50
43
29
13
27
50
32
2
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #27:

score: 92
Acceptable Answer
time: 36ms
memory: 4188kb

input:

1000
66
77
80
79
85
92
95
75
84
76
82
94
84
88
100
100
100
93
99
98
97
97
101
100
101
10
58
20
14
21
52
30
1
42
0
29
37
27
0
47
36
50
44
5
52
43
38
19
35
41
38
42
30
28
35
1
33
45
39
4
25
56
2
51
50
35
33
56
23
14
37
51
16
11
27
30
6
37
16
38
16
15
10
55
23
43
0
13
2
52
30
3
16
23
3
44
57
49
22
26
1...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #28:

score: 92
Acceptable Answer
time: 27ms
memory: 4192kb

input:

1000
87
53
81
97
88
68
69
94
100
78
82
80
101
93
86
100
90
93
92
95
97
98
100
99
100
101
19
29
25
28
22
17
8
1
30
2
29
55
54
38
11
41
29
48
22
11
27
18
28
41
38
35
55
56
19
12
24
28
43
44
4
37
48
15
8
32
44
4
8
19
34
28
6
38
21
48
51
40
8
31
44
53
33
3
3
27
18
28
49
22
34
25
16
35
4
43
10
49
12
1
30...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #29:

score: 92
Acceptable Answer
time: 34ms
memory: 4176kb

input:

1000
78
83
66
64
99
74
87
86
96
88
95
83
86
88
87
87
100
99
99
95
100
100
98
99
99
101
30
8
33
16
7
28
50
58
6
3
6
38
28
50
22
42
15
5
7
9
36
43
33
0
1
26
54
51
9
53
52
37
45
53
30
40
30
50
44
49
6
26
0
46
56
22
44
25
2
18
43
41
13
12
43
9
55
45
14
6
29
57
21
8
39
34
45
46
49
13
47
43
59
21
5
7
38
1...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #30:

score: 92
Acceptable Answer
time: 35ms
memory: 4176kb

input:

1000
99
76
67
95
87
89
90
98
89
83
84
89
93
93
100
89
89
92
99
94
96
98
97
99
99
101
42
19
4
28
4
21
3
18
35
58
23
46
6
38
8
33
16
14
55
10
22
48
25
17
36
13
3
1
2
47
0
26
44
28
33
31
22
50
36
12
57
0
29
53
37
9
31
11
11
2
44
53
2
55
5
57
25
8
26
45
33
56
25
25
50
2
33
20
57
45
4
47
16
12
58
6
4
39
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #31:

score: 92
Acceptable Answer
time: 38ms
memory: 4292kb

input:

1000
62
67
72
90
67
81
94
71
72
76
80
77
88
92
97
86
97
93
96
100
96
99
98
99
100
101
19
44
17
14
49
21
4
27
0
23
24
18
28
24
27
46
28
26
52
27
2
50
40
38
36
18
51
1
1
42
55
29
4
29
16
25
25
49
9
40
16
21
15
7
46
9
51
43
20
5
42
43
57
32
8
6
23
3
3
39
9
14
51
41
49
32
35
14
60
46
11
39
56
21
35
28
3...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #32:

score: 92
Acceptable Answer
time: 25ms
memory: 4236kb

input:

1000
58
67
72
70
83
89
66
99
72
76
80
84
88
92
96
100
89
93
97
93
96
100
101
99
100
101
45
9
57
20
6
46
20
13
7
28
48
42
2
43
38
8
19
53
34
27
26
1
29
21
47
22
9
38
27
20
16
47
54
52
46
28
31
24
18
47
36
12
27
22
49
31
51
3
2
50
42
3
25
0
19
8
31
4
27
18
33
38
30
3
3
38
56
57
38
40
26
44
57
38
2
37
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #33:

score: 92
Acceptable Answer
time: 39ms
memory: 4240kb

input:

1000
63
69
75
88
86
91
96
101
74
79
83
87
91
95
99
87
90
93
96
99
94
96
98
100
98
99
100
101
10
45
19
32
32
6
42
4
9
50
9
33
54
21
58
55
10
49
19
16
20
53
55
43
34
52
40
2
42
11
12
43
46
23
25
0
38
30
15
30
3
16
57
48
6
11
32
24
19
31
34
37
18
23
23
34
40
2
55
33
21
5
52
48
49
10
16
18
0
23
5
15
11
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #34:

score: 92
Acceptable Answer
time: 33ms
memory: 4240kb

input:

1000
71
69
75
81
87
93
99
73
78
83
87
91
95
99
87
90
93
96
99
94
96
98
100
98
99
100
101
4
54
11
53
48
34
51
5
50
57
2
19
4
12
35
35
12
21
44
32
14
23
49
31
54
8
14
46
54
54
18
28
43
41
57
41
9
8
1
48
53
10
34
43
17
52
57
51
49
8
6
36
45
36
21
58
16
4
49
53
32
34
38
38
41
1
41
9
33
8
41
47
2
48
19
5...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #35:

score: 92
Acceptable Answer
time: 48ms
memory: 4260kb

input:

1000
71
69
76
80
85
90
80
69
74
79
84
89
94
84
86
89
92
95
98
101
96
98
100
98
100
100
33
2
31
0
55
0
31
33
35
11
41
26
23
2
45
53
39
39
21
22
18
8
27
20
22
39
10
11
33
20
15
43
15
40
43
23
44
52
31
45
43
32
38
3
8
51
11
9
53
53
2
31
30
37
48
8
22
0
15
45
7
34
57
35
60
48
48
41
57
29
57
27
38
53
3
5...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #36:

score: 92
Acceptable Answer
time: 51ms
memory: 4256kb

input:

1000
95
69
75
81
87
93
99
73
78
83
88
93
98
87
91
95
98
101
96
97
97
99
99
100
48
29
40
35
8
7
11
26
31
6
36
53
53
0
54
23
18
44
44
35
12
31
29
47
8
25
6
16
3
48
54
31
48
50
29
47
4
57
39
32
17
15
4
52
5
22
43
40
7
25
17
40
48
16
12
7
56
0
36
38
36
24
0
38
37
46
26
1
27
3
46
12
4
14
51
41
28
27
24
5...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #37:

score: 92
Acceptable Answer
time: 28ms
memory: 4232kb

input:

1000
62
67
72
77
82
87
92
97
70
74
78
82
86
90
94
98
86
89
92
95
98
101
96
98
100
98
99
100
101
34
13
30
44
6
44
24
6
27
57
39
6
8
30
26
30
25
8
16
9
39
8
16
43
5
40
7
40
2
10
18
2
9
45
21
55
49
43
11
47
45
37
31
33
53
56
24
20
56
39
18
54
53
23
45
14
50
57
14
43
12
34
25
31
21
8
9
10
34
4
12
37
0
1...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #38:

score: 92
Acceptable Answer
time: 48ms
memory: 4240kb

input:

1000
58
62
58
81
64
87
80
93
82
91
79
92
92
95
94
100
89
90
92
100
96
99
98
101
100
28
14
5
5
3
27
36
41
4
1
0
58
54
57
11
16
42
11
8
50
30
14
9
19
28
35
30
45
55
18
15
20
19
16
7
22
25
0
23
1
44
58
7
53
2
15
3
16
47
37
48
20
27
18
24
11
56
20
12
44
57
53
16
10
23
5
33
3
0
32
24
11
42
27
40
53
58
27...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #39:

score: 92
Acceptable Answer
time: 51ms
memory: 4176kb

input:

1000
95
81
91
86
88
75
78
94
79
76
79
81
95
96
90
100
97
99
101
98
99
99
99
99
100
28
5
2
52
47
44
6
58
12
11
17
33
23
3
51
45
23
20
4
9
25
45
19
28
19
40
4
47
1
4
10
11
21
11
58
57
56
32
23
6
50
0
10
24
46
8
48
36
54
16
28
34
48
2
11
26
25
47
12
0
32
34
14
28
58
26
54
44
57
41
31
14
41
31
9
43
43
5...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #40:

score: 92
Acceptable Answer
time: 34ms
memory: 4236kb

input:

1000
50
54
58
87
83
85
85
80
77
100
88
79
90
90
92
100
90
93
96
95
96
96
97
101
100
100
28
53
23
22
0
53
33
5
53
41
48
34
44
32
15
47
1
17
42
44
38
17
42
43
37
47
46
39
57
20
13
7
43
16
42
57
41
47
38
26
37
18
48
55
36
58
24
48
4
20
23
14
28
44
49
10
9
2
12
7
11
35
30
30
4
16
38
46
16
12
1
33
23
41
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #41:

score: 92
Acceptable Answer
time: 39ms
memory: 4240kb

input:

1000
69
99
56
90
69
70
90
85
92
80
99
87
82
89
99
91
93
94
100
97
98
99
100
100
100
28
41
4
37
25
48
34
11
11
9
55
39
45
18
48
4
6
20
28
58
31
36
26
35
54
32
39
55
10
20
15
41
37
25
37
13
41
56
58
9
43
40
11
9
21
36
31
7
37
13
55
20
49
40
57
20
28
4
12
36
34
30
43
46
5
43
40
36
54
31
49
11
11
33
59
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #42:

score: 92
Acceptable Answer
time: 38ms
memory: 4172kb

input:

1000
50
76
64
75
63
82
85
68
98
83
98
94
95
91
93
88
91
92
93
100
97
98
100
98
101
101
28
42
52
2
55
0
41
28
37
21
49
35
55
7
22
17
8
31
6
38
29
58
24
26
50
12
21
23
6
37
34
8
19
6
13
48
0
57
15
28
9
15
17
40
17
43
58
35
12
51
58
16
27
52
28
40
44
53
12
32
33
60
51
44
46
22
28
44
46
8
24
24
38
18
58...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #43:

score: 92
Acceptable Answer
time: 47ms
memory: 4288kb

input:

1000
56
62
66
67
68
83
75
75
95
78
79
82
81
84
91
92
100
90
92
97
101
96
98
99
99
100
100
28
12
4
34
46
6
7
27
4
52
12
7
13
57
26
12
27
48
15
4
18
14
5
53
26
30
41
6
58
49
24
19
57
27
29
29
16
24
55
5
37
9
25
27
15
55
18
51
51
16
57
2
20
47
18
37
36
37
12
10
51
52
54
33
0
44
10
35
3
42
48
0
15
59
57...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #44:

score: 92
Acceptable Answer
time: 41ms
memory: 4256kb

input:

1000
69
67
80
79
98
88
86
86
86
77
79
90
94
96
93
88
99
99
99
96
99
97
98
100
100
28
4
56
21
1
14
57
50
4
3
29
51
31
7
44
48
4
13
10
47
41
14
21
19
17
9
22
57
22
23
45
20
21
21
31
32
17
37
48
1
15
41
31
32
28
32
24
28
33
19
3
27
14
53
21
36
48
0
12
42
41
28
47
12
31
59
4
54
34
45
38
21
3
57
4
20
33
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #45:

score: 92
Acceptable Answer
time: 32ms
memory: 4240kb

input:

1000
100
61
85
76
78
65
79
97
79
100
79
82
90
95
89
90
92
93
93
96
99
99
101
101
101
24
30
17
58
17
50
30
12
35
17
51
48
53
43
22
19
24
42
7
31
54
56
57
24
19
47
37
38
55
36
37
29
27
3
39
20
17
18
8
55
32
53
12
54
46
54
29
43
47
4
40
17
13
2
27
10
52
37
8
51
11
37
55
51
45
16
55
6
9
27
47
24
23
28
1...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #46:

score: 92
Acceptable Answer
time: 39ms
memory: 4236kb

input:

1000
57
71
87
74
78
76
87
73
98
88
91
95
94
95
92
89
99
91
94
94
98
98
100
101
101
48
28
12
43
34
14
54
13
53
24
37
22
36
33
14
40
43
29
24
24
35
17
4
32
30
11
14
43
20
54
12
21
19
14
5
23
57
35
8
0
36
1
31
27
43
8
27
33
25
33
46
13
42
15
2
35
34
52
34
53
26
21
0
9
17
41
18
8
37
23
51
36
16
0
7
59
4...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #47:

score: 92
Acceptable Answer
time: 42ms
memory: 4248kb

input:

1000
100
75
56
94
85
92
91
77
95
90
84
100
93
98
86
100
98
95
96
95
96
98
101
99
99
101
51
49
36
15
22
20
1
16
10
37
47
37
56
23
35
21
44
50
22
57
1
12
12
2
21
26
5
32
46
30
23
17
27
32
50
41
5
37
51
41
4
35
6
13
14
8
42
28
30
33
4
3
37
34
34
13
19
11
35
55
36
55
25
9
2
33
50
10
37
50
60
16
19
22
22...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #48:

score: 92
Acceptable Answer
time: 32ms
memory: 4292kb

input:

1000
55
55
56
61
65
73
66
70
86
98
77
81
96
101
90
97
88
97
94
99
101
99
101
99
99
100
47
42
24
2
31
18
14
58
31
42
23
7
45
10
19
31
24
3
40
1
13
29
24
28
56
35
49
18
10
53
34
6
16
48
27
19
31
15
20
8
4
18
4
32
7
47
15
48
13
27
52
10
41
42
26
4
48
35
31
22
59
12
31
22
0
40
26
32
48
8
22
18
12
8
41
1...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #49:

score: 92
Acceptable Answer
time: 41ms
memory: 4236kb

input:

1000
67
60
67
82
64
75
84
78
78
83
79
85
81
83
94
86
95
90
93
97
96
97
98
99
101
100
29
46
13
33
53
2
23
25
27
4
36
49
40
45
38
54
4
30
17
35
4
35
16
34
21
27
37
51
50
4
52
17
33
6
17
36
12
41
45
39
1
22
58
5
39
46
38
8
14
29
8
57
55
8
49
2
26
1
13
6
60
36
3
59
14
2
3
6
12
24
8
8
16
53
28
59
36
22
3...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #50:

score: 92
Acceptable Answer
time: 34ms
memory: 4236kb

input:

1000
79
81
59
99
65
75
96
85
92
99
80
87
83
86
92
87
91
90
94
96
95
96
99
101
99
99
101
34
44
32
6
41
22
42
32
15
2
35
39
35
49
31
46
50
18
43
38
35
12
50
5
19
19
46
23
45
57
46
55
14
3
13
31
7
51
41
24
33
5
53
52
49
55
9
26
45
7
55
33
35
30
30
51
5
53
18
21
20
23
40
26
3
57
10
50
12
37
10
12
21
3
2...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #51:

score: 92
Acceptable Answer
time: 29ms
memory: 4236kb

input:

1000
75
65
61
60
75
73
90
79
73
74
78
84
87
87
88
89
95
95
94
96
99
96
99
101
101
100
18
51
37
55
17
3
51
49
43
48
55
34
12
46
4
48
6
5
34
46
6
34
32
8
10
22
12
51
3
21
47
6
14
15
55
27
35
55
55
47
36
31
15
16
57
45
42
42
7
42
58
55
58
36
9
9
19
24
2
35
2
26
58
10
22
23
8
26
1
53
37
53
49
58
30
33
4...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #52:

score: 92
Acceptable Answer
time: 47ms
memory: 4240kb

input:

1000
56
82
71
70
81
97
76
91
71
86
82
84
82
84
90
96
96
99
93
97
96
97
100
98
100
101
20
0
53
39
14
48
51
48
51
58
21
48
29
7
15
22
15
28
5
8
58
16
20
55
9
51
17
33
37
7
58
6
46
36
36
43
25
23
36
44
43
25
38
31
31
34
28
58
15
47
37
15
17
2
20
37
31
18
4
59
18
1
2
50
26
15
57
35
33
22
28
21
60
50
39
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #53:

score: 92
Acceptable Answer
time: 41ms
memory: 4288kb

input:

1000
67
91
73
59
84
84
72
69
80
77
78
96
82
87
89
87
90
101
92
98
99
96
98
98
100
100
50
40
8
43
57
5
45
22
22
12
30
4
23
37
33
47
41
57
48
22
17
36
47
31
1
8
10
50
42
36
48
19
54
12
57
10
8
28
16
52
6
35
2
12
53
46
13
29
10
26
40
8
57
46
24
38
13
14
34
17
1
6
30
16
2
27
26
33
37
12
57
45
44
58
13
2...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #54:

score: 92
Acceptable Answer
time: 45ms
memory: 4120kb

input:

1000
57
79
99
88
87
99
70
84
75
77
78
87
87
94
86
95
95
93
96
97
99
97
99
99
99
101
22
18
10
14
15
50
17
49
0
53
36
10
54
50
45
51
14
17
58
19
51
56
34
14
3
55
55
42
56
54
47
33
25
23
52
57
48
29
39
13
42
21
33
46
1
9
0
3
33
44
38
32
38
7
46
36
10
51
6
13
31
43
16
59
7
18
54
44
50
6
52
41
0
49
26
54...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #55:

score: 92
Acceptable Answer
time: 24ms
memory: 4116kb

input:

1000
90
89
60
80
63
79
71
89
97
74
78
86
89
86
91
94
93
90
98
101
95
97
98
99
99
101
0
37
58
5
21
38
5
16
22
44
20
13
21
44
57
2
54
9
20
20
9
48
7
53
48
39
9
7
46
57
27
3
43
30
58
35
41
47
31
4
16
54
25
9
39
42
51
23
10
34
38
33
45
15
5
50
27
37
43
16
55
6
19
33
16
21
15
0
59
23
9
44
26
11
7
29
26
4...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #56:

score: 92
Acceptable Answer
time: 36ms
memory: 4236kb

input:

1000
88
68
59
73
64
92
85
78
81
90
88
80
91
94
89
87
97
96
93
95
96
98
98
100
100
100
22
51
3
9
22
52
42
42
58
0
0
40
54
28
40
42
51
2
15
17
33
33
30
19
54
35
9
9
51
49
10
14
50
33
8
2
56
11
13
56
31
31
38
8
44
16
47
25
23
47
43
16
7
5
28
43
6
22
6
10
39
13
59
3
7
18
16
32
24
34
23
36
38
11
27
6
14
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #57:

score: 92
Acceptable Answer
time: 41ms
memory: 4192kb

input:

1000
62
67
56
74
64
85
92
97
86
75
79
83
87
91
95
99
87
98
94
95
99
95
97
99
100
99
100
101
55
47
3
40
18
52
55
44
56
6
36
44
6
41
13
37
22
20
7
30
20
2
7
32
23
31
22
33
20
35
18
24
20
39
41
7
2
8
24
30
14
32
42
48
52
56
42
48
18
4
41
26
1
53
51
26
1
12
25
39
47
15
13
13
48
12
13
1
17
1
14
27
57
3
5...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #58:

score: 92
Acceptable Answer
time: 44ms
memory: 4292kb

input:

1000
94
63
69
74
83
63
93
97
85
76
76
84
83
91
94
100
96
89
93
97
99
96
98
100
98
100
101
2
53
44
34
28
19
29
18
31
50
18
27
55
57
54
14
7
43
35
46
30
38
14
47
37
18
20
8
54
18
30
27
31
9
3
28
12
1
5
11
52
35
48
35
1
10
32
11
26
55
58
38
23
48
39
32
47
5
41
32
0
19
21
13
33
11
32
9
6
53
45
8
44
0
22...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #59:

score: 92
Acceptable Answer
time: 33ms
memory: 4240kb

input:

1000
62
67
72
77
78
87
92
97
70
74
78
80
86
90
94
98
86
89
92
95
98
101
96
98
100
98
99
100
101
40
28
8
34
56
5
24
6
13
10
27
13
35
56
32
40
26
6
7
5
21
8
3
44
36
25
13
37
17
45
42
27
25
24
15
13
40
4
15
38
17
56
35
48
12
32
2
2
26
48
53
19
51
51
8
19
15
0
8
33
55
45
2
53
7
30
48
16
19
39
33
3
31
48...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #60:

score: 92
Acceptable Answer
time: 53ms
memory: 4236kb

input:

1000
63
69
59
80
70
91
97
71
96
89
94
91
96
85
89
93
97
94
96
99
98
100
100
57
39
28
1
46
18
58
46
9
33
8
11
22
25
0
16
28
35
7
51
1
51
41
19
49
50
40
27
57
40
51
24
46
41
48
52
16
25
8
52
20
26
11
43
17
54
9
35
20
48
8
15
13
47
10
55
0
2
55
26
12
5
53
59
52
45
27
17
14
50
20
56
15
27
43
58
51
22
2
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #61:

score: 92
Acceptable Answer
time: 49ms
memory: 4288kb

input:

1000
58
59
72
69
81
83
87
89
88
74
91
81
86
90
96
98
88
90
94
96
100
95
97
99
101
99
100
101
34
13
58
29
9
52
14
18
56
38
54
34
14
9
37
35
13
45
42
8
56
9
18
26
8
2
36
35
56
11
11
21
54
45
2
40
58
23
34
52
15
29
28
57
46
18
29
37
44
22
33
44
11
51
27
13
25
17
8
44
26
27
28
34
21
19
12
18
36
48
52
20...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #62:

score: 92
Acceptable Answer
time: 43ms
memory: 4240kb

input:

1000
62
75
101
74
100
89
81
70
72
91
80
84
84
92
92
91
100
97
97
97
95
98
98
99
100
101
42
2
32
36
53
44
28
53
42
28
24
19
20
44
20
49
20
28
7
14
8
46
51
14
15
45
34
43
21
17
9
12
57
36
6
29
20
58
3
28
42
18
4
24
25
29
33
0
15
6
43
9
17
25
11
25
6
34
24
14
44
52
54
41
1
2
42
58
28
46
33
59
16
34
19
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)

Test #63:

score: 92
Acceptable Answer
time: 39ms
memory: 4236kb

input:

1000
61
79
69
77
71
68
93
78
95
76
100
80
85
91
88
101
96
92
96
97
98
96
99
101
99
99
100
58
31
39
56
6
34
30
49
52
37
22
3
51
11
41
51
26
46
41
22
11
45
16
21
25
15
27
25
6
51
54
13
58
1
15
25
8
13
4
11
48
51
56
18
16
4
13
43
22
27
43
42
32
1
16
43
17
58
36
9
41
18
35
28
18
48
37
39
24
49
25
31
39
...

output:

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

result:

points 0.920 points  0.920 Accepted (partial scores)