HDU 1028 —— Ignatius and the Princess III
来源:互联网 发布:mac装软件 编辑:程序博客网 时间:2024/06/14 19:31
原题:http://acm.hdu.edu.cn/showproblem.php?pid=1028
#include<iostream>using namespace std;const int maxn = 250;int arr[maxn], tmp[maxn];int n;int main(){ while(cin>>n){ for(int i = 0;i<=n;i++){ arr[i] = 1; tmp[i] = 0; } for(int i = 2;i<=n;i++){ for(int j = 0;j<=n;j++){ for(int k = 0;k+j<=n;k+=i) tmp[j+k] += arr[j]; } for(int j = 0;j<=n;j++){ arr[j] = tmp[j]; tmp[j] = 0; } } cout<<arr[n]<<endl; } return 0;}
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
- HDU 1028 Ignatius and the Princess III
- Caused by: java.lang.NoSuchMethodError:
- 快捷键
- 支付宝接口开发:客户端服务器端
- JSP学习第二天
- springmvc线程安全问题
- HDU 1028 —— Ignatius and the Princess III
- 2016级计算机C++助教工作(3) 提问方式 和 发送邮件的方式
- jsp 指令和内置对象
- 第十章:Approximate Inference exercise 25-31
- java中有关流的摘要
- 处世根基
- HDU 1398 —— Square Coins
- 水平滚动条拖动
- iOS_SDK_API_使用说明