QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#394618 | #1373. Rating Problems | rania__# | AC ✓ | 0ms | 3980kb | C++14 | 441b | 2024-04-20 16:54:45 | 2024-04-20 16:54:45 |
Judging History
answer
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios::sync_with_stdio(false);
cout.tie(nullptr);
cin.tie(nullptr);
int n , k;
cin >> n >> k;
int sum = 0 ;
for (int i = 0,x; i < k; ++i) {
cin >> x;
sum += x;
}
cout << fixed << setprecision(6 ) << (1.0 * sum + (n-k)*(-3)) / n << " " << (1.0 * sum + (n-k)*(3)) / n << endl;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3884kb
input:
10 0
output:
-3.000000 3.000000
result:
ok 2 numbers
Test #2:
score: 0
Accepted
time: 0ms
memory: 3928kb
input:
10 10 3 2 1 0 -1 -2 -3 -2 -1 0
output:
-0.300000 -0.300000
result:
ok 2 numbers
Test #3:
score: 0
Accepted
time: 0ms
memory: 3872kb
input:
10 10 0 0 0 0 0 0 0 0 0 0
output:
0.000000 0.000000
result:
ok 2 numbers
Test #4:
score: 0
Accepted
time: 0ms
memory: 3884kb
input:
10 10 3 3 3 3 3 3 3 3 3 3
output:
3.000000 3.000000
result:
ok 2 numbers
Test #5:
score: 0
Accepted
time: 0ms
memory: 3928kb
input:
10 10 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3
output:
-3.000000 -3.000000
result:
ok 2 numbers
Test #6:
score: 0
Accepted
time: 0ms
memory: 3872kb
input:
1 0
output:
-3.000000 3.000000
result:
ok 2 numbers
Test #7:
score: 0
Accepted
time: 0ms
memory: 3884kb
input:
1 1 2
output:
2.000000 2.000000
result:
ok 2 numbers
Test #8:
score: 0
Accepted
time: 0ms
memory: 3980kb
input:
9 7 1 3 2 2 1 1 2
output:
0.666667 2.000000
result:
ok 2 numbers
Test #9:
score: 0
Accepted
time: 0ms
memory: 3924kb
input:
6 4 -2 -1 -2 0
output:
-1.833333 0.166667
result:
ok 2 numbers