随笔分类 -  简单算法

摘要:原题:http://acm.hdu.edu.cn/showproblem.php?pid=2005#include <stdio.h>int main(){ int year,dd,mm; int sum=0; while(scanf("%d/%d/%d",&year,&mm,&dd)!=EOF) { switch(mm) { case 1: sum=... 阅读全文
posted @ 2010-12-24 10:28 _cc 阅读(281) 评论(0) 推荐(0)
摘要:#include <stdio.h>int main(){ int t; while (scanf("%d",&t)!=EOF) { if(t>100||t<0) { printf("Score is error!\n"); } else if(t>=90) { printf("A\n"); } else if(t>=80) {... 阅读全文
posted @ 2010-12-19 10:57 _cc 阅读(305) 评论(2) 推荐(0)
摘要:题目:http://acm.hdu.edu.cn/showproblem.php?pid=2003看的时候挺简单的,还在想这上面题也太水了。做的时候没得换得,提交了两次才发现。 阅读全文
posted @ 2010-12-05 10:51 _cc 阅读(247) 评论(0) 推荐(0)
摘要:昨天早上就看了a+b的第二个题表示,到现在也不会。有思路,不会实现,杯具。回头继续,早上看题,又不会,先找一道简单的吧,晚上回来继续。题目:http://acm.hdu.edu.cn/showproblem.php?pid=1001 阅读全文
posted @ 2010-11-19 10:31 _cc 阅读(173) 评论(0) 推荐(0)
摘要:发现最近很闲,临在毕业前,大家都忙自己。无聊就开始刷题吧。对自己而言,这是一个开始。问题:http://acm.hdu.edu.cn/showproblem.php?pid=1000解题: 阅读全文
posted @ 2010-11-17 22:58 _cc 阅读(257) 评论(4) 推荐(0)