hdu1398-Square Coins
来源:互联网 发布:java转c# 编辑:程序博客网 时间:2024/04/29 20:03
http://acm.hdu.edu.cn/showproblem.php?pid=1398
#include<iostream>#include<algorithm>#include<cstdio>using namespace std ;const int maxn = 305 ;int c1[ maxn ] , c2[ maxn ] ;int main(){int n ;int i , j , k ;while( scanf( "%d" , &n ) != EOF && n ){for( i = 0 ; i <= n ; ++ i ){c1[ i ] = 1 ;c2[ i ] = 0 ;}for( i = 2 ; i * i <= n ; ++i ){for( j = 0 ; j <= n ; ++j )for( k = 0 ; k + j <= n ; k += i * i ){c2[ k + j ] += c1[ j ] ;}for( j = 0 ; j <= n ; ++j ){c1[ j ] = c2[ j ] ;c2[ j ] = 0 ;}}printf( "%d\n" , c1[ n ] ) ;}return 0 ;}
- hdu1398-Square Coins
- hdu1398 Square Coins
- HDU1398-Square Coins
- hdu1398 -Square Coins
- hdu1398 Square Coins(组合)
- HDU1398-Square Coins
- hdu1398 Square Coins
- hdu1398 Square Coins
- Square Coins (hdu1398)
- Square Coins(HDU1398)
- hdu1398 Square Coins(生成函数)
- hdu1398 Square Coins 母函数
- 【母函数】hdu1398(Square Coins)
- HDU1398 Square Coins【母函数】
- 【HDU1398】Square Coins 母函数
- hdu1398 Square Coins 母函数水题
- HDU1398 Square Coins 【母函数模板】
- HDU1398 Square Coins(母函数)
- hdu 1032 The 3n + 1 problem
- JS日期选择器
- C/C++ 左值右值
- android进程间通信:使用AIDL
- excel截取特殊字符之间的值
- hdu1398-Square Coins
- Spring ContextLoaderListener与DispatcherServlet所加载的applicationContext的区别
- Android中TextView文字以空格开头
- Linux系统调用及用户编程接口(API)学习
- hdu1811Rank of Tetris
- Silverlight 图片灰化、亮度、对比度调整
- Android-Android Studio的安装
- MySql 查询 时间段 今天、昨天、7天、近30天、本月、上一月
- MSTR安全筛选器权限配置