QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#466598#968. Extreme WealthKevin5307WA 5ms3964kbC++231.1kb2024-07-07 23:04:282024-07-07 23:04:29

Judging History

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

  • [2024-07-07 23:04:29]
  • 评测
  • 测评结果:WA
  • 用时:5ms
  • 内存:3964kb
  • [2024-07-07 23:04:28]
  • 提交

answer

//Author: Kevin
#include<bits/stdc++.h>
//#pragma GCC optimize("O2")
using namespace std;
#define ll long long
#define ull unsigned ll
#define pb emplace_back
#define mp make_pair
#define ALL(x) (x).begin(),(x).end()
#define rALL(x) (x).rbegin(),(x).rend()
#define srt(x) sort(ALL(x))
#define rev(x) reverse(ALL(x))
#define rsrt(x) sort(rALL(x))
#define sz(x) (int)(x.size())
#define inf 0x3f3f3f3f
#define pii pair<int,int>
#define lb(v,x) (int)(lower_bound(ALL(v),x)-v.begin())
#define ub(v,x) (int)(upper_bound(ALL(v),x)-v.begin())
#define uni(v) v.resize(unique(ALL(v))-v.begin())
#define longer __int128_t
void die(string S){puts(S.c_str());exit(0);}
const long double pi=acos(-1.0);
long double get(ll x)
{
	if(x<=10000)
	{
		long double ret=1;
		for(int i=1;i<=x;i++)
			ret=ret/(i+x)*i*4;
		return ret;
	}
	return sqrtl(pi*x);
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	ll a,b;
	cin>>a>>b;
	if(a<b) swap(a,b);
	long double val=get(a);
	for(ll i=a;i>b;i--)
	{
		val=val/2/i*(i+a);
		if(val>1e9) die("Extreme Wealth");
	}
	cout<<fixed<<setprecision(15)<<val<<endl;
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 2

output:

3.200000000000000

result:

ok OK 3.20000000, real ans = 3.20000000, error = 0.00000000

Test #2:

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

input:

0 29

output:

536870912.000000000000000

result:

ok OK 536870912.00000000, real ans = 536870912.00000000, error = 0.00000000

Test #3:

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

input:

30 0

output:

Extreme Wealth

result:

ok OK Extreme Wealth, real ans = 1073741824.00000000

Test #4:

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

input:

37 73

output:

5028.488859583218828

result:

ok OK 5028.48885958, real ans = 5028.48885958, error = 0.00000000

Test #5:

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

input:

10000000000 10000000000

output:

177245.385090551599276

result:

ok OK 177245.38509055, real ans = 177245.38509055, error = 0.00000000

Test #6:

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

input:

10000000000 9999412550

output:

989753719.132436910411343

result:

ok OK 989753719.13243687, real ans = 989753719.13242424, error = 0.00000000

Test #7:

score: 0
Accepted
time: 5ms
memory: 3812kb

input:

10000000000 9999412400

output:

994124819.343318026105408

result:

ok OK 994124819.34331799, real ans = 994124819.34340525, error = 0.00000000

Test #8:

score: 0
Accepted
time: 5ms
memory: 3964kb

input:

10000000000 9999412200

output:

999984746.742036183539312

result:

ok OK 999984746.74203622, real ans = 999984746.74201429, error = 0.00000000

Test #9:

score: 0
Accepted
time: 5ms
memory: 3616kb

input:

10000000000 9999412199

output:

Extreme Wealth

result:

ok OK Extreme Wealth, real ans = 1000014138.02130949

Test #10:

score: 0
Accepted
time: 5ms
memory: 3628kb

input:

10000000000 9999411862

output:

Extreme Wealth

result:

ok OK Extreme Wealth, real ans = 1009971237.25187039

Test #11:

score: 0
Accepted
time: 5ms
memory: 3536kb

input:

10000000000 9999411861

output:

Extreme Wealth

result:

ok OK Extreme Wealth, real ans = 1010000939.12199187

Test #12:

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

input:

1000000000 100000000

output:

Extreme Wealth

result:

ok OK Extreme Wealth, real ans = 2000288524.07298231

Test #13:

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

input:

999900000 999999999

output:

682861.861520462538465

result:

ok OK 682861.86152046, real ans = 682861.86152047, error = 0.00000000

Test #14:

score: -100
Wrong Answer
time: 0ms
memory: 3904kb

input:

100000 100500

output:

1046.822905507078226

result:

wrong answer WA 1046.82290551, real ans = 1046.82420753, error = 0.00000124