HDU 1028 Ignatius and the Princess III
来源:互联网 发布:魏格尔的技术特点知乎 编辑:程序博客网 时间:2024/05/10 12:17
可以套完全背包。
每次累加起来就好了。
#include<cstdio>#include<cstring>#include<string>#include<queue>#include<algorithm>#include<map>#include<stack>#include<iostream>#include<list>#include<set>#include<vector>#include<cmath>#define INF 0x7fffffff#define eps 1e-8#define LL long long#define PI 3.141592654#define CLR(a,b) memset(a,b,sizeof(a))#define FOR(i,a,n) for(int i= a;i< n ;i++)#define FOR0(i,a,b) for(int i=a;i>=b;i--)#define pb push_back#define mp make_pair#define ft first#define sd second#define sf scanf#define pf printf#define acfun std::ios::sync_with_stdio(false)#define SIZE 120+1using namespace std;int dp[SIZE];int main(){ CLR(dp,0); dp[0]=1; FOR(i,1,SIZE) FOR(j,i,SIZE) dp[j]+=dp[j-i]; int n; while(~sf("%d",&n)) pf("%d\n",dp[n]);}
0 0
- hdu 1028 Ignatius and the Princess III
- HDU 1028 Ignatius and the Princess III
- hdu 1028 Ignatius and the Princess III
- HDU 1028 Ignatius and the Princess III
- HDU 1028 Ignatius and the Princess III
- hdu 1028 Ignatius and the Princess III
- HDU-1028-Ignatius and the Princess III
- HDU 1028 Ignatius and the Princess III
- HDU 1028 Ignatius and the Princess III
- hdu 1028 Ignatius and the Princess III
- hdu 1028 Ignatius and the Princess III
- hdu 1028 Ignatius and the Princess III
- hdu 1028 Ignatius and the Princess III
- hdu 1028 Ignatius and the Princess III
- hdu 1028 Ignatius and the Princess III
- HDU--1028 Ignatius and the Princess III
- HDU 1028 Ignatius and the Princess III
- Ignatius and the Princess III hdu 1028
- coded_stream.h
- 更新android sdk慢方法
- C++实现选择排序
- linux下用dd命令拷贝硬盘
- hadoop入门-在windows上编译x64位hadoop
- HDU 1028 Ignatius and the Princess III
- 第十周项目三——血型统计
- gzip_stream.h
- C和指针第四章编程练习题小结1
- 数据结构之归并(结构体数组实现)
- printer.h
- 第十周项目2--解密M$pszi$y
- UIButton
- tokenizer.h