QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#405055#8227. 圆dingdingtang11514#100 ✓75ms5948kbC++142.6kb2024-05-05 09:36:402024-05-05 09:36:41

Judging History

你现在查看的是最新测评结果

  • [2024-05-05 09:36:41]
  • 评测
  • 测评结果:100
  • 用时:75ms
  • 内存:5948kb
  • [2024-05-05 09:36:40]
  • 提交

answer

#include <iostream>
#include <cstring> 
#include <map>
#include <vector>
#include <queue>
#include <cmath>
#include <algorithm>
#include <set>
// #include <bits/stdc++.h>

// #define int long long
#define For(i,a,b) for(int i=(a);i<=(b);i++)
#define Rof(i,a,b) for(int i=(a);i>=(b);i--)
#define Grf(it,u,to) for(int it=he[u],to;(to=e[it],it);it=nxt[it]) 
#define In __inline 
#define OP operator
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
namespace Mine {
	// mt19937_64 wql(514);
	In int read() {
		ll x=1,a=0;
		char ch=getchar();
		while(ch>'9' || ch<'0') x=(ch=='-')?-1:x,ch=getchar();
		while(ch>='0' && ch<='9') a=(a<<1)+(a<<3)+(ch-'0'),ch=getchar();
		return a*x;
	} const int N=1e6+100;
	int a[N],cnt[10],b[N]; signed main() {
		int _=read(); while(_--) { int n=read(),ans=0; memset(cnt,0,sizeof cnt);
			For(i,1,n) scanf("%d.%d",&a[i],&b[i]),ans+=(a[i]+(b[i]>=5));
			For(i,1,n) if(b[i]&&b[i]<5) cnt[b[i]]++;
			
			int &c1=cnt[1],&c2=cnt[2],&c3=cnt[3],&c4=cnt[4];
			int tmp=min(c1,c4);ans+=tmp; c1-=tmp,c4-=tmp;
			tmp=min(c2,c3);ans+=tmp; c2-=tmp,c3-=tmp;
			
			if(c1) {
				if(c2) { //1 2
					if(c2/2<=c1) ans+=(c2/2)+(c1-c2/2+2*(c2&1))/5;
					else ans+=c1+(c2-c1*2)/3;
				} else if(c3) { //1 3
					if(c1/2<=c3) ans+=c1/2 + (c3-c1/2)/2;
					else ans+=c3+(c1-c3*2)/5;
				} else ans+=c1/5; //1
			} else {
				if(c4) {
					if(c3) ans+=(c3+c4)/2;// 3 4
					else if(c2) { // 2 4
						int tmp=min(c2,c4); c2-=tmp,c4-=tmp;
						ans+=tmp+c2/3+c4/2;
					} else ans+=c4/2; // 4
				}  else if(c2) ans+=c2/3; // 2
			   else if(c3) ans+=c3/2; // 3
			}
			
			// int i=1,j=4;
			// while(i<j) {
				// if((i==1&&j==2)||(i==1&&j==3)) break;
				// int tmp=min(cnt[i],cnt[j]);
				// ans+=tmp;cnt[i]-=tmp,cnt[j]-=tmp;
				// if(cnt[i]<cnt[j]) i++; else j--;
			// } 
// 			
			// // 1 3
			// if(i==1 && j==3) { 
				// int &c1=cnt[1],&c2=cnt[2],&c3=cnt[3];
				// int tmp=min(c2,c3);c2-=tmp,c3-=tmp,ans+=tmp;
				// if(c1&&c2) {
					// i=1,j=2;
					// goto OT;
				// } else {
					// if(c1&&c3) {
						// int tmp=min(c3,c1/2); ans+=tmp; c1-=tmp*2,c3-=tmp;
						// if(c1 && c3) ans+=(c1+c3*3)/5,c1=c3=0;
						// if(c1) ans+=(c1)/5,c1=0;
						// if(c3) ans+=(c2)/2,c3=0;
						// if(!c1) {i++;} if(!c3) {j--;}
					// } if(c1) ans+=(c1)/5,c1=0;
					// if(c2) ans+=(c2)/3,c2=0;
					// if(c3) ans+=(c3)/2,c3=0;
				// }
			// }
			// // 1 2
			// OT:
			
// 			
			// if(i==j) ans+=(i*cnt[i])/5;
			printf("%d\n",ans);
		} return 0;
	}
}signed main() {
	// freopen("homework.in","r",stdin);
	// freopen("homework.out","w",stdout);
	return Mine::main();
}

詳細信息

Subtask #1:

score: 20
Accepted

Test #1:

score: 20
Accepted
time: 5ms
memory: 5876kb

input:

10000
5
0.3 1.3 7.5 0.9 1.3
5
3.7 2.8 4.8 3.3 6.8
5
5.9 5.5 0.9 8.8 6.0
5
6.9 1.9 8.3 0.9 8.6
5
1.1 5.2 5.1 6.1 7.1
5
5.1 5.8 6.1 0.1 5.2
5
1.3 7.1 3.1 2.9 9.6
5
7.8 9.8 6.8 0.8 7.8
5
6.3 9.8 1.1 3.4 7.1
5
0.1 1.7 1.2 2.2 3.7
5
3.7 9.5 0.2 8.7 7.2
5
0.0 3.6 2.7 5.1 9.9
5
5.8 3.0 5.0 4.0 8.3
5
1.0 9....

output:

12
22
28
27
25
23
25
34
28
10
30
22
26
26
27
26
34
19
22
29
26
24
19
34
19
21
24
23
31
23
17
26
31
21
28
7
28
36
16
23
16
37
23
24
27
23
24
30
27
26
22
30
7
34
18
30
32
33
25
26
28
27
19
26
16
29
10
30
30
25
29
13
27
12
30
17
29
28
20
20
36
27
22
27
19
28
32
18
45
36
21
28
31
27
23
18
18
40
27
15
29...

result:

ok 10000 numbers

Test #2:

score: 20
Accepted
time: 5ms
memory: 5892kb

input:

10000
5
6.1 5.2 3.2 3.1 9.2
5
1.1 1.3 3.3 3.4 2.3
5
3.3 4.4 5.2 5.2 3.2
5
5.3 8.2 2.2 0.1 9.1
5
5.2 4.3 1.3 5.3 0.4
5
5.1 4.4 2.1 1.4 0.1
5
1.1 5.1 9.1 0.1 2.1
5
4.3 7.1 0.2 4.3 5.2
5
8.4 1.1 3.2 4.4 8.4
5
1.4 3.4 1.2 1.2 8.2
5
9.1 1.1 1.4 6.4 1.1
5
4.4 7.4 3.3 5.4 0.2
5
7.3 2.3 0.1 8.4 4.3
5
0.1 3....

output:

27
12
22
25
17
14
18
22
26
16
20
21
23
18
16
30
37
16
31
26
24
24
26
17
34
28
28
18
17
14
29
26
31
21
20
23
32
18
20
24
22
22
16
21
24
27
20
24
30
12
16
18
21
30
31
15
28
24
24
23
33
37
22
8
28
12
30
11
25
19
30
25
25
23
31
18
33
18
20
12
29
22
27
15
34
26
21
18
20
27
26
29
29
19
24
21
24
21
22
23
2...

result:

ok 10000 numbers

Test #3:

score: 20
Accepted
time: 4ms
memory: 5844kb

input:

10000
1
5.1
5
5.2 8.1 9.3 7.3 2.2
3
7.1 8.2 0.1
3
9.3 3.2 9.1
3
8.1 8.4 7.3
3
3.1 0.4 7.2
2
6.1 8.1
3
3.2 5.2 8.4
3
6.2 0.1 0.2
1
4.4
3
3.4 3.1 3.1
5
6.1 1.1 2.1 1.4 1.1
3
2.1 7.4 8.2
5
8.3 6.2 6.2 0.3 5.3
5
6.2 1.4 1.2 8.4 1.3
1
1.3
2
1.2 1.2
2
0.1 8.2
2
6.1 6.1
2
3.1 0.1
5
3.3 8.3 3.3 4.3 8.2
3
3....

output:

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

result:

ok 10000 numbers

Test #4:

score: 20
Accepted
time: 2ms
memory: 5840kb

input:

10000
5
7.4 7.4 7.3 2.3 0.3
5
0.4 0.4 2.4 6.4 8.3
4
5.4 2.3 8.3 0.4
5
3.3 7.3 9.4 7.1 6.3
5
0.4 0.1 8.1 6.4 6.1
5
6.4 1.4 3.1 4.4 8.3
4
2.4 3.1 1.4 6.4
5
3.4 4.4 1.1 2.3 9.4
4
7.3 7.4 8.4 8.3
4
3.4 9.3 5.3 7.1
5
8.4 4.3 7.3 8.3 2.4
4
3.1 9.1 9.1 7.1
4
9.4 7.4 1.4 2.1
5
2.3 0.4 8.3 9.3 3.3
4
6.1 8.1 ...

output:

25
18
17
34
22
24
14
21
32
26
31
28
21
24
25
32
31
20
26
17
37
21
22
23
24
17
26
24
13
32
24
29
14
21
35
19
26
18
26
8
15
13
22
16
21
28
11
29
14
14
25
20
21
27
5
14
42
15
30
23
22
17
30
26
22
20
14
19
26
23
7
15
15
25
17
29
27
14
12
15
21
20
21
35
23
19
19
21
18
26
20
22
30
16
16
16
24
27
31
25
22
...

result:

ok 10000 numbers

Test #5:

score: 20
Accepted
time: 5ms
memory: 5880kb

input:

10000
4
3.4 9.1 4.1 6.4
4
5.1 8.1 5.1 9.1
5
7.4 2.4 9.2 8.1 5.4
4
5.2 0.2 1.2 2.1
4
9.2 4.2 4.2 7.2
4
1.4 9.2 2.2 5.4
5
3.2 3.1 9.4 7.2 3.1
4
2.1 2.1 8.2 6.4
5
8.1 5.1 4.1 2.4 3.2
5
9.2 6.1 0.2 4.1 7.1
4
9.4 5.4 6.2 6.4
5
3.2 5.2 6.2 0.4 3.2
5
5.2 9.4 7.4 4.2 1.4
5
5.4 4.4 9.4 6.4 9.2
4
4.2 9.4 4.4 ...

output:

24
27
33
9
25
19
27
19
23
27
28
19
28
35
22
16
20
27
28
31
39
23
20
35
12
17
15
10
34
20
19
15
18
15
22
15
35
23
16
19
23
24
30
17
22
22
16
34
20
24
33
14
13
18
35
13
22
26
21
30
24
18
7
29
21
27
24
23
13
9
19
24
17
29
19
34
20
25
21
33
23
36
25
17
17
32
20
17
19
12
15
12
22
34
23
16
30
16
22
10
16
...

result:

ok 10000 numbers

Test #6:

score: 20
Accepted
time: 5ms
memory: 5812kb

input:

10000
4
9.2 9.2 2.2 5.2
5
4.3 1.4 8.4 3.4 0.3
5
2.4 8.4 2.4 4.3 9.2
5
1.4 7.2 4.4 9.3 9.2
4
0.4 5.2 6.2 2.3
5
1.3 2.2 9.3 8.3 8.3
4
7.4 5.4 1.3 7.4
4
2.3 7.4 5.2 7.3
5
1.2 0.4 3.2 5.4 4.2
4
8.2 5.4 9.2 0.4
5
0.3 1.2 0.3 9.3 1.2
5
4.2 9.3 5.3 5.3 5.4
4
0.2 1.2 7.3 2.2
4
3.2 1.3 9.3 4.3
4
4.4 1.4 1.2 ...

output:

26
18
27
32
15
30
22
23
15
24
13
30
11
19
15
24
17
19
25
25
18
13
32
31
31
12
22
22
19
18
22
27
12
13
19
23
27
22
23
25
25
36
20
19
37
9
21
18
14
14
21
9
27
21
21
22
18
26
7
13
23
10
28
35
28
24
23
24
20
22
20
16
29
10
23
25
27
14
21
16
7
21
19
23
18
19
15
10
27
12
27
29
13
26
13
22
34
23
20
28
22
2...

result:

ok 10000 numbers

Test #7:

score: 20
Accepted
time: 2ms
memory: 5888kb

input:

10000
4
8.2 5.2 6.2 0.2
5
5.2 2.3 4.1 1.3 7.2
4
4.1 2.2 5.2 5.1
5
6.3 7.3 1.3 3.3 5.3
5
2.1 8.3 5.2 4.1 4.1
5
6.1 3.2 0.1 7.1 7.1
4
2.3 1.3 1.1 7.3
4
7.1 9.1 7.1 8.1
5
2.1 1.1 2.2 4.2 6.3
5
0.2 2.3 6.3 0.2 5.2
5
5.2 2.2 6.2 7.3 0.3
4
3.1 0.1 5.1 7.2
5
3.1 5.1 3.1 2.1 2.1
4
1.1 4.3 4.3 4.2
5
8.3 9.1 ...

output:

20
21
17
24
24
24
12
31
16
15
22
16
16
14
40
20
12
19
14
19
28
26
21
24
12
19
14
10
16
21
13
23
20
30
20
17
22
21
32
32
15
20
17
30
23
19
31
27
24
27
31
21
18
19
20
21
17
26
34
20
15
17
26
17
23
20
19
17
5
18
6
38
34
18
22
17
28
28
25
19
13
15
15
15
21
16
26
39
21
13
21
12
21
11
20
7
33
13
12
17
17
...

result:

ok 10000 numbers

Subtask #2:

score: 15
Accepted

Test #8:

score: 15
Accepted
time: 0ms
memory: 5880kb

input:

100
12
3.8 2.2 7.7 4.3 8.1 9.3 6.2 7.6 5.8 9.3 5.3 7.2
12
9.1 5.5 6.5 8.1 4.1 4.5 9.1 0.5 3.1 3.7 6.5 2.4
12
2.4 3.4 3.4 8.7 0.7 9.2 0.9 2.0 5.0 8.6 5.0 0.0
12
6.7 5.0 4.7 8.9 8.5 2.8 9.0 6.8 6.0 6.7 9.5 0.9
12
4.2 7.2 8.5 9.1 0.2 4.2 0.2 5.6 2.3 1.7 0.2 8.4
12
9.7 6.8 4.0 1.8 7.7 2.8 2.1 3.3 0.7 4....

output:

79
66
51
78
54
56
74
59
68
68
50
57
79
53
65
62
35
77
65
51
53
60
47
74
69
77
43
60
61
66
60
87
63
56
52
64
67
42
69
43
69
71
81
70
53
72
81
57
41
66
77
66
53
57
73
62
57
59
75
52
71
61
41
79
53
55
60
65
49
72
49
49
61
50
52
74
76
66
69
28
66
66
57
64
74
66
52
86
44
57
62
59
59
52
59
62
58
52
64
61

result:

ok 100 numbers

Test #9:

score: 15
Accepted
time: 1ms
memory: 5888kb

input:

100
12
2.3 5.3 6.1 9.4 9.3 0.4 7.1 6.1 5.3 4.3 9.1 8.4
12
7.4 6.4 9.2 1.4 7.4 0.4 9.4 5.4 3.4 5.3 5.4 9.2
12
3.4 2.1 8.1 6.1 2.2 8.4 5.2 6.2 4.4 6.1 1.2 2.2
12
0.1 9.1 5.1 5.1 5.2 6.1 0.2 3.3 0.3 5.1 1.1 1.1
12
7.2 4.2 6.2 7.3 2.3 5.1 4.2 4.3 6.3 2.2 6.4 3.3
12
5.2 8.2 8.2 3.3 2.2 8.2 3.2 5.2 6.2 0....

output:

75
72
58
43
62
61
56
58
59
56
67
70
59
61
61
55
46
68
63
62
72
61
67
48
67
70
47
55
57
49
50
57
52
60
65
66
62
53
58
58
55
48
55
69
55
75
64
73
80
55
34
79
65
56
59
54
51
48
39
65
63
78
53
64
79
56
54
56
84
56
62
71
58
66
70
54
80
47
68
79
71
63
58
54
52
71
49
62
53
74
78
53
69
68
49
67
37
65
56
73

result:

ok 100 numbers

Test #10:

score: 15
Accepted
time: 1ms
memory: 5888kb

input:

100
9
7.2 0.2 6.2 4.2 0.1 0.3 6.3 9.4 4.2
6
5.3 7.3 9.3 7.2 2.2 0.3
7
2.4 5.3 7.3 9.2 3.1 6.4 1.3
2
1.1 6.3
4
1.2 4.2 4.1 4.1
9
2.4 6.2 7.4 4.4 4.4 8.4 7.1 3.4 6.2
1
6.2
10
6.4 0.4 2.4 3.1 7.2 7.2 1.4 9.1 9.1 1.1
8
2.1 3.3 0.3 2.3 7.3 3.1 9.3 6.1
10
6.4 8.3 4.4 6.3 3.4 7.4 2.3 3.3 1.3 7.4
1
9.2
10
0...

output:

40
33
36
7
14
51
6
49
35
52
9
42
5
28
21
14
32
34
3
32
10
21
19
24
14
15
20
58
58
50
64
42
18
22
32
8
2
23
9
43
3
18
30
27
60
17
31
58
42
11
17
60
30
5
35
46
0
31
14
60
49
14
63
41
55
71
11
45
30
19
27
82
39
36
4
13
33
57
40
16
59
18
6
20
7
20
55
17
68
6
61
69
21
1
46
4
36
46
4
28

result:

ok 100 numbers

Test #11:

score: 15
Accepted
time: 1ms
memory: 5944kb

input:

100
11
3.3 4.3 0.3 6.3 2.4 0.3 7.3 4.3 2.3 7.3 3.3
11
4.3 6.3 5.3 2.3 5.3 4.1 1.3 0.3 1.3 2.3 5.4
12
8.1 8.3 6.1 3.1 0.3 1.1 0.4 1.1 5.1 0.1 3.4 9.1
11
6.4 6.4 8.4 4.4 3.1 7.4 3.1 1.4 1.1 3.4 0.3
12
4.1 2.1 7.1 9.1 1.1 9.1 6.1 4.1 7.1 4.1 2.1 8.1
11
8.1 0.4 4.4 2.3 0.1 0.4 6.3 6.4 2.3 9.3 8.3
11
0.1...

output:

43
40
48
47
65
50
49
65
78
43
62
70
52
60
42
49
57
43
76
53
55
80
42
42
58
68
76
55
58
53
61
44
65
57
41
58
44
71
55
68
60
72
80
63
55
58
43
73
54
63
71
63
65
57
59
43
39
38
56
57
47
63
52
51
48
33
53
46
50
48
53
55
57
51
62
58
59
47
80
45
61
59
69
72
48
42
48
48
71
58
58
39
46
41
48
46
54
49
48
61

result:

ok 100 numbers

Test #12:

score: 15
Accepted
time: 1ms
memory: 5896kb

input:

100
12
9.1 6.1 6.4 8.1 6.1 6.4 4.2 0.4 2.4 1.4 6.1 8.2
11
4.1 5.4 4.2 1.1 8.2 8.4 7.4 5.4 0.2 1.2 8.2
12
1.4 0.2 7.2 9.1 7.2 1.1 6.2 3.1 0.4 2.4 9.4 6.1
12
1.2 9.4 6.4 2.4 4.4 4.4 2.2 6.4 4.2 6.2 2.4 7.4
12
0.4 6.2 9.4 1.1 0.1 3.2 8.1 2.4 8.1 9.2 7.2 8.1
12
7.4 9.4 2.4 5.2 3.4 2.4 5.2 7.2 9.4 4.4 1....

output:

67
56
56
59
66
64
51
62
61
77
59
43
61
45
53
48
38
74
68
61
77
62
53
47
56
59
66
60
42
35
72
49
51
55
68
53
72
47
69
47
49
49
68
78
55
60
69
48
51
62
76
42
60
70
50
61
45
64
66
35
56
36
66
52
69
51
47
49
62
55
45
72
44
78
54
71
61
66
64
63
53
62
61
50
59
44
54
58
47
43
50
63
45
59
40
59
36
47
59
78

result:

ok 100 numbers

Test #13:

score: 15
Accepted
time: 1ms
memory: 5948kb

input:

100
11
1.4 9.4 7.2 0.4 5.2 8.2 8.4 5.3 4.4 6.2 8.4
12
1.4 9.2 2.4 8.4 9.4 0.4 4.2 7.4 0.4 3.2 5.3 9.4
12
5.4 9.4 3.4 7.4 1.4 8.4 3.3 6.4 2.3 6.4 9.4 9.4
12
1.4 2.2 3.2 7.2 3.2 6.2 4.2 3.2 5.2 8.2 6.2 1.3
11
7.3 9.3 0.3 4.3 9.3 3.3 4.3 3.2 9.2 7.2 1.2
11
0.4 9.4 5.3 1.3 3.4 5.2 0.2 7.3 9.4 7.2 4.2
12...

output:

66
63
74
53
61
55
62
46
60
81
55
46
36
62
59
51
53
45
66
48
57
70
50
56
56
57
68
71
68
56
61
58
56
39
57
53
59
67
57
46
74
64
78
68
59
71
50
40
54
59
54
58
40
58
77
56
58
47
41
58
70
63
52
75
75
68
54
63
66
44
50
45
59
63
45
53
59
63
61
66
62
62
67
67
56
68
51
47
70
79
66
39
54
41
77
55
51
62
68
38

result:

ok 100 numbers

Test #14:

score: 15
Accepted
time: 1ms
memory: 5936kb

input:

100
12
2.1 3.1 9.1 6.1 4.1 4.1 1.1 6.1 5.3 1.1 7.1 1.3
11
9.1 0.2 7.2 9.1 4.2 6.1 2.1 6.3 7.2 5.1 4.1
12
8.2 1.3 5.3 2.1 2.3 6.3 3.3 4.3 6.3 3.3 7.3 6.3
11
0.1 1.1 3.3 1.3 0.2 0.3 2.3 5.3 7.2 6.1 0.2
11
3.3 4.3 8.3 1.3 8.3 4.1 7.1 5.3 3.2 9.3 7.3
11
9.1 1.3 1.3 0.3 3.1 2.3 2.1 1.3 6.1 3.1 3.3
11
3.2...

output:

52
62
58
29
64
35
45
42
46
60
50
49
42
60
55
41
52
52
42
30
45
67
60
64
52
74
46
42
49
74
35
53
82
60
51
56
62
41
58
64
62
36
57
46
61
35
62
57
55
40
67
45
57
69
63
50
71
48
62
53
59
41
53
47
59
51
71
48
66
44
43
53
55
58
52
39
58
73
79
69
68
60
68
58
60
51
67
56
40
49
44
67
55
57
33
37
49
55
63
55

result:

ok 100 numbers

Subtask #3:

score: 17
Accepted

Test #15:

score: 17
Accepted
time: 51ms
memory: 5880kb

input:

10000
80
5.8 9.4 8.7 6.3 3.9 8.7 1.6 3.3 1.6 7.2 3.8 1.8 4.7 7.3 4.8 2.1 1.2 6.5 0.9 1.8 2.6 2.8 7.1 0.9 9.5 4.5 0.8 1.9 3.6 5.9 9.8 3.3 3.8 6.8 4.7 0.0 6.6 9.9 8.8 9.3 7.2 5.9 1.9 8.8 0.6 0.3 4.2 1.3 2.2 8.2 4.8 2.9 4.7 6.2 1.7 7.2 1.0 8.0 9.9 6.2 7.3 8.8 3.6 4.6 0.7 9.6 9.3 8.2 7.6 6.8 5.2 3.6 7.8...

output:

425
429
387
434
377
402
371
438
469
398
408
397
392
421
434
432
414
401
436
374
432
455
466
424
421
431
398
462
430
473
403
377
359
403
409
435
471
442
369
454
460
415
393
405
434
453
398
451
421
340
417
402
391
438
439
381
415
419
435
427
410
410
342
410
398
389
385
442
392
435
430
464
389
428
408
...

result:

ok 10000 numbers

Test #16:

score: 17
Accepted
time: 52ms
memory: 5900kb

input:

10000
80
0.3 1.1 4.3 2.1 6.1 4.1 7.2 7.1 7.1 6.1 7.1 6.2 7.3 4.1 6.1 7.1 7.3 6.2 9.1 4.1 8.1 2.4 4.3 8.1 5.1 3.1 8.3 1.4 4.1 0.1 0.4 8.4 7.1 8.1 8.4 2.3 4.4 4.1 5.4 3.1 7.3 7.3 3.1 8.2 7.3 8.3 9.1 2.4 6.1 8.1 4.4 4.3 5.1 5.1 4.2 5.1 4.1 0.3 9.1 4.4 0.1 4.2 1.3 2.4 2.2 8.2 3.4 3.3 3.1 2.1 1.4 5.3 7.1...

output:

406
344
343
427
406
364
404
340
400
379
390
402
398
411
374
408
366
436
406
391
416
407
376
368
391
411
382
362
399
373
399
420
417
391
415
417
400
399
374
387
396
421
415
415
380
440
367
406
381
384
360
440
364
406
422
407
424
414
436
416
406
427
371
422
371
405
434
346
389
458
370
466
394
392
388
...

result:

ok 10000 numbers

Test #17:

score: 17
Accepted
time: 52ms
memory: 5880kb

input:

10000
80
6.2 9.4 7.4 3.4 1.1 0.2 4.3 6.4 2.3 9.1 2.3 8.2 0.4 0.3 0.2 6.1 9.2 3.1 8.1 9.2 0.1 3.2 5.2 1.1 4.1 4.3 3.4 9.4 6.4 4.1 0.3 9.2 6.4 8.1 3.4 6.1 1.1 6.2 5.1 9.2 3.1 3.4 6.3 6.2 0.4 3.4 3.2 2.2 3.3 8.1 7.3 7.2 4.2 6.3 9.3 3.1 3.2 9.3 0.4 5.1 0.1 6.3 0.2 1.1 2.2 3.2 3.3 3.4 3.4 3.4 3.1 1.4 0.1...

output:

370
386
406
403
370
380
340
401
382
330
347
366
342
420
345
332
432
445
369
392
399
341
347
348
351
364
451
357
359
366
382
382
357
297
344
358
349
375
403
384
378
350
411
335
394
372
319
363
378
443
334
407
376
348
371
385
415
408
323
422
364
373
339
338
320
410
414
335
383
408
347
422
341
368
324
...

result:

ok 10000 numbers

Test #18:

score: 17
Accepted
time: 53ms
memory: 5948kb

input:

10000
80
4.4 9.3 6.1 6.1 9.1 0.1 5.1 9.3 9.1 4.1 6.1 1.1 5.1 8.4 4.4 5.4 9.3 8.4 9.4 5.3 7.4 9.1 1.1 8.1 2.4 7.1 3.1 9.1 9.1 9.1 0.1 6.1 9.1 7.1 7.1 5.1 1.4 9.1 0.4 6.4 1.1 8.4 1.3 7.1 1.1 8.4 3.1 1.1 4.3 8.3 2.3 2.4 9.4 7.1 4.4 7.3 6.1 3.1 7.4 8.1 9.3 4.1 5.3 2.1 4.1 6.1 7.4 8.1 1.4 3.1 5.1 3.1 3.4...

output:

456
397
407
324
407
316
347
358
384
414
340
357
389
382
427
358
360
395
344
354
384
323
407
407
412
376
337
377
384
389
402
387
381
339
322
335
397
456
355
331
370
369
385
430
384
318
351
362
369
358
409
368
386
409
364
382
344
346
370
393
378
392
381
346
357
332
380
308
355
368
390
396
407
396
289
...

result:

ok 10000 numbers

Test #19:

score: 17
Accepted
time: 53ms
memory: 5896kb

input:

10000
78
9.4 2.4 4.4 9.4 1.1 5.1 7.1 4.1 3.4 9.1 4.1 3.1 8.1 0.4 3.1 2.4 8.1 7.4 3.1 2.4 9.4 5.4 2.4 5.1 6.1 5.4 6.1 2.1 3.4 6.4 9.1 4.1 0.1 2.1 2.1 5.1 7.1 4.4 8.1 7.1 2.1 0.1 8.1 0.4 4.4 2.4 9.4 3.1 0.1 1.1 5.4 1.1 4.1 4.2 3.1 4.1 5.4 4.4 1.1 5.1 2.4 5.1 8.4 7.1 8.4 3.1 3.1 0.1 8.1 5.1 4.1 8.4 5.4...

output:

381
333
348
391
353
364
360
372
360
324
358
373
341
412
409
356
334
327
335
362
394
375
367
364
364
369
355
417
357
315
356
390
367
384
393
412
356
365
373
395
328
423
355
420
312
345
377
338
347
390
358
363
369
324
346
377
374
372
419
409
379
422
389
389
388
344
395
373
372
418
345
335
381
319
351
...

result:

ok 10000 numbers

Test #20:

score: 17
Accepted
time: 49ms
memory: 5936kb

input:

10000
70
2.2 3.3 3.3 7.2 4.2 4.4 3.4 7.2 7.4 5.2 4.4 6.3 1.2 8.2 1.2 0.4 7.4 8.4 8.4 3.2 3.2 6.2 4.2 2.3 6.2 7.2 1.3 3.4 1.2 5.3 0.4 2.4 1.3 0.2 7.2 0.2 7.2 4.2 4.4 4.3 8.2 7.4 7.2 2.3 0.3 5.2 9.4 4.3 6.4 2.2 3.4 2.2 1.3 1.2 0.2 0.4 8.3 5.3 7.4 4.4 2.4 5.2 1.3 4.4 8.3 3.2 8.2 2.2 7.2 9.2
72
6.3 9.2 ...

output:

323
345
377
350
391
377
394
322
379
326
404
361
350
388
325
400
423
387
359
388
357
356
373
427
349
384
384
332
395
360
432
394
417
400
319
392
322
415
388
357
372
371
411
353
397
326
412
378
386
315
353
401
404
371
374
344
316
401
362
383
371
374
383
391
354
365
380
349
375
433
365
329
399
367
400
...

result:

ok 10000 numbers

Test #21:

score: 17
Accepted
time: 52ms
memory: 5784kb

input:

10000
72
6.2 1.3 5.1 8.2 5.3 2.1 3.3 0.3 4.1 5.1 7.1 0.1 9.1 6.3 7.3 9.1 6.1 9.1 1.1 1.1 2.1 3.1 4.1 9.1 0.1 0.1 3.1 8.1 2.3 4.3 9.1 7.1 0.1 3.1 8.3 0.1 8.1 4.1 9.1 0.1 0.1 1.1 2.3 4.3 5.3 9.1 7.3 3.3 3.1 7.3 4.1 0.1 7.1 7.1 2.1 5.1 0.1 7.1 9.1 2.1 0.3 7.3 4.1 9.1 6.3 6.1 4.3 3.1 0.1 6.3 5.3 4.1
70
...

output:

338
352
369
360
345
315
413
392
399
351
350
350
386
402
376
369
395
335
380
401
342
407
335
366
373
384
389
338
335
410
384
378
369
377
339
339
324
372
375
405
364
383
387
332
362
334
316
417
351
356
377
316
430
390
369
387
413
360
337
368
409
294
342
393
391
437
358
374
338
314
383
338
396
355
384
...

result:

ok 10000 numbers

Subtask #4:

score: 21
Accepted

Test #22:

score: 21
Accepted
time: 75ms
memory: 5840kb

input:

10000
100
9.0 7.4 3.6 2.0 6.4 8.4 3.4 2.4 9.4 2.6 8.6 3.4 4.4 8.4 5.4 6.4 3.4 8.6 0.0 1.0 8.4 8.0 6.6 6.6 5.4 8.4 7.0 2.6 9.6 1.6 8.6 0.8 5.0 8.4 8.4 7.4 3.8 6.4 9.4 2.6 8.4 9.6 3.0 3.4 6.4 8.4 6.4 8.4 5.4 4.4 4.6 1.4 7.4 7.4 5.8 4.0 6.6 0.4 7.4 1.8 5.4 9.4 9.4 3.0 1.6 4.8 5.0 3.4 0.4 1.0 2.0 4.4 3....

output:

543
503
526
543
484
515
521
487
485
529
467
476
467
543
490
485
500
443
537
528
554
492
509
457
476
459
533
496
481
549
528
471
540
523
537
560
475
496
528
469
565
468
487
476
517
506
565
511
545
486
479
491
537
513
539
451
492
512
456
532
474
517
576
435
486
495
555
555
450
491
495
489
506
536
543
...

result:

ok 10000 numbers

Test #23:

score: 21
Accepted
time: 70ms
memory: 5756kb

input:

100
10000
1.8 3.6 8.2 6.8 7.8 9.8 0.8 0.6 2.8 3.8 7.8 9.8 7.8 5.8 4.8 8.8 7.6 5.0 8.6 4.6 1.8 2.8 8.6 8.6 4.8 8.2 4.8 1.6 3.8 6.8 4.8 4.8 2.8 3.6 3.8 5.8 0.6 5.8 5.6 5.8 7.8 5.8 6.8 4.0 1.8 1.8 9.2 5.8 9.8 6.6 3.6 7.8 2.8 3.0 1.8 4.8 3.8 9.8 3.8 3.8 1.2 7.8 2.8 9.8 8.8 3.6 4.6 8.8 9.8 9.8 8.0 3.8 2....

output:

53838
51218
49160
51210
50924
51442
50311
50419
52309
51413
50838
52524
49614
52819
49479
52076
51911
48083
48699
51048
54060
49388
52424
52434
54121
51643
50678
51400
51805
49707
48273
49509
49428
53383
51332
50512
54214
52477
51426
51516
50734
51256
47113
51365
51811
50672
50188
51833
51812
49194
...

result:

ok 100 numbers

Test #24:

score: 21
Accepted
time: 1ms
memory: 5892kb

input:

1
1
8.6

output:

9

result:

ok 1 number(s): "9"

Test #25:

score: 21
Accepted
time: 70ms
memory: 5932kb

input:

10000
100
7.4 1.4 2.4 7.4 6.4 1.4 9.4 1.4 5.4 3.2 6.4 6.2 2.4 2.4 7.2 5.2 1.4 6.4 3.4 0.4 7.2 0.4 5.4 9.4 8.4 8.4 1.2 9.4 5.4 8.4 1.4 4.2 7.4 8.4 3.4 8.4 2.4 9.4 0.4 5.4 0.4 0.2 5.2 8.4 5.4 4.4 9.4 4.4 5.4 8.4 1.4 9.2 7.2 5.4 4.4 6.2 3.4 3.4 6.4 4.4 4.4 5.4 6.4 8.4 1.2 1.2 6.4 4.2 2.4 9.2 8.4 3.4 7....

output:

515
472
503
472
456
553
537
427
466
571
488
478
480
469
517
520
461
472
465
501
518
472
520
453
483
526
505
524
492
478
493
553
472
488
465
469
454
497
497
477
521
492
460
446
490
474
507
478
449
525
466
539
521
478
526
464
475
515
434
511
458
500
572
467
510
503
468
517
537
549
477
513
497
460
546
...

result:

ok 10000 numbers

Test #26:

score: 21
Accepted
time: 38ms
memory: 5836kb

input:

10000
35
7.2 0.2 8.2 5.2 1.2 6.2 0.2 4.2 1.2 0.2 4.2 6.2 1.2 6.2 9.2 8.0 9.2 7.2 3.2 1.2 0.2 9.2 7.2 9.2 3.2 3.2 5.2 0.4 1.2 4.2 7.4 3.0 8.0 8.2 3.0
70
8.2 1.4 4.4 3.2 8.4 0.0 9.0 1.0 1.4 8.4 5.2 9.4 9.0 8.4 0.2 1.0 1.0 7.0 9.2 0.0 8.0 6.2 2.2 3.0 4.0 3.2 7.2 8.0 3.4 0.0 0.4 3.0 5.2 6.4 2.0 8.2 3.2 ...

output:

167
350
368
365
342
226
384
467
215
251
295
152
198
158
78
457
69
321
116
38
95
240
268
31
467
164
297
332
104
330
425
359
58
272
110
177
481
142
337
339
417
0
279
75
83
269
384
404
397
413
337
479
53
282
420
71
83
470
494
232
200
131
365
120
314
328
253
393
258
428
5
80
249
467
101
43
413
297
165
4...

result:

ok 10000 numbers

Test #27:

score: 21
Accepted
time: 39ms
memory: 5876kb

input:

10000
75
3.0 8.0 3.0 2.0 1.0 4.0 5.0 4.0 5.2 4.0 2.0 0.2 8.0 6.0 7.2 6.0 5.2 5.0 9.2 5.0 5.0 7.2 5.0 7.0 9.0 1.2 2.0 8.2 3.2 5.0 1.0 3.0 6.0 5.0 7.0 0.0 1.0 7.0 8.0 6.0 8.0 8.0 0.0 3.0 7.0 7.0 6.0 1.0 2.0 3.0 7.2 4.0 4.2 1.2 8.0 4.0 5.0 5.0 6.0 2.0 0.0 4.0 2.0 3.2 5.0 0.0 1.0 0.0 1.0 4.0 3.0 1.2 8.0...

output:

328
257
235
131
192
137
84
15
442
139
204
104
218
312
39
254
198
82
31
87
171
376
51
266
320
377
36
95
124
369
121
282
185
304
271
379
347
42
307
256
16
433
452
61
36
272
231
237
256
317
176
93
398
105
73
389
321
254
353
192
106
24
115
35
51
193
141
356
491
33
321
156
376
278
73
313
374
321
143
45
2...

result:

ok 10000 numbers

Test #28:

score: 21
Accepted
time: 35ms
memory: 5900kb

input:

10000
23
3.4 8.4 7.0 5.0 2.4 7.4 1.4 4.0 9.4 3.4 3.0 0.4 6.4 8.4 4.4 9.4 1.4 9.0 4.4 4.0 3.4 6.4 2.4
49
0.4 7.4 5.4 3.4 3.0 1.4 0.4 3.0 2.0 4.0 0.4 9.0 9.4 6.0 5.4 2.4 0.4 7.0 7.4 1.0 9.4 7.0 8.4 2.4 8.4 8.4 4.4 2.4 4.0 9.4 3.4 7.4 3.4 2.0 5.0 3.4 3.4 0.4 2.0 1.4 1.4 8.4 1.4 1.4 9.4 6.4 8.4 9.0 4.0
...

output:

116
228
432
154
264
167
250
27
360
323
200
333
70
322
265
337
382
370
322
311
188
424
178
347
235
13
181
321
72
90
64
366
257
347
457
373
282
208
397
76
99
197
8
455
176
322
244
423
377
457
223
235
432
249
15
160
117
362
308
85
218
122
458
355
190
47
305
418
22
427
27
261
11
55
73
384
18
188
305
187...

result:

ok 10000 numbers

Subtask #5:

score: 27
Accepted

Test #29:

score: 27
Accepted
time: 73ms
memory: 5892kb

input:

10000
100
2.1 3.8 5.3 2.1 1.8 3.1 5.6 6.8 1.3 8.6 5.8 1.9 4.9 4.2 9.2 6.1 6.3 2.2 5.6 1.3 6.7 2.7 1.0 6.8 6.3 5.9 8.3 7.9 0.0 0.1 4.9 4.9 0.2 2.9 4.0 8.6 1.6 2.0 1.0 1.0 5.7 2.0 5.7 2.8 2.8 2.8 2.3 5.9 5.3 7.0 8.6 4.0 6.6 5.1 5.0 8.7 3.0 0.9 5.0 2.8 4.7 5.1 1.2 8.1 0.0 0.6 6.6 1.3 3.0 0.6 9.9 9.0 9....

output:

459
529
536
485
522
499
517
518
495
525
535
549
524
532
538
523
540
529
535
513
516
521
518
513
496
497
493
486
545
521
533
476
487
520
506
502
601
562
559
540
531
538
495
548
516
497
516
536
485
572
532
486
507
496
491
516
548
535
529
523
490
565
448
493
541
559
532
498
518
477
545
507
542
521
488
...

result:

ok 10000 numbers

Test #30:

score: 27
Accepted
time: 73ms
memory: 5940kb

input:

100
10000
7.8 6.8 0.8 7.1 5.1 2.0 3.1 9.8 8.2 1.2 2.1 4.8 2.1 5.0 7.1 4.1 6.7 1.1 6.7 3.1 1.6 9.1 5.7 2.0 1.1 8.7 9.1 1.8 3.1 2.1 5.1 9.1 7.0 0.1 7.1 5.1 9.1 6.1 9.2 1.7 7.0 1.1 0.8 1.0 7.8 9.1 1.7 5.1 6.7 5.7 3.7 2.8 8.1 1.8 8.1 7.1 3.0 0.7 8.7 2.1 1.0 1.8 0.1 5.1 5.8 6.1 4.1 1.8 9.2 4.0 0.1 9.1 9....

output:

49355
51898
53846
52212
53984
51465
51413
52265
52468
52097
53455
52141
52702
52183
50495
52899
52459
53909
51118
50344
50545
50150
51917
51625
50516
52828
52573
53075
52084
49527
52829
50621
50473
51812
52206
51443
50732
52867
51438
52191
50778
52038
52307
52005
51701
53275
52035
52331
51669
51646
...

result:

ok 100 numbers

Test #31:

score: 27
Accepted
time: 0ms
memory: 5932kb

input:

1
1
9.7

output:

10

result:

ok 1 number(s): "10"

Test #32:

score: 27
Accepted
time: 65ms
memory: 5896kb

input:

1000
1000
3.4 3.1 7.3 5.1 7.3 6.3 3.3 0.4 6.3 0.3 6.2 1.3 3.3 7.4 9.4 5.4 0.4 0.1 4.1 8.3 6.1 6.3 3.3 9.1 5.3 9.3 6.1 8.3 9.4 8.3 6.3 9.4 3.1 0.2 6.3 0.3 5.3 7.3 4.3 9.3 3.3 0.1 6.1 0.4 3.3 9.1 5.3 5.3 5.3 9.3 1.3 0.3 7.4 7.1 5.3 2.3 1.1 0.3 7.3 8.1 9.3 3.1 8.3 1.1 6.3 8.1 1.3 6.1 0.1 7.3 6.1 4.3 7....

output:

5058
5122
5075
4860
4910
5034
5016
4984
4925
5017
4882
4984
4726
4910
5055
5078
4935
5008
4996
4945
4817
5166
5120
4854
4999
4902
4978
4898
4913
5127
5116
4956
4971
4934
5017
4978
4992
4925
4989
4998
4836
5025
4970
4956
5017
4784
4949
4943
4866
4998
4933
5081
5045
4923
4923
4780
4908
4821
5052
4948
...

result:

ok 1000 numbers

Test #33:

score: 27
Accepted
time: 69ms
memory: 5772kb

input:

1000
1000
3.1 7.1 4.1 1.1 3.1 3.2 9.1 4.1 3.1 3.1 0.2 9.1 0.2 1.1 9.1 1.1 5.1 5.1 3.4 4.1 3.2 4.1 1.1 5.1 8.1 2.1 4.1 6.1 9.4 9.1 1.4 4.2 4.2 3.2 7.1 9.2 7.4 1.1 8.2 3.2 7.1 0.1 1.1 0.1 5.2 2.1 8.2 8.1 8.2 5.1 0.1 4.2 6.1 5.2 2.1 8.1 1.2 7.1 6.2 0.1 3.1 8.2 9.1 8.1 6.2 2.2 0.1 6.1 3.2 3.4 4.4 5.1 3....

output:

4828
4994
4965
4676
4984
4932
5122
4844
4878
5012
4677
4687
5178
4869
4854
4819
5153
4983
4887
5005
4981
4945
4885
5002
4953
4931
4858
4641
4688
4771
4956
4895
4942
5036
4946
4918
4954
5115
5223
4841
5080
4956
4969
4901
4858
4902
5037
4733
4936
4856
4903
4903
4886
4945
4908
4888
4938
4886
4852
5020
...

result:

ok 1000 numbers

Test #34:

score: 27
Accepted
time: 69ms
memory: 5932kb

input:

1000
1000
7.3 8.3 0.3 9.3 0.3 0.4 9.3 8.1 1.1 9.3 7.4 8.4 7.4 6.1 8.3 9.1 9.3 3.1 6.3 3.1 3.1 7.3 5.1 1.3 6.3 8.4 5.3 0.3 4.3 7.1 5.1 7.1 5.3 0.1 8.3 1.3 5.3 5.3 5.3 9.3 3.4 8.3 7.4 7.1 2.3 2.1 4.1 1.1 3.3 7.3 0.4 4.1 9.1 6.3 8.3 0.1 0.4 0.3 3.1 8.1 1.3 8.1 9.3 4.3 5.4 4.4 2.1 3.1 8.4 1.3 4.1 6.1 5....

output:

5110
4818
4872
5215
4958
5144
4776
5014
5091
4801
5054
5039
4978
5123
4986
5018
4968
4969
4945
4876
4746
4951
4888
5065
4872
4900
5087
4968
5062
5010
5060
5064
4807
4762
4704
4955
4964
5061
5036
4946
4942
4845
4941
5038
5077
4926
4695
4845
5066
5097
4939
5010
5012
5127
4816
5069
5090
5039
4933
5158
...

result:

ok 1000 numbers

Test #35:

score: 27
Accepted
time: 69ms
memory: 5940kb

input:

1000
1000
7.1 9.1 5.1 4.2 8.1 7.2 6.2 6.2 3.3 0.1 4.3 2.2 9.3 6.2 5.1 0.3 9.2 8.2 5.2 2.3 8.1 6.3 4.3 9.3 6.3 3.1 7.3 2.1 7.1 0.1 8.1 2.1 6.1 9.2 7.1 0.1 5.3 8.1 4.2 4.2 1.3 9.1 7.3 3.1 0.1 5.2 9.2 9.3 7.1 6.1 2.1 1.1 7.2 9.2 7.1 8.1 8.1 8.2 2.1 3.1 7.1 6.2 5.1 7.3 5.1 4.1 4.3 5.1 0.1 7.3 5.1 3.3 7....

output:

4977
4763
4938
4782
4988
4618
4840
4964
4825
4808
4894
4845
4948
4863
4740
4834
4858
5066
4863
4933
4814
4785
5020
5061
4776
4719
5094
4911
5018
4915
4889
4944
5056
4845
4688
4925
4905
4966
5056
4867
4993
4733
4789
4837
5136
4687
5069
5074
4907
4825
4880
4882
4932
4953
4815
4835
4867
5100
4873
5040
...

result:

ok 1000 numbers

Test #36:

score: 27
Accepted
time: 69ms
memory: 5896kb

input:

1000
1000
8.3 9.2 7.3 6.3 0.3 2.2 9.3 2.3 4.2 5.2 8.3 5.2 6.2 2.2 9.2 4.2 6.2 5.3 7.3 8.2 1.2 0.3 1.3 5.4 0.3 9.2 1.2 2.3 7.4 0.2 5.3 6.2 2.2 0.3 3.2 8.2 2.2 5.2 3.2 4.3 7.2 2.2 8.2 8.2 9.2 8.3 5.3 5.2 8.2 9.2 9.3 5.2 5.2 2.2 8.2 4.3 9.3 7.2 1.2 8.2 3.3 0.2 0.2 6.2 5.2 6.2 3.3 6.2 0.4 8.2 6.3 6.2 6....

output:

4951
4897
5050
4845
4798
5000
4826
4893
5055
5013
4935
5076
5003
5191
4986
5104
5098
4912
4993
5088
4816
4924
4973
5217
5048
4952
4881
4974
5002
4758
4976
5123
4941
4766
5069
4971
4931
5007
4904
4897
4965
4970
5004
5020
4887
4997
5138
4814
5057
5029
5233
4952
5111
5134
4951
4971
5073
5151
5248
5033
...

result:

ok 1000 numbers

Test #37:

score: 27
Accepted
time: 65ms
memory: 5784kb

input:

1000
1000
9.2 1.2 8.2 1.2 7.2 0.2 1.2 4.2 1.2 6.2 5.2 3.2 4.2 5.2 2.2 1.2 1.2 9.2 0.3 1.2 1.2 0.2 4.2 9.2 8.2 7.2 3.2 2.2 4.2 6.2 5.2 2.2 5.2 6.2 3.2 6.2 5.2 1.2 7.2 4.3 3.2 7.2 9.2 2.2 0.2 1.2 1.2 8.2 0.2 4.2 5.3 3.2 9.2 1.2 1.2 9.2 3.3 8.2 6.3 9.2 7.2 1.2 5.2 1.2 7.3 3.2 9.2 2.2 8.2 0.2 3.2 8.2 1....

output:

4956
5168
4656
5084
4973
4991
4947
5018
4947
4889
4894
4735
4882
4941
5000
4874
5130
5083
5014
4915
5086
4999
4903
4959
4905
4792
4959
5042
5069
4977
4968
4841
4999
4665
5021
4772
5047
5098
4967
4982
4988
5007
4994
5091
5093
5098
5007
4998
4893
4937
4984
5032
4879
5041
5026
4940
5063
4875
5041
4951
...

result:

ok 1000 numbers

Test #38:

score: 27
Accepted
time: 69ms
memory: 5880kb

input:

1000
1000
5.4 5.4 9.4 9.4 2.4 9.2 8.4 6.4 3.4 9.4 1.4 4.4 8.4 8.4 0.4 2.4 1.4 3.4 0.2 0.4 8.4 4.2 4.2 3.4 2.4 5.4 0.4 5.4 8.4 1.4 9.2 2.4 4.2 1.4 2.4 1.4 8.4 8.4 8.4 2.4 1.2 9.4 4.2 5.4 7.4 2.4 2.4 4.4 6.2 4.2 3.2 1.4 1.4 0.4 4.2 0.4 2.4 8.4 4.4 6.2 6.4 9.4 9.4 1.4 4.2 9.4 6.2 5.4 5.4 7.4 8.2 3.4 5....

output:

4960
4810
4960
4886
5080
4920
4834
4877
5081
5013
4809
4953
4751
5043
5075
5002
4924
5263
4919
4970
4908
5052
5213
4912
5057
4783
4787
4882
4956
5006
5061
4901
4863
4951
4911
4845
5023
5020
4922
4882
4840
5093
4656
4915
4967
4915
4849
5089
4901
5087
4860
4917
5170
4960
4983
4768
5084
5003
4928
4916
...

result:

ok 1000 numbers