QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#395520 | #1373. Rating Problems | zedanov | AC ✓ | 1ms | 3952kb | C++20 | 595b | 2024-04-21 15:53:51 | 2024-04-21 15:53:52 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define zedanov \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define ll long long
#define el "\n"
void doWork()
{
int n, k;
cin >> n >> k;
double sum = 0;
for (int i = 0, x; i < k; i++)
{
cin >> x;
sum += x;
}
double rem = n - k;
cout << (sum + (-3 * rem)) / n << " " << (sum + (3 * rem)) / n;
}
signed main()
{
zedanov int t = 1;
// cin >> t;
while (t--)
doWork();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3912kb
input:
10 0
output:
-3 3
result:
ok 2 numbers
Test #2:
score: 0
Accepted
time: 0ms
memory: 3868kb
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: 3776kb
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: 3908kb
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: 3856kb
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: 3860kb
input:
1 0
output:
-3 3
result:
ok 2 numbers
Test #7:
score: 0
Accepted
time: 1ms
memory: 3912kb
input:
1 1 2
output:
2 2
result:
ok 2 numbers
Test #8:
score: 0
Accepted
time: 1ms
memory: 3952kb
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: 3912kb
input:
6 4 -2 -1 -2 0
output:
-1.83333 0.166667
result:
ok 2 numbers