QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#331180 | #1373. Rating Problems | aggrovector# | AC ✓ | 1ms | 3876kb | C++14 | 277b | 2024-02-18 03:05:56 | 2024-02-18 03:05:56 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
long long n,k,i,x;
long double s;
int main() {
cin >> n >> k;
for (i=1;i<=k;i++) {
cin >> x;
s+=x;
}
cout << fixed << setprecision(5) << (s+(n-k)*-3)/n << ' ' << (s+(n-k)*3)/n << endl;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3828kb
input:
10 0
output:
-3.00000 3.00000
result:
ok 2 numbers
Test #2:
score: 0
Accepted
time: 1ms
memory: 3796kb
input:
10 10 3 2 1 0 -1 -2 -3 -2 -1 0
output:
-0.30000 -0.30000
result:
ok 2 numbers
Test #3:
score: 0
Accepted
time: 0ms
memory: 3776kb
input:
10 10 0 0 0 0 0 0 0 0 0 0
output:
0.00000 0.00000
result:
ok 2 numbers
Test #4:
score: 0
Accepted
time: 0ms
memory: 3876kb
input:
10 10 3 3 3 3 3 3 3 3 3 3
output:
3.00000 3.00000
result:
ok 2 numbers
Test #5:
score: 0
Accepted
time: 1ms
memory: 3852kb
input:
10 10 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3
output:
-3.00000 -3.00000
result:
ok 2 numbers
Test #6:
score: 0
Accepted
time: 0ms
memory: 3744kb
input:
1 0
output:
-3.00000 3.00000
result:
ok 2 numbers
Test #7:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
1 1 2
output:
2.00000 2.00000
result:
ok 2 numbers
Test #8:
score: 0
Accepted
time: 1ms
memory: 3788kb
input:
9 7 1 3 2 2 1 1 2
output:
0.66667 2.00000
result:
ok 2 numbers
Test #9:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
6 4 -2 -1 -2 0
output:
-1.83333 0.16667
result:
ok 2 numbers