QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#331201 | #1373. Rating Problems | ltz# | AC ✓ | 1ms | 3884kb | C++14 | 640b | 2024-02-18 03:22:41 | 2024-02-18 03:22:42 |
Judging History
answer
#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#define MAXN 5000005
#define MAXS 5005
#define ll long long
using namespace std;
int n, k, a[MAXN];
void solve() {
cin >> n >> k;
double already = 0;
for (int i = 0; i < k; i++) {
int tmp; cin >> tmp;
already += tmp;
}
cout << ((n - k) * -3 + already) / n << " " << ((n - k) * 3 + already) / n << endl;
}
int main() {
int _ = 1;
//cin >> _;
while(_--) {
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3800kb
input:
10 0
output:
-3 3
result:
ok 2 numbers
Test #2:
score: 0
Accepted
time: 0ms
memory: 3812kb
input:
10 10 3 2 1 0 -1 -2 -3 -2 -1 0
output:
-0.3 -0.3
result:
ok 2 numbers
Test #3:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
10 10 0 0 0 0 0 0 0 0 0 0
output:
0 0
result:
ok 2 numbers
Test #4:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
10 10 3 3 3 3 3 3 3 3 3 3
output:
3 3
result:
ok 2 numbers
Test #5:
score: 0
Accepted
time: 0ms
memory: 3756kb
input:
10 10 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3
output:
-3 -3
result:
ok 2 numbers
Test #6:
score: 0
Accepted
time: 0ms
memory: 3884kb
input:
1 0
output:
-3 3
result:
ok 2 numbers
Test #7:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
1 1 2
output:
2 2
result:
ok 2 numbers
Test #8:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
9 7 1 3 2 2 1 1 2
output:
0.666667 2
result:
ok 2 numbers
Test #9:
score: 0
Accepted
time: 1ms
memory: 3836kb
input:
6 4 -2 -1 -2 0
output:
-1.83333 0.166667
result:
ok 2 numbers