QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#142273#1373. Rating ProblemsA3bat_team_f_Masr#AC ✓1ms3816kbC++14346b2023-08-18 21:20:062023-08-18 21:20:09

Judging History

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

  • [2023-08-18 21:20:09]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3816kb
  • [2023-08-18 21:20:06]
  • 提交

answer

#include <iostream>
#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n,k;
    cin>>n>>k;
    double sum=0;
    for(int i=0;i<k;i++)
    {
        int x;
        cin>>x;
        sum+=x;
    }
    double tmp1=sum+(n-k)*3,tmp2=sum-(n-k)*3;
    cout<<fixed<<setprecision(10)<<tmp2/n<<" "<<tmp1/n;
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3660kb

input:

10 0

output:

-3.0000000000 3.0000000000

result:

ok 2 numbers

Test #2:

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

input:

10 10
3
2
1
0
-1
-2
-3
-2
-1
0

output:

-0.3000000000 -0.3000000000

result:

ok 2 numbers

Test #3:

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

input:

10 10
0
0
0
0
0
0
0
0
0
0

output:

0.0000000000 0.0000000000

result:

ok 2 numbers

Test #4:

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

input:

10 10
3
3
3
3
3
3
3
3
3
3

output:

3.0000000000 3.0000000000

result:

ok 2 numbers

Test #5:

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

input:

10 10
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3

output:

-3.0000000000 -3.0000000000

result:

ok 2 numbers

Test #6:

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

input:

1 0

output:

-3.0000000000 3.0000000000

result:

ok 2 numbers

Test #7:

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

input:

1 1
2

output:

2.0000000000 2.0000000000

result:

ok 2 numbers

Test #8:

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

input:

9 7
1
3
2
2
1
1
2

output:

0.6666666667 2.0000000000

result:

ok 2 numbers

Test #9:

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

input:

6 4
-2
-1
-2
0

output:

-1.8333333333 0.1666666667

result:

ok 2 numbers