GYM 101128 D.Dice Cup(概率)
来源:互联网 发布:淘宝现在什么好做 编辑:程序博客网 时间:2024/04/28 04:51
Description
给出两个规则的正n面体和正m面体的骰子,每次投x面的骰子面朝上的面是1,2,…,x的概率相同,均为1/x,问两个骰子的点数之和最可能是哪些数
Input
两个整数n和m(4<=n,m<=20)
Output
从小到大输出最大可能的点数和
Sample Input
6 6
Sample Output
7
Solution
Code
#include<cstdio>#include<iostream>#include<cstring>#include<algorithm>#include<cmath>#include<vector>#include<queue>#include<map>#include<set>#include<ctime>using namespace std;typedef long long ll;#define INF 0x3f3f3f3f#define maxn 1111int main(){ int n,m; while(~scanf("%d%d",&n,&m)) { if(n>m)swap(n,m); for(int i=n+1;i<=m+1;i++)printf("%d\n",i); } return 0;}
0 0
- GYM 101128 D.Dice Cup(概率)
- Gym-100502D Dice Game
- WHUST 2016 Summer Contest #4 D-Dice Cup
- HDU 4652 Dice (概率DP)
- HDU 4652 Dice(概率dp)
- LightOj 1064 Throwing Dice(概率dp)
- HDU 4652 Dice (概率DP)
- HDU-4599 Dice (概率DP)
- 【LightOJ 1248】Dice (III)(概率DP)
- LightOJ1248---Dice (III) (概率问题)
- Game of Dice Gym
- 8VC Venture Cup 2016 - Elimination Round (626A,626B,626C(二分),626D(概率))
- GYM 100090 E.Counterfeiters(概率)
- HDU 4518 Play the Dice(数学 概率 期望)
- hdu 4586 Play the Dice (概率+等比数列)
- UVa 10759 - Dice Throwing (概率DP+预处理)
- HDU 4586 Play the Dice(概率+期望)
- light oj 1248 - Dice (III)(概率dp)
- HANA集合操作之UNION ALL
- 用C语言写面向的对象是一种什么样的体验
- 关于自己的coder之路
- skyrim_chess_game_demo
- 单例模式
- GYM 101128 D.Dice Cup(概率)
- Cookie
- 常见404错误原因
- 最简单的android studio 2.3 引用FFmpeg例子程序
- MQTT-SN协议乱翻之简要介绍
- MySQL5.6 架构图收藏欣赏
- 值得推荐的C/C++框架和库 (真的很强大)
- CFGym
- poj 2111 记忆化搜索