QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#180134 | #7247. Hans Zimmer | xaphoenix# | WA | 959ms | 4164kb | C++14 | 1.5kb | 2023-09-15 15:57:21 | 2023-09-15 15:57:22 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pf push_front
#define LC k<<1
#define RC k<<1|1
#define IO cin.sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define all(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define rep(i, a, n) for (int i = a; i < n; i++)
#define repn(i, a, n) for (int i = a; i <= n; i++)
#define per(i, a, n) for (int i = (n) - 1; i >= a; i--)
#define pern(i, a, n) for (int i = n; i >= a; i--)
typedef long long LL;
typedef long double LD;
typedef unsigned long long ull;
typedef pair<int, int> PII;
typedef pair<int, LL> PIL;
typedef pair<LL, int> PLI;
typedef pair<double, double> PDD;
typedef pair<ull, ull> PUU;
typedef pair<LL, LL> PLL;
const int N = 1100000;
const int M = 1100000;
const int mod = 1e9+7;
const int inf = (int)1e9;
const LL INF = 1e18;
const double eps = 1e-9;
mt19937_64 Rand((unsigned long long)new char);
#define rand Rand
int L;
int n;
LD w, h;
int main() {
IO;
cin >> w >> h >> n;
LD ans = 0;
L = 100000000 / n;
int st = max(n / 2 - L, 0), ed = min(n / 2 + L, n);
repn(i, st, ed) {
LD p = w * h;
int cnt = n;
repn(j, 1, i) {
p = p * (n - j + 1) / j;
while (p > 1.0 && cnt) p /= 2, cnt--;
}
p *= pow(0.5, cnt);
p /= (i + 1);
p /= (i + 1);
p /= (n - i + 1);
p /= (n - i + 1);
ans += p;
}
cout << fixed << setprecision(100) << (double)ans << "\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3948kb
input:
2 4 1
output:
2.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
result:
ok jury = 2, participant = 2, relative error = 0
Test #2:
score: 0
Accepted
time: 0ms
memory: 3860kb
input:
42 24 2
output:
87.5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
result:
ok jury = 87.5, participant = 87.5, relative error = 0
Test #3:
score: 0
Accepted
time: 0ms
memory: 4048kb
input:
1 1 5
output:
0.0092013888888888891587347629297255480196326971054077148437500000000000000000000000000000000000000000
result:
ok jury = 0.009201388889, participant = 0.009201388889, relative error = 1.207543499e-11
Test #4:
score: 0
Accepted
time: 0ms
memory: 3972kb
input:
1 1 1
output:
0.2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
result:
ok jury = 0.25, participant = 0.25, relative error = 0
Test #5:
score: 0
Accepted
time: 0ms
memory: 4060kb
input:
1 1000 1
output:
250.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
result:
ok jury = 250, participant = 250, relative error = 0
Test #6:
score: 0
Accepted
time: 0ms
memory: 4004kb
input:
1000 1 1
output:
250.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
result:
ok jury = 250, participant = 250, relative error = 0
Test #7:
score: 0
Accepted
time: 0ms
memory: 4036kb
input:
1000 1000 1
output:
250000.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
result:
ok jury = 250000, participant = 250000, relative error = 0
Test #8:
score: 0
Accepted
time: 0ms
memory: 4032kb
input:
1 1000 5
output:
9.2013888888888892836348532000556588172912597656250000000000000000000000000000000000000000000000000000
result:
ok jury = 9.201388889, participant = 9.201388889, relative error = 1.20754727e-11
Test #9:
score: 0
Accepted
time: 0ms
memory: 3988kb
input:
1000 1000 5
output:
9201.3888888888886867789551615715026855468750000000000000000000000000000000000000000000000000000000000000
result:
ok jury = 9201.388889, participant = 9201.388889, relative error = 1.207547579e-11
Test #10:
score: 0
Accepted
time: 1ms
memory: 4036kb
input:
1 1 10
output:
0.0009391233428172644174397598604286940826568752527236938476562500000000000000000000000000000000000000
result:
ok jury = 0.0009391233428, participant = 0.0009391233428, relative error = 1.838352954e-11
Test #11:
score: 0
Accepted
time: 0ms
memory: 3988kb
input:
1 1 2
output:
0.0868055555555555524716027093745651654899120330810546875000000000000000000000000000000000000000000000
result:
ok jury = 0.08680555556, participant = 0.08680555556, relative error = 5.120000423e-11
Test #12:
score: 0
Accepted
time: 0ms
memory: 3976kb
input:
1 1 3
output:
0.0364583333333333356462979679690761258825659751892089843750000000000000000000000000000000000000000000
result:
ok jury = 0.03645833333, participant = 0.03645833333, relative error = 9.142857899e-11
Test #13:
score: 0
Accepted
time: 0ms
memory: 3940kb
input:
1 1 4
output:
0.0174421296296296303440787056615590699948370456695556640625000000000000000000000000000000000000000000
result:
ok jury = 0.01744212963, participant = 0.01744212963, relative error = 2.123424197e-11
Test #14:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
1 1 100
output:
0.0000001507872879412450017799562440937166662990875920513644814491271972656250000000000000000000000000
result:
ok jury = 1.507872879e-07, participant = 1.507872879e-07, relative error = 2.735310077e-10
Test #15:
score: 0
Accepted
time: 0ms
memory: 4060kb
input:
1000 1000 100
output:
0.1507872879412450184410943165858043357729911804199218750000000000000000000000000000000000000000000000
result:
ok jury = 0.1507872879, participant = 0.1507872879, relative error = 2.735310647e-10
Test #16:
score: 0
Accepted
time: 5ms
memory: 4096kb
input:
1 1 1000
output:
0.0000000000159043986921659606561319133181373096722066584618460183264687657356262207031250000000000000
result:
ok jury = 1.590439869e-11, participant = 1.590439869e-11, relative error = 1.36186193e-10
Test #17:
score: 0
Accepted
time: 2ms
memory: 4164kb
input:
1000 1000 1000
output:
0.0000159043986921659604902822005012552608604892157018184661865234375000000000000000000000000000000000
result:
ok jury = 1.590439869e-05, participant = 1.590439869e-05, relative error = 1.361863183e-10
Test #18:
score: 0
Accepted
time: 430ms
memory: 4116kb
input:
1 1 10000
output:
0.0000000000000015990403998688417901343519006998416354094015969303232971299166820244863629341125488281
result:
ok jury = 1.5990404e-15, participant = 1.5990404e-15, relative error = 8.2023058e-11
Test #19:
score: 0
Accepted
time: 426ms
memory: 4068kb
input:
1000 1000 10000
output:
0.0000000015990403998688418438904894260804701033862329495605081319808959960937500000000000000000000000
result:
ok jury = 1.5990404e-09, participant = 1.5990404e-09, relative error = 8.202305052e-11
Test #20:
score: 0
Accepted
time: 959ms
memory: 4032kb
input:
1 1 100000
output:
0.0000000000000000001599904003601994819895773080505841712703996402153690877152858451637484904495067894
result:
ok jury = 1.599904004e-19, participant = 1.599904004e-19, relative error = 2.487681875e-10
Test #21:
score: 0
Accepted
time: 956ms
memory: 4004kb
input:
1000 1000 100000
output:
0.0000000000001599904003601994797940171714491352987865847856685519445818499661982059478759765625000000
result:
ok jury = 1.599904004e-13, participant = 1.599904004e-13, relative error = 2.487681702e-10
Test #22:
score: -100
Wrong Answer
time: 952ms
memory: 3860kb
input:
1 1 1000000
output:
0.0000000000000000000000025488022916286729030077390159843817776322403041987911086706332971629079819920
result:
wrong answer jury = 1.5999904e-23, participant = 2.548802292e-24, relative error = 0.840698901