QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#142271 | #1373. Rating Problems | Anwar_Gehad_Maghraby# | AC ✓ | 1ms | 3740kb | C++23 | 462b | 2023-08-18 21:18:50 | 2023-08-18 21:18:52 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll ;
const int N = 1e5 + 10;
int main() {
cin.tie(0);cin.sync_with_stdio(0);
cout.tie(0);cout.sync_with_stdio(0);
int n, k;
cin>>n>>k;
double mn= (n - k) * -3;
double mx= (n - k) * 3;
for(int i = 0; i < k; i++){
int x; cin>>x;
mn += x;
mx += x;
}
cout<<fixed<<setprecision(10)<<mn / n<<" "<<mx / n<<"\n";
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3740kb
input:
10 0
output:
-3.0000000000 3.0000000000
result:
ok 2 numbers
Test #2:
score: 0
Accepted
time: 1ms
memory: 3676kb
input:
10 10 3 2 1 0 -1 -2 -3 -2 -1 0
output:
-0.3000000000 -0.3000000000
result:
ok 2 numbers
Test #3:
score: 0
Accepted
time: 1ms
memory: 3676kb
input:
10 10 0 0 0 0 0 0 0 0 0 0
output:
0.0000000000 0.0000000000
result:
ok 2 numbers
Test #4:
score: 0
Accepted
time: 1ms
memory: 3732kb
input:
10 10 3 3 3 3 3 3 3 3 3 3
output:
3.0000000000 3.0000000000
result:
ok 2 numbers
Test #5:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
10 10 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3
output:
-3.0000000000 -3.0000000000
result:
ok 2 numbers
Test #6:
score: 0
Accepted
time: 1ms
memory: 3664kb
input:
1 0
output:
-3.0000000000 3.0000000000
result:
ok 2 numbers
Test #7:
score: 0
Accepted
time: 1ms
memory: 3724kb
input:
1 1 2
output:
2.0000000000 2.0000000000
result:
ok 2 numbers
Test #8:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
9 7 1 3 2 2 1 1 2
output:
0.6666666667 2.0000000000
result:
ok 2 numbers
Test #9:
score: 0
Accepted
time: 1ms
memory: 3728kb
input:
6 4 -2 -1 -2 0
output:
-1.8333333333 0.1666666667
result:
ok 2 numbers