QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#799235#667. Randomized Binary Search TreeKazemaruWA 0ms3932kbC++17435b2024-12-05 08:52:382024-12-05 08:52:39

Judging History

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

  • [2024-12-05 08:52:39]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3932kb
  • [2024-12-05 08:52:38]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define f(i,j,k) for(int i=j;i<=k;++i)
#define g(i,j,k) for(int i=j;i>=k;--i)
int n,m,s,l;
const int N=5e4;
double f[N],g[N],h[N];
signed main(){
	cin>>n;
	f(p,1,n){
		if(p>50){h[p]=1;continue;}f[0]=1;
		f(i,0,n)f(j,0,n-i)g[i+j+1]+=f[i]*f[j];
		f(i,0,n)f[i]=g[i]/i,g[i]=0;h[p]=f[n];
	}
	f(p,1,n)cout<<p<<" ",printf("%.5lf\n",h[p]-h[p-1]);
	return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3932kb

input:

1

output:

1 1.00000

result:

wrong output format Extra information in the output file