摘要: Maybe ACMers of HIT are always fond of fibonacci numbers, because it is so beautiful. Don't you think so? At the same time,fishcanflyalways likes to c... 阅读全文
posted @ 2015-08-16 17:44 茶飘香~ 阅读(368) 评论(0) 推荐(0)
摘要: 1、stringadd(strings1,strings2){if(s1.length()=0;i--,j--){s1[i]=char(s1[i]+(j>=0?s2[j]-'0':0));if(s1[i]-'0'>=10){s1[i]=char((s1[i]-'0')%10+'0');if(i)s1... 阅读全文
posted @ 2015-08-14 20:48 茶飘香~ 阅读(235) 评论(0) 推荐(0)
摘要: DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignat... 阅读全文
posted @ 2015-08-12 10:39 茶飘香~ 阅读(160) 评论(0) 推荐(0)
摘要: Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一... 阅读全文
posted @ 2015-08-10 13:47 茶飘香~ 阅读(249) 评论(0) 推荐(0)
摘要: POJ-1182 食物链(NYOJ-207)食物链时间限制:1000ms | 内存限制:65535KB难度:5描述动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。... 阅读全文
posted @ 2015-08-10 13:41 茶飘香~ 阅读(321) 评论(0) 推荐(0)
摘要: DescriptionBackgroundProfessor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders... 阅读全文
posted @ 2015-08-10 10:47 茶飘香~ 阅读(209) 评论(0) 推荐(0)
摘要: Description 严重急性呼吸系统综合症( SARS), 一种原因不明的非典型性肺炎,从2003年3月中旬开始被认为是全球威胁。为了减少传播给别人的机会, 最好的策略是隔离可能的患者。 在Not-Spreading-Your-Sickness大学( NSYSU), 有许多学生团体。同一组的学生 阅读全文
posted @ 2015-08-09 11:37 茶飘香~ 阅读(225) 评论(0) 推荐(0)
摘要: DescriptionThe 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 dog... 阅读全文
posted @ 2015-08-06 11:39 茶飘香~ 阅读(196) 评论(0) 推荐(0)
摘要: DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular... 阅读全文
posted @ 2015-08-05 20:17 茶飘香~ 阅读(168) 评论(0) 推荐(0)
摘要: DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a... 阅读全文
posted @ 2015-08-05 18:35 茶飘香~ 阅读(283) 评论(0) 推荐(0)