QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#394633 | #1373. Rating Problems | KareemEssam# | AC ✓ | 1ms | 3984kb | C++14 | 972b | 2024-04-20 17:05:06 | 2024-04-20 17:05:08 |
Judging History
answer
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
template<typename T>
using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long double ld;
#define lmao ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
const ll N = 1e5 + 5 , M = 1e4+5 , MOD = 1e9 + 7, LOG = 20 , Msk = 21 , pw1 = 31 , pwe2 = 37 ;
void testCase() {
ll m,nn;
ld sum=0,n;
cin>>n>>m;
nn=n;
n-=m;
for(int i=0;i<m;i++)
{
int x;
cin>>x;
sum+=x;
}
cout << fixed << setprecision(8) << (sum+(n*-3.0))/nn <<' '<< fixed << setprecision(8) <<(sum+(n*3.0))/nn;
}
signed main() {
lmao
int t = 1;
// cin >> t;
while (t--)
testCase();
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3724kb
input:
10 0
output:
-3.00000000 3.00000000
result:
ok 2 numbers
Test #2:
score: 0
Accepted
time: 0ms
memory: 3940kb
input:
10 10 3 2 1 0 -1 -2 -3 -2 -1 0
output:
-0.30000000 -0.30000000
result:
ok 2 numbers
Test #3:
score: 0
Accepted
time: 1ms
memory: 3984kb
input:
10 10 0 0 0 0 0 0 0 0 0 0
output:
0.00000000 0.00000000
result:
ok 2 numbers
Test #4:
score: 0
Accepted
time: 0ms
memory: 3948kb
input:
10 10 3 3 3 3 3 3 3 3 3 3
output:
3.00000000 3.00000000
result:
ok 2 numbers
Test #5:
score: 0
Accepted
time: 1ms
memory: 3852kb
input:
10 10 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3
output:
-3.00000000 -3.00000000
result:
ok 2 numbers
Test #6:
score: 0
Accepted
time: 0ms
memory: 3896kb
input:
1 0
output:
-3.00000000 3.00000000
result:
ok 2 numbers
Test #7:
score: 0
Accepted
time: 1ms
memory: 3984kb
input:
1 1 2
output:
2.00000000 2.00000000
result:
ok 2 numbers
Test #8:
score: 0
Accepted
time: 0ms
memory: 3976kb
input:
9 7 1 3 2 2 1 1 2
output:
0.66666667 2.00000000
result:
ok 2 numbers
Test #9:
score: 0
Accepted
time: 1ms
memory: 3980kb
input:
6 4 -2 -1 -2 0
output:
-1.83333333 0.16666667
result:
ok 2 numbers