2013年2月25日

Javabeans(递推)

摘要: JavabeansTime Limit: 2 Seconds Memory Limit: 65536 KBJavabeans are delicious. Javaman likes to eat javabeans very much.Javaman has n boxes of javabeans. There are exactly i javabeans in the i-th box (i = 1, 2, 3,...n). Everyday Javaman chooses an integer x. He also chooses several boxes where the... 阅读全文

posted @ 2013-02-25 17:43 铁树银花 阅读(398) 评论(0) 推荐(0) 编辑

Kagome Kagome(简单)

摘要: 3492 - Kagome Kagome时间限制:Java: 2000 ms / Others: 2000 ms内存限制: Java: 65536 KB / Others: 65536 KB问题描述Kagome kagome, kago no naka no tori wa Itsu itsu deyaru? Yoake no ban ni Tsuru to kame to subetta. Ushiro no shoumen daare? Translation: Kagome kagome, the bird in the cage, when will you come out? In 阅读全文

posted @ 2013-02-25 17:38 铁树银花 阅读(935) 评论(0) 推荐(0) 编辑

Ordinal Numbers(简单)

摘要: Ordinal NumbersTime Limit: 2 Seconds Memory Limit: 65536 KBOrdinal numbers refer to a position in a series. Common ordinals include zeroth, first, second, third, fourth and so on. Ordinals are not often written in words, they are written using digits and letters. An ordinal indicator is a sign ad... 阅读全文

posted @ 2013-02-25 17:35 铁树银花 阅读(1656) 评论(0) 推荐(0) 编辑

Edge(简单)

摘要: Edge 时间限制(普通/Java):1000MS/10000MS 运行内存限制:65536KByte 总提交: 1 测试通过: 0 描述For products that are wrapped in small packings it is necessary that the sheet of paper containing the directions for use is folded until its size becomes small enough. We assume that a sheet of paper is rectangular ... 阅读全文

posted @ 2013-02-25 17:33 铁树银花 阅读(324) 评论(0) 推荐(0) 编辑

Conic Section(圆锥曲线基础)

摘要: Conic SectionTime Limit: 2 Seconds Memory Limit: 65536 KBThe conic sections are the nondegenerate curves generated by the intersections of a plane with one or two nappes of a cone. For a plane perpendicular to the axis of the cone, a circle is produced. For a plane that is not perpendicular to th... 阅读全文

posted @ 2013-02-25 17:31 铁树银花 阅读(1503) 评论(0) 推荐(0) 编辑

敌兵布阵(线段树基础)

摘要: 浙大研究生复试历年试题,欢迎练习~敌兵布阵Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 23576Accepted Submission(s): 10236Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C 阅读全文

posted @ 2013-02-25 17:29 铁树银花 阅读(253) 评论(0) 推荐(0) 编辑

I Hate It(线段树基础)

摘要: I Hate ItTime Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 22019Accepted Submission(s): 8792Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。在每个 阅读全文

posted @ 2013-02-25 17:27 铁树银花 阅读(243) 评论(0) 推荐(0) 编辑

线段树成段更新之延迟更新

摘要: 线段树成段更新之延迟更新成段更新的重点是延迟更新,以区间[1,3]为例说明。注意,此例中“更新”为修改元素的值为a,“查询”为求区间中所有元素之和。建立二叉树如图示:每一个圆圈代表一个结点,圆内数字分别为结点标号和所对应区间,[i]表示只含一个数,只出现在叶节点中。当 要更新区间[1,2]中所有元素时,对应上图即要更新结点4,5。一种方法是依次访问结点4和5并更新,但这样时间和空间开销都较大,当要修改的区间的长 度较长时尤甚。于是可以采取“延迟更新”,即将更新信息储存在这段区间对应的结点处,此例中[1,2]对应的区间是结点2,给结点一个属性tag用以 记录这个更新信息a,原来tag初始化为0, 阅读全文

posted @ 2013-02-25 17:22 铁树银花 阅读(1221) 评论(1) 推荐(1) 编辑

Just a Hook(线段树,成段更新)

摘要: Just a HookTime Limit : 4000/2000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 7Accepted Submission(s) : 4Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive me 阅读全文

posted @ 2013-02-25 17:21 铁树银花 阅读(275) 评论(0) 推荐(0) 编辑

Codeforces Round #167 (Div. 2) B. Dima and Sequence(暴力)

摘要: B. Dima and Sequencetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDima got into number sequences. Now he's got sequence a1, a2, ..., an, consisting of n positive integers. Also, Dima has got a function f(x), which can be defined with the fo 阅读全文

posted @ 2013-02-25 11:51 铁树银花 阅读(249) 评论(0) 推荐(0) 编辑

导航