ACM
文章平均质量分 78
--BurningCodes--
这个作者很懒,什么都没留下…
展开
-
杭电ACM 1297 Children’s Queue
http://acm.hdu.edu.cn/showproblem.php?pid=1297 这道题是排序问题,可以用递归方法解决。 计算F(n): 一:当最后一个是男孩M时候,前面n-1个随便排出来,只要符合规则就可以,即是F(n-1); 二:当最后一个是女孩F时候,第n-1个肯定是女孩F,这时候又有两种情况: 1)前面n-2个可以按n-2个的时候的转载 2012-10-06 09:49:40 · 1531 阅读 · 0 评论 -
大数模版
/*大数加法*/ # include # include # include void add(char* a,char* b,char* c) { int i,j,k,max,min,n,temp; char *s,*pmax,*pmin; max=strlen(a); min=strlen(b); if (max<min) {转载 2012-10-06 10:04:21 · 589 阅读 · 0 评论 -
学习ACM的一些小建议
一位高手对我的建议: 一般要做到50行以内的程序不用调试、100行以内的二分钟内调试成功.acm主要是考算法的 ,主要时间是花在思考算法上,不是花在写程序与debug上。 下面给个计划你练练: 第一阶段: 练经典常用算法,下面的每个算法给我打上十到二十遍,同时自己精简代码, 因为太常用,所以要练到写时不用想,10-15分钟内打完,甚至关掉显示器都可以把程序转载 2012-07-31 19:07:34 · 735 阅读 · 0 评论 -
杭电ACM 1022--Train Problem
Problem Description: As the new term comes, the Ignatius Train Station isverybusy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station i原创 2012-09-21 21:01:57 · 1489 阅读 · 0 评论 -
杭电ACM--1228 A+B
Problem Description 读入两个小于100的正整数A和B,计算A+B,需要注意的是:A和B的每一位数字由对应的英文单词给出 Input 测试输入包含若干测试用例,每个测试用例占一行,格式为"A + B =",相邻两字符串有一个空格间隔.当A和B同时为0时输入结束,相应的结果不要输出. Output 对每个测试用例输出1行,即A+B的值.原创 2012-09-24 11:06:29 · 1730 阅读 · 0 评论 -
杭电ACM 1010 搜索题
Problem Description The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He原创 2012-11-17 16:51:29 · 7258 阅读 · 2 评论