摘要: /*http://acm.hdu.edu.cn/showproblem.php?pid=2079简单的母函数题目;开始把题目看错,以为个相同学分的不同科目是算不同的;后来发现是相同的;如果是不同的,那结果很大;当然这是我审题错误;*/#include #include #include #include #include #include #include int g[9],la[55],lb[55]; using namespace std; int main(int argc, char *argv[]) { int t,n,k,a,b; cin>>t; while(... 阅读全文
posted @ 2013-03-07 19:01 简洁是智慧的灵魂 阅读(139) 评论(0) 推荐(0)
摘要: /*可以用母函数解决;前几天练熟了,再试试手;*/http://acm.hdu.edu.cn/showproblem.php?pid=2082#include #include #include #include #include #include #include #define maxn 1005 using namespace std; int main(int argc, char *argv[]) { int word[27],a[55],b[55]; int n; cin>>n; while(n--) { for(int i = 0; i >word[... 阅读全文
posted @ 2013-03-06 22:07 简洁是智慧的灵魂 阅读(149) 评论(0) 推荐(0)
摘要: /*再水一题sort()应用+strcmp()应用;*/http://acm.hdu.edu.cn/showproblem.php?pid=1236点击打开链接#include #include #include #include #include #include #include #define maxn 1005 struct student { int grade; char name[21]; }stu[maxn]; int cmp(student s1, student s2) { if(s1.grade>s2.grade) return 1; if(s... 阅读全文
posted @ 2013-03-06 19:07 简洁是智慧的灵魂 阅读(109) 评论(0) 推荐(0)
摘要: /*今天发现自己是基地做题几乎最少的人水几道题吧;*/#include #include #include #include #include #include #include using namespace std; int main(int argc, char *argv[]) { int n,m,hh1,hh2,mm1,mm2,ss1,ss2; int eh,es,em,lh,ls,lm; string on,off,stu; char c; cin>>n; while(n--) { lh = lm = ls = 0; eh = 23; ... 阅读全文
posted @ 2013-03-05 22:05 简洁是智慧的灵魂 阅读(117) 评论(0) 推荐(0)
摘要: /*无聊水了一题只怪自己太水,水题也花了好久时间;*/#include #include #include #include #include #include #include using namespace std; int change(char *s) { if(!strcmp(s,"one")) return 1; if(!strcmp(s,"two")) return 2; if(!strcmp(s,"three")) return 3; if(!strcmp(s,"four")) return 4; 阅读全文
posted @ 2013-03-05 20:48 简洁是智慧的灵魂 阅读(95) 评论(0) 推荐(0)
摘要: /*母函数题;只是限定了一些范围,加上就可以了;http://acm.hdu.edu.cn/showproblem.php?pid=2152*/#include using namespace std; #define maxn 105 int a[maxn],b[maxn],minum[maxn],maxnum[maxn]; int main() { int n,m; while(cin>>n>>m) { for(int i = 0; i >minum[i]>>maxnum[i]; } memset(a,0,sizeof(a)); memset(b, 阅读全文
posted @ 2013-03-03 18:20 简洁是智慧的灵魂 阅读(123) 评论(0) 推荐(0)
摘要: /*题目:给出一定(n)数量的砝码,每个砝码重a1,a2,a3。。。an,问题:求出【1~sum】中(sum为各砝码总和)不能被称出的重量;问题关键:天平两边都可以放砝码,放在同一端:a[j+k]+=a[j]不同端a[abs(j-k)]+=a[j] 假设原来的砝码都放在右端,则可以把新加的砝码放在左端,得到新重量,此时a[abs(j-k)]+=a[j]。http://acm.hdu.edu.cn/showproblem.php?pid=1709点击打开链接*/#include #include #include using namespace std;#define maxn 101in... 阅读全文
posted @ 2013-03-03 17:06 简洁是智慧的灵魂 阅读(125) 评论(0) 推荐(0)
摘要: 我们去看视频,无论是优酷,酷六 ,还是,我乐,土豆,六间房等都有15~30秒的广告,不想看,但又不得不看,很烦,有木有。现在我们就以 xp系统对优酷网的为例来讲解其方法。【步骤/方法】 打开我的电脑,在地址栏输入:C:\Windows\System32\drivers\etc 按enter 键,找到hosts 文件用记事本方式 打开它。 点击确定。 在里面加入 以下代码(加到末尾),保存,退出即可,破解完成!! #优酷 127.0.0.1 atm.youku.com 127.0.0.1 fvid.atm.youku.com 127.0.0.1 html.atm.youku.com 127.0. 阅读全文
posted @ 2013-03-03 15:10 简洁是智慧的灵魂 阅读(321) 评论(0) 推荐(0)
摘要: /*题目意思是:硬币种类有1^2,2^2,3^2,4^2...17^2,这几种;输入n;求出能够组合成n的组合有多少种;与hdu1028相似,只是将原来的1,2,3,4,……换成了1^2,2^2,3^2,4^2...…,题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1398*/#include #include using namespace std; int a[305],b[305]; int main() { int n; int c[18]; for(int i = 0; i >n&&n!=0) { ... 阅读全文
posted @ 2013-03-02 18:16 简洁是智慧的灵魂 阅读(170) 评论(0) 推荐(0)
摘要: /*注意题目要求,1,输入0,结果12,方案中硬币不超过100;与hdoj 1028不同在于有限定100,数组需要多加一维;*/http://acm.hdu.edu.cn/showproblem.php?pid=2069#include #include using namespace std; int a[255][105],b[255][105]; int main() { int n; int c[5] = {1,5,10,25,50}; while(cin>>n) { if(n==0) { puts("1"); ... 阅读全文
posted @ 2013-03-02 15:09 简洁是智慧的灵魂 阅读(141) 评论(0) 推荐(0)