标签:size each tracking order rac dcl width family word
#include <stdio.h>
int main()
{
puts("转载请注明出处[辗转山河弋流歌 by 空灰冰魂]谢谢");
puts("网址:blog.csdn.net/vmurder/article/details/46468557");
}
并没有什么卵用,首先有一个神思路。然后神推公式。以下这篇博客写得非常详尽、、另外题意是买第
=a800”>http://blog.csdn.net/pygbingshen/article/details/24852081?=a800
假设是考试,我宁可各种随机然后打表,好歹能过30%的小数据?
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define N 10100
using namespace std;
double f[N],g[N],m;
int main()
{
int i,n;
while(scanf("%d",&n)!=EOF)
{
f[n]=g[n]=0;
for(i=n-1;~i;i--)g[i]=g[i+1]+(double)n/(n-i);
for(i=n-1;~i;i--)
{
f[i]=(f[i+1]+g[i+1])*(n-i);
f[i]=f[i]/n+g[i]*i/n+1.0;
f[i]=f[i]*n/(n-i);
}
printf("%.2lf\n",f[0]);
}
return 0;
}
标签:size each tracking order rac dcl width family word
原文地址:http://www.cnblogs.com/llguanli/p/7353178.html