简单题
wchyumo2009
这个作者很懒,什么都没留下…
展开
-
杭电hdu 4153 Grey Area 简单题
http://acm.hdu.edu.cn/showproblem.php?pid=4153 对于做简单题,学好英语是关键,英语看不懂,再简单的题也做不出来啊,哈哈。 本题意思是把数分成一个个等分的区间,然后输入一系列的数,分别划分到不同的区间上去,比如区间长度为10,则5属于0~9,统计每个区间上数的个数,然后根据区间数最多的那个为基准,进行计算。 //统计 #include #incl原创 2012-04-14 18:29:49 · 827 阅读 · 0 评论 -
杭电hdu 2068 RPG的错排 简单题
http://acm.hdu.edu.cn/showproblem.php?pid=2068 错排公式:f(i) = (i - 1) * [f(i-1) + f(i-2)]。 //错排 #include int main() { double fac[26], staggered[26]; int i, n; fac[0] = 1, fac[1] = 1, fac[2] = 2;原创 2012-04-17 21:00:49 · 1617 阅读 · 0 评论 -
杭电hdu 1332 LC-Display 简单题
http://acm.hdu.edu.cn/showproblem.php?pid=1332 模拟,需要注意的地方:每组数据后有一个空行,每两个数字之间有一个空格。 #include int n, s; void print(char *str, int len) { int i, j, k; //head for(i = len-1; i >= 0; i --){ switc原创 2012-04-18 19:36:11 · 1158 阅读 · 0 评论 -
杭电hdu 1861 游船出租 简单题
http://acm.hdu.edu.cn/showproblem.php?pid=1861 注意开头的输入可能时间是零点零分。 //hdu_1861 #include #include #include using namespace std; typedef struct _rent { int cnt; int stim; int etim;原创 2012-05-07 18:30:19 · 1132 阅读 · 0 评论 -
杭电hdu 1862 EXCEL排序 qsort
http://acm.hdu.edu.cn/showproblem.php?pid=1862 简单的qsort二级排序 #include #include #include #include using namespace std; typedef struct _excel { char no[7]; char name[9]; int score; }e原创 2012-05-07 18:58:59 · 1323 阅读 · 0 评论