题目链接题意: 亮亮有N个有瑕疵的硬币,有瑕疵意味着抛一枚硬币正面向上的概率 不等于 反面向上的概率 也即概率不等于0.5。 现在亮亮一次抛N个硬币 , 恰好有K个硬币正面向上 ,接着他又想抛一次 , 问:出现正面向上的个数的期望 抛硬币这个随机实验满足二项分布,即X~B(p , N) 所以...
分类:
其他好文 时间:
2015-04-30 15:40:36
阅读次数:
132
原题地址背包问题,没啥好说的,记得用long long,否则会爆代码: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 #define MAX_N ...
分类:
其他好文 时间:
2015-04-30 00:48:03
阅读次数:
231
DescriptionSuppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with these coins for a given amo...
分类:
其他好文 时间:
2015-04-28 22:15:28
阅读次数:
124
先考虑两种简单的情况:如果先手能一次把硬币拿完,即 k >= n ,那么先手胜如果每次只能拿一个硬币, 即 k = 1 ,那么如果有奇数个硬币先手胜,如果有偶数个硬币后手胜。剩下的情况就是先手一次拿不完,而且每次可以拿一个或者拿两个硬币。剩下的硬币会变成一条链,如果后手能拿完最好,不能拿完的话就拿一...
分类:
其他好文 时间:
2015-04-28 15:45:43
阅读次数:
120
Coin ChangeTime Limit: 1000msMemory Limit: 32768KBThis problem will be judged onHDU. Original ID:206964-bit integer IO format:%I64d Java class name:Ma...
分类:
其他好文 时间:
2015-04-13 00:07:47
阅读次数:
200
转自http://outofmemory.cn/wr/?u=http%3A%2F%2Fwww.gocalf.com%2Fblog%2Funbalanced-coin.html利用等概率Rand5产生等概率Rand3问题本身很明确,但不知道起个什么题目好,姑且先这么说吧。问题描述:现在有一个叫做Ran...
分类:
其他好文 时间:
2015-04-12 14:41:22
阅读次数:
172
Problem Description
Suppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with these coins for a given amount of money.
For example, if we have 11 cents, then we can make changes with one 10-cent coin a...
分类:
其他好文 时间:
2015-04-08 16:35:21
阅读次数:
132
1231 - Coin Change (I)
PDF (English)
Statistics
Forum
Time Limit: 1 second(s)
Memory Limit: 32 MB
In a strange shop there are n types of coins of valueA1, A...
分类:
其他好文 时间:
2015-04-06 08:47:53
阅读次数:
180
题意:给出1,5,10,25,50五种硬币,再给出n,问有多少种不同的方案能够凑齐n自己写的时候写出来方案数老是更少(用的一维的)后来搜题解发现,要用二维的来写http://blog.csdn.net/keshuai19940722/article/details/11025971这一篇说的是会有面...
分类:
其他好文 时间:
2015-04-02 01:05:25
阅读次数:
164
Coin Test
时间限制:3000 ms | 内存限制:65535 KB
难度:1
描述
As is known to all,if you throw a coin up and let it droped on the desk there are usually three results. Yes,just believe what I say ~it can be...
分类:
其他好文 时间:
2015-03-19 22:12:27
阅读次数:
111