QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#394647 | #1373. Rating Problems | Al-Hassan_Mohamed# | AC ✓ | 0ms | 3996kb | C++20 | 594b | 2024-04-20 17:12:21 | 2024-04-20 17:12:21 |
Judging History
answer
#include <bits/stdc++.h>
#define sz(x) (int)x.size()
#define bigint __int128
#define el '\n'
#define ll long long
#define ld long double
using namespace std;
void acc() {
ld n, k;
cin >> n >> k;
ld sum = 0;
for (ll i = 0; i < k; i++) {
ld x;
cin >> x;
sum += x;
}
cout << fixed << setprecision(5);
cout << (sum + (-3 * (n - k))) / n << ' ' << (sum + (3 * (n - k))) / n;
}
int main() {
cout.tie(0);
cin.tie(0);
ios_base::sync_with_stdio(0);
int t = 1;
// cin >> t;
while (t--)acc();
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3888kb
input:
10 0
output:
-3.00000 3.00000
result:
ok 2 numbers
Test #2:
score: 0
Accepted
time: 0ms
memory: 3996kb
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: 3744kb
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: 3868kb
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: 0ms
memory: 3868kb
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: 3936kb
input:
1 0
output:
-3.00000 3.00000
result:
ok 2 numbers
Test #7:
score: 0
Accepted
time: 0ms
memory: 3888kb
input:
1 1 2
output:
2.00000 2.00000
result:
ok 2 numbers
Test #8:
score: 0
Accepted
time: 0ms
memory: 3876kb
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: 3880kb
input:
6 4 -2 -1 -2 0
output:
-1.83333 0.16667
result:
ok 2 numbers