ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#199288 | #2807. 小明的涂色 | snow_trace | 100 | 170ms | 1376kb | C++11 | 465b | 2023-12-09 11:06:25 | 2023-12-09 12:09:36 |
answer
#include<bits/stdc++.h>
using namespace std;
#define lowbit(x) x&(-x)
#define endl '\n'
long long n,m,k;
signed main(){
cin>>k>>n>>m;long double ans = 0;
long long tot= n*m*n*m;
for(long long i = 1;i<=n;i++){
for(long long j = 1;j<=m;j++){
long long sum = 0;sum = (i*j)*(n-i+1)*(m-j+1)*4-2*i*(n-i+1)-2*j*(m-j+1)+1;
// cout<<sum<<" "<<tot<<endl;
ans+=1-pow(1-1.0*sum/tot,k);
}
}cout<<fixed<<setprecision(2)<< ans << endl;
return 0;
}
详细
小提示:点击横条可展开更详细的信息
Test #1:
score: 10
Accepted
time: 1ms
memory: 1264kb
input:
1 2 2
output:
2.25
result:
ok single line: '2.25'
Test #2:
score: 10
Accepted
time: 0ms
memory: 1272kb
input:
1 20 20
output:
58.52
result:
ok single line: '58.52'
Test #3:
score: 10
Accepted
time: 0ms
memory: 1268kb
input:
1 19 16
output:
46.18
result:
ok single line: '46.18'
Test #4:
score: 10
Accepted
time: 5ms
memory: 1324kb
input:
100 59 990
output:
55484.94
result:
ok single line: '55484.94'
Test #5:
score: 10
Accepted
time: 11ms
memory: 1368kb
input:
32 407 341
output:
116240.55
result:
ok single line: '116240.55'
Test #6:
score: 10
Accepted
time: 32ms
memory: 1368kb
input:
22 746 624
output:
361402.19
result:
ok single line: '361402.19'
Test #7:
score: 10
Accepted
time: 32ms
memory: 1328kb
input:
74 481 873
output:
385866.87
result:
ok single line: '385866.87'
Test #8:
score: 10
Accepted
time: 0ms
memory: 1372kb
input:
50 164 158
output:
23216.24
result:
ok single line: '23216.24'
Test #9:
score: 10
Accepted
time: 15ms
memory: 1324kb
input:
77 412 452
output:
171908.35
result:
ok single line: '171908.35'
Test #10:
score: 10
Accepted
time: 74ms
memory: 1376kb
input:
100 1000 1000
output:
936523.83
result:
ok single line: '936523.83'