QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#180142#7247. Hans Zimmerxaphoenix#AC ✓92ms3992kbC++141.4kb2023-09-15 16:03:322023-09-15 16:03:33

Judging History

你现在查看的是最新测评结果

  • [2023-09-15 16:03:33]
  • 评测
  • 测评结果:AC
  • 用时:92ms
  • 内存:3992kb
  • [2023-09-15 16:03:32]
  • 提交

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;
	int cnt = n;
	LD base = w * h;
	repn(i, 0, n) {
		if (i) base = base * (n - i + 1) / i;
		while (base > 1 && cnt) base /= 2, cnt--;
		LD p = base;
		p /= (i + 1);
		p /= (i + 1);
		p /= (n - i + 1);
		p /= (n - i + 1);
		ans += p * pow(0.5, cnt);
	}
	cout << fixed << setprecision(100) << (double)ans << "\n";
	return 0;
}

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3844kb

input:

2 4 1

output:

2.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

result:

ok jury = 2, participant = 2, relative error = 0

Test #2:

score: 0
Accepted
time: 1ms
memory: 3772kb

input:

42 24 2

output:

87.5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

result:

ok jury = 87.5, participant = 87.5, relative error = 0

Test #3:

score: 0
Accepted
time: 1ms
memory: 3864kb

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: 1ms
memory: 3792kb

input:

1 1 1

output:

0.2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

result:

ok jury = 0.25, participant = 0.25, relative error = 0

Test #5:

score: 0
Accepted
time: 1ms
memory: 3876kb

input:

1 1000 1

output:

250.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

result:

ok jury = 250, participant = 250, relative error = 0

Test #6:

score: 0
Accepted
time: 1ms
memory: 3804kb

input:

1000 1 1

output:

250.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

result:

ok jury = 250, participant = 250, relative error = 0

Test #7:

score: 0
Accepted
time: 1ms
memory: 3872kb

input:

1000 1000 1

output:

250000.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

result:

ok jury = 250000, participant = 250000, relative error = 0

Test #8:

score: 0
Accepted
time: 1ms
memory: 3820kb

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: 1ms
memory: 3808kb

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: 3752kb

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: 1ms
memory: 3804kb

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: 1ms
memory: 3776kb

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: 3704kb

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: 1ms
memory: 3860kb

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: 1ms
memory: 3772kb

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: 0ms
memory: 3912kb

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: 1ms
memory: 3976kb

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: 1ms
memory: 3992kb

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: 1ms
memory: 3908kb

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: 3ms
memory: 3972kb

input:

1 1 100000

output:

0.0000000000000000001599904003999868835246843360916970083906731367035840220454379068115713380393572152

result:

ok jury = 1.599904004e-19, participant = 1.599904004e-19, relative error = 8.200740615e-14

Test #21:

score: 0
Accepted
time: 1ms
memory: 3808kb

input:

1000 1000 100000

output:

0.0000000000001599904003999868723065275960249256115102128167348993770247034262865781784057617187500000

result:

ok jury = 1.599904004e-13, participant = 1.599904004e-13, relative error = 8.204645673e-14

Test #22:

score: 0
Accepted
time: 92ms
memory: 3924kb

input:

1 1 1000000

output:

0.0000000000000000000000159999040004000001407951984499983125776116307582994421193894191146611660769850

result:

ok jury = 1.5999904e-23, participant = 1.5999904e-23, relative error = 2.500015978e-11

Test #23:

score: 0
Accepted
time: 79ms
memory: 3792kb

input:

1000 1000 1000000

output:

0.0000000000000000159999040003999974083820898506074460544429247159338089434577057090791640803217887878

result:

ok jury = 1.5999904e-17, participant = 1.5999904e-17, relative error = 2.500006883e-11

Test #24:

score: 0
Accepted
time: 0ms
memory: 3920kb

input:

1 1 123456

output:

0.0000000000000000000688731695147357440592344127772256573802315553948899236411801405566279754566494375

result:

ok jury = 6.887316951e-20, participant = 6.887316951e-20, relative error = 6.876032272e-11

Test #25:

score: 0
Accepted
time: 3ms
memory: 3824kb

input:

1000 1000 123456

output:

0.0000000000000688731695147357337601314421720432095780839096277325950268277665600180625915527343750000

result:

ok jury = 6.887316951e-14, participant = 6.887316951e-14, relative error = 6.876012364e-11

Test #26:

score: 0
Accepted
time: 26ms
memory: 3928kb

input:

1 1 424243

output:

0.0000000000000000000004939182799384576813392788602128260749663317178670735231620818675435380384897144

result:

ok jury = 4.939182799e-22, participant = 4.939182799e-22, relative error = 7.786239713e-11

Test #27:

score: 0
Accepted
time: 23ms
memory: 3920kb

input:

1000 1000 424243

output:

0.0000000000000004939182799384576685258261989614975401032784686067289570132743392605334520339965820312

result:

ok jury = 4.939182799e-16, participant = 4.939182799e-16, relative error = 7.786239332e-11

Test #28:

score: 0
Accepted
time: 0ms
memory: 3768kb

input:

1 1 20

output:

0.0000753731487305575039792673863736638395494082942605018615722656250000000000000000000000000000000000

result:

ok jury = 7.537314873e-05, participant = 7.537314873e-05, relative error = 7.396670021e-12

Test #29:

score: 0
Accepted
time: 1ms
memory: 3820kb

input:

1 1 30

output:

0.0000162971064032071408852076627171712175368156749755144119262695312500000000000000000000000000000000

result:

ok jury = 1.62971064e-05, participant = 1.62971064e-05, relative error = 1.967920622e-10

Test #30:

score: 0
Accepted
time: 1ms
memory: 3844kb

input:

1 1 50

output:

0.0000022768228277982377745860577411551872728523449040949344635009765625000000000000000000000000000000

result:

ok jury = 2.276822828e-06, participant = 2.276822828e-06, relative error = 8.86157669e-11

Test #31:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

1 1 200

output:

0.0000000097061491119702701806012381732791105548585619544610381126403808593750000000000000000000000000

result:

ok jury = 9.706149112e-09, participant = 9.706149112e-09, relative error = 3.063060873e-12

Test #32:

score: 0
Accepted
time: 0ms
memory: 3776kb

input:

1 1 300

output:

0.0000000019363452300390618337144232240449107096402769911946961656212806701660156250000000000000000000

result:

ok jury = 1.93634523e-09, participant = 1.93634523e-09, relative error = 2.017302982e-11

Test #33:

score: 0
Accepted
time: 1ms
memory: 3860kb

input:

1 1 500

output:

0.0000000002529534331279376478082165963001725142444975347189028980210423469543457031250000000000000000

result:

ok jury = 2.529534331e-10, participant = 2.529534331e-10, relative error = 1.104458752e-10

Test #34:

score: 0
Accepted
time: 1ms
memory: 3796kb

input:

1 1 700

output:

0.0000000000660710939677134564678282172818328792790465442408276430796831846237182617187500000000000000

result:

ok jury = 6.607109397e-11, participant = 6.607109397e-11, relative error = 3.460737208e-11

Test #35:

score: 0
Accepted
time: 0ms
memory: 3968kb

input:

1 1 2000

output:

0.0000000000009970062397662927802106198850930336393446479226199130607710685580968856811523437500000000

result:

ok jury = 9.970062398e-13, participant = 9.970062398e-13, relative error = 3.380842037e-11

Test #36:

score: 0
Accepted
time: 2ms
memory: 3832kb

input:

1 1 3000

output:

0.0000000000001971363505667082275643745314825712234868982514202073730302799958735704421997070312500000

result:

ok jury = 1.971363506e-13, participant = 1.971363506e-13, relative error = 1.688768859e-10

Test #37:

score: 0
Accepted
time: 1ms
memory: 3920kb

input:

1 1 5000

output:

0.0000000000000255693055832170857569554677150801982929548186035395573867390339728444814682006835937500

result:

ok jury = 2.556930558e-14, participant = 2.556930558e-14, relative error = 1.258182473e-10

Test #38:

score: 0
Accepted
time: 1ms
memory: 3972kb

input:

1 1 7000

output:

0.0000000000000066581815384121975033434177845327339349633779044812520453433535294607281684875488281250

result:

ok jury = 6.658181538e-15, participant = 6.658181538e-15, relative error = 6.190837176e-11

Test #39:

score: 0
Accepted
time: 1ms
memory: 3804kb

input:

1 1 20000

output:

0.0000000000000000999700062489751580058217305928985799537440842051257139377895555298891849815845489502

result:

ok jury = 9.997000625e-17, participant = 9.997000625e-17, relative error = 1.02514873e-11

Test #40:

score: 0
Accepted
time: 2ms
memory: 3924kb

input:

1 1 30000

output:

0.0000000000000000197491363511059960739657232833151520362513008062044575496862819363741436973214149475

result:

ok jury = 1.974913635e-17, participant = 1.974913635e-17, relative error = 5.600221171e-11

Test #41:

score: 0
Accepted
time: 1ms
memory: 3912kb

input:

1 1 50000

output:

0.0000000000000000025596928255983208956036782723393594738309492017414590106505478672715980792418122292

result:

ok jury = 2.559692826e-18, participant = 2.559692826e-18, relative error = 1.569247933e-10

Test #42:

score: 0
Accepted
time: 1ms
memory: 3916kb

input:

1 1 70000

output:

0.0000000000000000006663318889236734769205881988066691438661679096240326568983958210878881800454109907

result:

ok jury = 6.663318889e-19, participant = 6.663318889e-19, relative error = 3.552799284e-11

Test #43:

score: 0
Accepted
time: 4ms
memory: 3892kb

input:

1 1 200000

output:

0.0000000000000000000099997000062498975134947836973224047477366326196103920155664607216650097143428866

result:

ok jury = 9.999700006e-21, participant = 9.999700006e-21, relative error = 2.499044304e-11

Test #44:

score: 0
Accepted
time: 10ms
memory: 3924kb

input:

1 1 300000

output:

0.0000000000000000000019752691363511599088920634947298928012668458063550015301867296413362851126294117

result:

ok jury = 1.975269136e-21, participant = 1.975269136e-21, relative error = 1.777782282e-10

Test #45:

score: 0
Accepted
time: 34ms
memory: 3896kb

input:

1 1 500000

output:

0.0000000000000000000002559969280255998409649002551637935127761849047706275991375161026064599667506627

result:

ok jury = 2.55996928e-22, participant = 2.55996928e-22, relative error = 1.000005044e-10

Extra Test:

score: 0
Extra Test Passed