hdu 1085 Holding Bin-Laden Captive! 母函数
来源:互联网 发布:衡阳软件培训 编辑:程序博客网 时间:2024/04/29 05:18
#include<iostream>using namespace std;const int Max = 1000 + 1000*2 + 1000*5 + 10;int c1[Max], c2[Max], c3[Max];int main(){int a, b, c;while(scanf("%d%d%d", &a, &b, &c) && (a||b||c) ){memset(c1, 0, sizeof(c1));memset(c2, 0, sizeof(c2));memset(c3, 0, sizeof(c3));int i, j;for( i=0; i <= a; i++ )c1[i] = 1;for( i=0; i <= a; i++ )for( j=0; j <= 2*b; j+=2 )c2[j+i] += c1[i];for( i=0; i <= a+2*b; i++ )for( j=0; j <= 5*c; j+=5)c3[j+i] += c2[i];for( i=0; i <= Max-10; i++ ){if(c3[i]==0)break;}printf("%d\n", i);}return 0;}
- HDOJ/HDU 1085 母函数 Holding Bin-Laden Captive!
- HDU 1085 Holding Bin-Laden Captive!(母函数)
- hdu 1085 Holding Bin-Laden Captive! (母函数)
- hdu 1085 Holding Bin-Laden Captive! 母函数
- hdu 1085 Holding Bin-Laden Captive!(母函数)
- [母函数]HDU 1085 Holding Bin-Laden Captive!
- HDU 1085 Holding Bin-Laden Captive! 母函数
- HDU 1085 Holding Bin-Laden Captive! (母函数)
- Hdu 1085 Holding Bin-Laden Captive! 母函数
- [hdu 1085] Holding Bin-Laden Captive!(母函数版)
- HDU 1085 Holding Bin-Laden Captive!(母函数)
- hdu 1085 Holding Bin-Laden Captive!(母函数)
- HDU 1085 Holding Bin-Laden Captive!(母函数)
- hdu 1085 Holding Bin-Laden Captive! (母函数)
- HDU 1085 Holding Bin-Laden Captive! 母函数
- HDU 1085-Holding Bin-Laden Captive!(母函数)
- HDU 1085 Holding Bin-Laden Captive! 【母函数】
- HDU -- 1085 Holding Bin-Laden Captive!(母函数)
- eclipse安装groovy(超快速安装)
- rpm打包
- sip鉴权认证Authorization MD5
- nvarchar与varchar的使用
- 位运算小结(2)
- hdu 1085 Holding Bin-Laden Captive! 母函数
- 并查集判断无向图联通
- BNU A Simple Tree Problem 线段树
- Spring框架
- 一个phper 预防csrf攻击的技巧
- Cannot find the dll error in my IIS server.
- TYVJ 1443 油滴扩展
- 图模型(graphical model, GM)的表示
- springMVC 的原理与学习