QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#208008 | #1373. Rating Problems | rlong | AC ✓ | 0ms | 3980kb | C++14 | 301b | 2023-10-09 03:25:29 | 2023-10-09 03:25:30 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
double n, k;
cin >> n >> k;
double cur = 0.0;
for(int i=1;i<=k;i++) {
double x;
cin >> x;
cur += x;
}
cout << (cur - 3.0 * (n-k)) / n << " " << (cur + 3.0 * (n-k)) / n << endl;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3812kb
input:
10 0
output:
-3 3
result:
ok 2 numbers
Test #2:
score: 0
Accepted
time: 0ms
memory: 3864kb
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: 3980kb
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: 3968kb
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: 3908kb
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: 3844kb
input:
1 0
output:
-3 3
result:
ok 2 numbers
Test #7:
score: 0
Accepted
time: 0ms
memory: 3916kb
input:
1 1 2
output:
2 2
result:
ok 2 numbers
Test #8:
score: 0
Accepted
time: 0ms
memory: 3844kb
input:
9 7 1 3 2 2 1 1 2
output:
0.666667 2
result:
ok 2 numbers
Test #9:
score: 0
Accepted
time: 0ms
memory: 3872kb
input:
6 4 -2 -1 -2 0
output:
-1.83333 0.166667
result:
ok 2 numbers