码迷,mamicode.com
首页 >  
搜索关键字:coin    ( 327个结果
Coin Test
描述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 the ...
分类:其他好文   时间:2014-11-15 14:03:01    阅读次数:178
模拟抛硬币(C语言实现)
实现代码: 1 #include 2 #include 3 4 int heads() 5 { 6 return rand() coin.exe 32 1000 0 1 2 3 4 5 6 * 7 * 8 * 9 *10 **11 ****12 ******13 ********14 **...
分类:编程语言   时间:2014-11-14 17:31:33    阅读次数:327
uva357 Let Me Count The Ways
注意PE…… #include #include #include #include #include #include #include #include #include #include using namespace std; int coin[5]={1,5,10,25,50}; long long dp[30010]; int main() { int i,j; dp[0]=1;...
分类:其他好文   时间:2014-11-07 19:10:12    阅读次数:227
uva-147 - Dollars
#include #include #include #include #include #include #include #include #include #include using namespace std; int coin[11]={10000,5000,2000,1000,500,200,100,50,20,10,5}; long long dp[30010][20]; long...
分类:其他好文   时间:2014-11-07 14:55:33    阅读次数:164
UVA 147 Dollars
跟UVA 674 Coin Change 一样的。完全背包。 不过注意的是需要变换一下。 把浮点数转换为整形,全部 *20 。 coin[]={1,2,4,10,20,40,100,200,400,1000,2000}; 需要注意的是 int 会溢出,需要long long。格式控制按题意。 #include #include #include #include #include...
分类:其他好文   时间:2014-11-06 11:03:16    阅读次数:245
UVA 357 Let Me Count The Ways
跟UVA 674 Coin Change 一样。就是范围变大了而已。 不过当结果只有一种可能的时候需要输出 There is only 1 way to produce n cents change. int 会溢出,使用 long long #include #include #include #include #include #include #include #include...
分类:其他好文   时间:2014-11-06 11:01:41    阅读次数:165
uva 674 - Coin Change
#include #include #include #include #include #include #include #include #include #include using namespace std; int dp[8000]; int coin[5]={1,5,10,25,50}; int main() { int i,j,x; dp[0]=1; for(i=0;i<...
分类:其他好文   时间:2014-11-05 21:38:51    阅读次数:180
Consider N coins aligned in a row.
Consider N coins aligned in a row. Each coin is showing either heads or tails. The adjacency of these coins is the number of adjacent pairs of coins with the same side facing up. It must return the...
分类:其他好文   时间:2014-11-05 10:57:41    阅读次数:2365
UVA 674 Coin Change
DP,背包的思想。 问 最多7489块钱。有多少种组成方式。面额分别为 1,5,10,25,50; 由于不限制硬币数量,所以完全背包,累加就可以了。 #include #include #include #include #include #include #include #include #include #include #include #include #defi...
分类:其他好文   时间:2014-11-04 22:48:21    阅读次数:198
单机游戏如何防止类似八门神器这类的内存修改器的篡改办法
当下由于八门神器这类的存在,好多的单机游戏开发程序员都听蛋疼,今天看到伟哥实现了一个办法。。。。大体的思路是:1、实现一个类似与由一个值可以生成唯一的另一个值的函数(类似于C++ 的 std::hash)hashFunc2、本地保存两个相对的成员变量(this->coin, this->hash_c...
分类:其他好文   时间:2014-11-04 22:21:33    阅读次数:326
327条   上一页 1 ... 28 29 30 31 32 33 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!