357 - Let Me Count The Ways
来源:互联网 发布:易语言变速器源码 编辑:程序博客网 时间:2024/06/06 04:33
描述:这道题还好,相比起上一题没有精度问题#include <cstdio>long long s[30010];int v[6]= {1,5,10,25,50};void solve(){ s[0]=1; for(int i=0; i<5; i++) for(int j=v[i]; j<30010; j++) s[j]+=s[j-v[i]];}int main(){ int n; solve(); // freopen("a.txt","r",stdin); while(scanf("%d",&n)!=EOF) { if(s[n]==1) printf("There is only 1 way to produce %d cents change.\n",n); else printf("There are %lld ways to produce %d cents change.\n",s[n],n); } return 0;}
- uva 357 Let Me Count The Ways
- uva 357 - Let Me Count The Ways
- UVA 357 Let Me Count The Ways
- UVA 357 Let Me Count The Ways
- 357 - Let Me Count The Ways
- UVa 357 - Let Me Count The Ways
- UVa 357 - Let Me Count The Ways
- uva 357 let me count the ways
- UVa 357 - Let Me Count The Ways
- UVa 357 - Let Me Count The Ways
- UVA-357-Let Me Count The Ways
- UVA 357 Let Me Count The Ways
- UVa:357 Let Me Count The Ways
- UVa 357: Let Me Count The Ways
- UVA - 357 Let Me Count The Ways
- UVa 357 - Let Me Count The Ways
- uva 357 Let Me Count The Ways
- uva 357 - Let Me Count The Ways
- soj 2013 weekly-4 暨校赛模拟II 7904-7911
- spring的事务配置
- JAVA GUI(菜单-打开文件-保存文件)
- objective-c+中代码块(blocks)
- 写dao.imp的小细节
- 357 - Let Me Count The Ways
- yocto project glossary
- 使用Aspose.Pdf删除PDF文件中的指定表格字段
- NULL有关的问题
- sendmsg recgmsg 函数
- C++程序中如何调用C函数
- LabVIEW图表之双坐标轴
- C#实现所有经典排序算法
- 三种纯css方式实现三角形