Mr Zz

导航

2011年10月18日

HDU 找单词

摘要: 就是给你26个字母 A代表1 。。。。Z代表26 输入每个字母的个数 求少于50总和的单词数目注意 单词字母不分顺序母函数就可以解决啦 母函数算出来 系数刚好是所有可能的方案数 所以只要把前面 50 个加起来就行了#include<iostream>#include<cstring>#include<stdio.h>#include<stdlib.h>using namespace std;int len[27];int c1[51];int c2[51];int main(){ int n; freopen("t.txt", 阅读全文

posted @ 2011-10-18 20:26 Mr Zz 阅读(186) 评论(0) 推荐(0)

HDU 选课时间

摘要: 做的好郁闷啊=,= ecplise出现bug 一会对 一会错的 哎呦啊 和 Fruit 一样只是加了限制的母函数 哎不说了 气死我了#include<iostream>#include<cstring>#include<stdio.h>#include<stdlib.h>using namespace std;int f[10][2];//第二维一个存的是分数 一个存的的是数目上的限制int c1[41];int c2[41];int main(){ int n,t,k;// freopen("t.txt","r&q 阅读全文

posted @ 2011-10-18 19:28 Mr Zz 阅读(174) 评论(0) 推荐(0)