
ACdream
文章平均质量分 80
_Occult_
物語が始まった
展开
-
ACdream 1429 Rectangular Polygon
Description A rectangular polygon is a polygon whose edges are all parallel to the coordinate axes. The polygon must have a single, non-intersecting boundary. No two adjacent sides must be原创 2015-05-21 08:43:34 · 412 阅读 · 0 评论 -
ACdream 1082 闪电战
最近北航ACM队内看是流行一款叫做RUSE的即时策略游戏,这款游戏的迷人之处就在于真真假假虚虚实实,对抗性很强。Sbihero是这方面的达人,因为他为了这个游戏构造了一个合适的模型:将整个战场可以视为为n*m的一个矩阵,每个元素值都代表着这一区域内的战力值,正值代表己方的战力,负值代表敌方的战力,零表示无军事力量。而Sbihero最喜欢用的国家德国还有一项特殊的战术——闪电战。闪电战必须在原创 2016-12-08 19:50:13 · 438 阅读 · 0 评论 -
ACdream 1069 无耻的出题人
Description听到X神要参加比赛,只会Fibnacci数的出题人被吓得哭晕在厕所。为了防止X神AK(ALL KILL)比赛题目,无耻的出题人只好在题面上做些手脚(加密)。其中一道题的题目描述如下:hjxh dwh v vxxpde,mmo ijzr yfcz hg pbzrxdvgqij rid stl mc zspm vfvuu vb uwu spmwzh.比赛的时候原创 2016-08-17 20:27:05 · 635 阅读 · 0 评论 -
ACdream 1063 平衡树
Description神奇的cxlove有一颗平衡树,其树之神奇无法用语言来描述 OrzOrz。 这棵树支持3种操作: 1、加入一个数到树中,维护平衡树的合法性; 2、给一个数X,用O(1)的时间求出来树中的数Y使得 Y ^ X 最大(异或操作, Pascal 写作 xor , 0 ^ 0 = 0 , 1 ^ 1 = 0 , 0 ^ 1 = 1 , 1 ^ 0 = 1 , 2 ^ 3 =原创 2015-05-27 21:39:21 · 630 阅读 · 0 评论 -
ACdream 1028 Path
DescriptionCheck if there exists a path of length ll in the given tree with weight assigned to each edges.InputThe first line contains two integers nn and qq, which denote原创 2016-08-17 20:21:52 · 346 阅读 · 0 评论 -
ACdream 1020 The Game about KILL
DescriptionTeacher HU and his 40 students were trapped by the brigands. To show their power, the head of the brigands want to select one people to kill.Teacher HU and his 40 students will stan原创 2016-08-17 20:18:15 · 308 阅读 · 0 评论 -
ACdream 1015 Double Kings
DescriptionOur country is tree-like structure, that is to say that N cities is connected by exactly N - 1 roads. The old king has two little sons. To make everything fairly, he dicided to divide原创 2016-08-17 20:16:18 · 408 阅读 · 0 评论 -
ACdream 1727 Sequence
DescriptionLosanto has a sequence {a[1],a[2],…,a[n]} with n positive integers. Superman has some positive integer sequences with different size. Losanto wants to know the total occurrences of ever原创 2015-07-18 21:23:16 · 472 阅读 · 0 评论 -
ACdream 1412 2-3 Trees
Description 2-3 tree is an elegant data structure invented by John Hopcroft. It is designed to implement the same functionality as the binary search tree. 2-3 tree is an ordered rooted tree原创 2015-07-18 21:28:08 · 554 阅读 · 0 评论 -
ACdream 1726 A Math game
DescriptionRecently, Losanto find an interesting Math game. The rule is simple: Tell you a number H, and you can choose some numbers from a set {a[1],a[2],......,a[n]}.If the sum of the number you原创 2015-07-18 21:20:39 · 605 阅读 · 0 评论 -
ACdream 1427 Nice Sequence
Description Let us consider the sequence a1, a2,..., an of non-negative integer numbers. Denote as ci,j the number of occurrences of the number i among a1,a2,..., aj. We call the sequence原创 2015-05-22 15:40:20 · 510 阅读 · 0 评论 -
ACdream 1421 TV Show
Description Charlie is going to take part in one famous TV Show. The show is a single player game. Initially the player has 100 dollars. The player is asked n questions, one after another. If原创 2015-05-22 15:44:25 · 560 阅读 · 0 评论 -
ACdream 1431 Sum vs Product
Description Peter has just learned mathematics. He learned how to add, and how to multiply. The fact that 2 + 2 = 2 × 2 has amazed him greatly. Now he wants find more such examples. Peters原创 2015-05-22 15:38:46 · 463 阅读 · 0 评论 -
ACdream 1417 Numbers
Description Consider numbers from 1 to n. You have to find the smallest lexicographically number among them which is divisible by k.Input Input file contains seve原创 2015-05-22 15:42:47 · 563 阅读 · 0 评论 -
ACdream 1430 SETI
Description Amateur astronomers Tom and Bob try to find radio broadcasts of extraterrestrial civilizations in the air. Recently they received some strange signal and represented it as a wor原创 2015-05-21 09:20:04 · 493 阅读 · 0 评论 -
ACdream 1073 雷霆战机
Description风风最近迷上了一个打飞机游戏——《雷霆战机》,战机分为白二星、绿三星、蓝四星、紫五星,四种品质。当然,最厉害的是紫色五星的战机啦。战机分为升级和进阶两种。升级:提升战机的等级,但战机品质不变。进阶:可将战机提升一个星级(白二星->绿三星->蓝四星->紫五星)。为了简化问题,规定战机进阶规则如下:白色二星:起始等级Lv1级,满级Lv2原创 2015-05-27 21:39:54 · 535 阅读 · 0 评论 -
ACdream 1061 郭式树
Description郭橐驼,不知始何名。病偻,隆然伏行,有类橐驼者,故乡人号之驼。驼闻之,曰:“甚善。名我固当。”因舍其名,亦自谓橐驼云。其乡曰丰乐乡,在长安西。驼业种树,凡长安豪富人为观游及卖果者,皆争迎取养。视驼所种树,或移徙,无不活;且硕茂,蚤实以蕃。他植者虽窥伺效慕,莫能如也。 有问之,对曰:“橐驼非能使木寿且孳也,以能顺木之天,以致其性焉尔。凡植木之性,其本欲舒,其培欲原创 2015-05-27 21:37:22 · 481 阅读 · 0 评论 -
ACdream 1162 胖子教你线段树
int res = 0;void cal(int L, int R) { res ++; if (L == R) return ; int mid = (L + R) / 2; cal(L, mid); cal(mid + 1, R);}如以上代码所示,给出区间的两个端点x, y,求这个区间以下(包括该区间)的所有子区间的数量原创 2016-12-29 20:56:23 · 302 阅读 · 0 评论