2010年11月30日
摘要: 初学线段树,还没学之前,以为线段树很难,学了之后才发现.......或许还没到难的地方吧这题也就是线段树的简单应用,也就是要求你在短时间内计算某一段的人数,和动态维护数组。本题采用树的线性储存结构,也就是a[i]为父节点,a[2*i]为a[i]的左孩子,a[2*i+1]为a[i]的右孩子,这样就是浪费省内存!虽然采用链表结构能省内存,但操作比较麻烦!!!树结点:[代码]建树:相信大家对树结构都非常... 阅读全文
posted @ 2010-11-30 19:06 00Prince || Lai00 阅读(250) 评论(0) 推荐(0) 编辑
  2010年11月27日
摘要: 这题就是字典树的应用;虽然简单,但还是Runtime error 了好多次才过的,后来改了一点点东西,就不知不觉的A了。What Are You Talking AboutProblem DescriptionIgnatius is so lucky that he met a Martian yesterday. But he didn't know the language the Marti... 阅读全文
posted @ 2010-11-27 16:35 00Prince || Lai00 阅读(227) 评论(1) 推荐(0) 编辑
  2010年11月26日
摘要: 这题看了好久都没看懂,只知道是用字典树写,后来问了一下同学才明白题意,结果当然很快就A了。该题目的意思就是输入一系列字符串,然后查找逐个字符串,看看最多要搜多长才能确定是该字符串。 Shortest PrefixesTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 5829Accepted: 2403DescriptionA pref... 阅读全文
posted @ 2010-11-26 22:15 00Prince || Lai00 阅读(605) 评论(0) 推荐(0) 编辑
  2010年11月25日
摘要: 这题的陷阱太变态了,题中说:All excuses can contain any upper or lower case alphanumeric character, a space, or any of the following punctuation marks [".,!?] not including the square brackets and will not exceed 7... 阅读全文
posted @ 2010-11-25 20:50 00Prince || Lai00 阅读(935) 评论(0) 推荐(0) 编辑
摘要: 简单题:暴力计算 32MsDNA SortingTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 50312Accepted: 19682DescriptionOne measure of ``unsortedness'' in a sequence is the number of pairs of entries that are... 阅读全文
posted @ 2010-11-25 13:46 00Prince || Lai00 阅读(1021) 评论(2) 推荐(0) 编辑
摘要: 相信大家都玩过数独,这题就是模拟数独Sudoku KillerProblem Description自从2006年3月10日至11日的首届数独世界锦标赛以后,数独这项游戏越来越受到人们的喜爱和重视。据说,在2008北京奥运会上,会将数独列为一个单独的项目进行比赛,冠军将有可能获得的一份巨大的奖品———HDU免费七日游外加lcy亲笔签名以及同hdu acm tea... 阅读全文
posted @ 2010-11-25 13:11 00Prince || Lai00 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 排序 + 二分:Nested DollsProblem DescriptionDilworth is the world’s most prominent collector of Russian nested dolls: he literally has thousands of them! You know, the wooden hollow dolls of differen... 阅读全文
posted @ 2010-11-25 12:04 00Prince || Lai00 阅读(946) 评论(0) 推荐(0) 编辑
  2010年11月24日
摘要: 母函数简单应用题目:Square CoinsProblem DescriptionPeople in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of all square numbers up to... 阅读全文
posted @ 2010-11-24 13:21 00Prince || Lai00 阅读(820) 评论(0) 推荐(0) 编辑
  2010年11月23日
摘要: 简单题,排序就好了题目:You Are All ExcellentProblem Description本次集训队共有30多人参加,毫无疑问,你们都是很优秀的,但是由于参赛名额有限,只能选拔部分队员参加省赛。从学校的角度,总是希望选拔出最优秀的18人组成6支队伍来代表学校。但是,大家也知道,要想做到完全客观,是一件很难的事情。因为选拔的标准本身就很难统一。为了解决这个难题,我现在把问题作了简化,现... 阅读全文
posted @ 2010-11-23 15:20 00Prince || Lai00 阅读(1168) 评论(2) 推荐(0) 编辑
摘要: Big Event in HDUProblem DescriptionNowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had ever been split into Computer Colle... 阅读全文
posted @ 2010-11-23 13:50 00Prince || Lai00 阅读(1435) 评论(0) 推荐(0) 编辑