05 2021 档案
摘要:#include<bits/stdc++.h> using namespace std; inline int read() { int x=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-') f=-1; ch=getchar();
阅读全文
摘要:题目描述 桌面上有R张红牌和B张黑牌,随机打乱顺序后放在桌面上,开始一张一张地翻牌,翻到红牌得到1美元,黑牌则付出1美元。可以随时停止翻牌,在最优策略下平均能得到多少钱。 输入格式 一行输入两个数R,B,其值在0到5000之间 输出格式 在最优策略下平均能得到多少钱。 样例 样例输入 5 1 样例输
阅读全文
摘要:#include<bits/stdc++.h>using namespace std;const double eps=1e-8;int n;double a[60][60],ans[60];int main(){ cin>>n; for(int i=1;i<=n;i++) for(int j=1;
阅读全文
浙公网安备 33010602011771号