摘要:
DescriptionBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get back as quickly as possible.Farmer John's field has N (2 <= N <= 1000) landmarks 阅读全文
posted @ 2012-03-15 23:31
'wind
阅读(201)
评论(0)
推荐(0)
摘要:
DescriptionN(1 ≤N≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain constant skill rating that is unique among the competitors.The contest is conducted in several head-to-head rounds, each bet 阅读全文
posted @ 2012-03-15 23:29
'wind
阅读(274)
评论(0)
推荐(0)
摘要:
Problem Description有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在请你编程序确定排名。Input输入有若干组,每组中的第一行为二个数N(1<=N<=500),M;其中N表示队伍的个数,M表示接着有M行的输入数据。接下来的M行数据中,每行也有两个整数P1,P2表示即P1队赢了P2队。Output给出一个符合要求的排名。输出时队伍号之间有空格, 阅读全文
posted @ 2012-03-15 23:28
'wind
阅读(212)
评论(0)
推荐(0)
摘要:
Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。Input本题目包含多组数据,请处理到文件结束。每组数据第一行包含两个正整数N和M(0<N<200,0<M<1000),分别代表现有城镇的数目和已修建的道路的数目。城镇分别以0~N-1编号。接下来是M行道路信息。每一行有三个整数A,B,X(0<=A,B<N,A! 阅读全文
posted @ 2012-03-15 23:27
'wind
阅读(201)
评论(0)
推荐(0)
摘要:
Problem Description相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米。当然,为了节省资金,只要求实现任意2个小岛之间有路通即可。其中桥的价格为 100元/米。Input输入包括多组数据。输入首先包括一个整数T(T <= 200),代表有T组数据。每组数据首先是一个整 阅读全文
posted @ 2012-03-15 23:26
'wind
阅读(167)
评论(0)
推荐(0)
摘要:
DescriptionIn some cultural traditions, giving chocolate as a present on Valentine’s Day is a very traditional symbol of love. LDA does some research on chocolate manufacturing. And luckily, he makes some good quality chocolate bars. In addition, these chocolate bars are very long. They are composed 阅读全文
posted @ 2012-03-15 23:24
'wind
阅读(174)
评论(0)
推荐(0)
摘要:
Description既然大家都不愿意做水题,元帅也很无奈,想了好久也不知道什么是水题,因为在元帅的眼里都是水题,他定义的非水题就是他做不出来的题。太囧了,随便弄个水的MST。Input测试输入包含若干测试用例。每个测试用例的第1行给出顶点数目N ( < 100 );随后的N(N-1)/2行对应村庄间的距离,每行给出一对正整数,分别是两个顶点的编号,以及此两村庄间的距离。为简单起见,村庄从1到N编号。当N为0时,输入结束,该用例不被处理。Output对于每个测试用例,输出MST的最小路径总长度。Sample Input31 2 11 3 22 3 441 2 11 3 41 4 12 3 阅读全文
posted @ 2012-03-15 23:21
'wind
阅读(190)
评论(0)
推荐(0)
摘要:
DescriptionYou have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the sum of numbers in a given interval.InputThe first line contains two numbers N and Q. 1 ≤ 阅读全文
posted @ 2012-03-15 22:06
'wind
阅读(172)
评论(0)
推荐(0)
摘要:
Problem DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north side and south side along the corridor. Recently the Company made a plan to reform its system. The reform includes mo 阅读全文
posted @ 2012-03-15 19:03
'wind
阅读(196)
评论(0)
推荐(0)
摘要:
A path with no repeated vertices of an undirected graph is called a simple path. Given an undirected graph and two verteices S and D, return the number of vertics which don't lie on any simple paths between S and D.InputThe input contains multiple test cases.Each case starts with a line of four 阅读全文
posted @ 2012-03-15 13:01
'wind
阅读(314)
评论(0)
推荐(0)
摘要:
Problem Description蜘蛛牌是windows xp操作系统自带的一款纸牌游戏,游戏规则是这样的:只能将牌拖到比她大一的牌上面(A最小,K最大),如果拖动的牌上有按顺序排好的牌时,那么这些牌也跟着一起移动,游戏的目的是将所有的牌按同一花色从小到大排好,为了简单起见,我们的游戏只有同一花色的10张牌,从A到10,且随机的在一行上展开,编号从1到10,把第i号上的牌移到第j号牌上,移动距离为abs(i-j),现在你要做的是求出完成游戏的最小移动距离。Input第一个输入数据是T,表示数据的组数。每组数据有一行,10个输入数据,数据的范围是[1,10],分别表示A到10,我们保证每组数 阅读全文
posted @ 2012-03-15 13:00
'wind
阅读(363)
评论(0)
推荐(0)
摘要:
Problem DescriptionThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: up and down.When you at floor i,if you press the button "UP" , you will go up Ki floor,i.e,you will go to 阅读全文
posted @ 2012-03-15 13:00
'wind
阅读(183)
评论(0)
推荐(0)
摘要:
Description机器人要在一个矩形迷宫里行动(不能原地停留,只能走向上/下/左/右),每移动一格花费1个单位时间。迷宫有以下几种元素:【*】机器人的起点【#】墙。机器人不能走过这些格子【.】平地。机器人可以在上面自由行走【0-9】宝藏。当机器人走到此处会立刻获得该数字相应的宝藏,宝藏不会消失,可以反复获取(但不能停留)若机器人要恰好获得总和为x的宝藏,它最少需要多少时间?Input第一行输入任务数量T,接下来有T个任务每块第一行有两个整数, n(0 <100), m(0 < 100),表示迷宫有n+1行和m+1列接下来n行输入迷宫最后一行输入你要收集的宝藏的总价值x(x≤10 阅读全文
posted @ 2012-03-15 12:59
'wind
阅读(235)
评论(0)
推荐(0)
摘要:
Problem DescriptionSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall. A blockhouse is a small castle that has four openings through which to shoot. The four openings are facing North, E 阅读全文
posted @ 2012-03-15 12:58
'wind
阅读(171)
评论(0)
推荐(0)
摘要:
Problem DescriptionThere is a mountain near yifenfei’s hometown. On the mountain lived a big monster. As a hero in hometown, yifenfei wants to kill it.Now we know yifenfei have n spells, and the monster have m HP, when HP <= 0 meaning monster be killed. Yifenfei’s spells have different effect if 阅读全文
posted @ 2012-03-15 12:57
'wind
阅读(265)
评论(0)
推荐(0)
摘要:
Problem DescriptionYou're in space.You want to get home. There are asteroids. You don't want to hit them. InputInput to this problem will consist of a (non-empty) series of up to 100 data sets. Each data set will be formatted according to the following description, and there will be no blank 阅读全文
posted @ 2012-03-15 12:56
'wind
阅读(228)
评论(0)
推荐(0)
摘要:
Problem DescriptionZty is a man that always full of enthusiasm. He wants to solve every kind of difficulty ACM problem in the world. And he has a habit that he does not like to solvea problem that is easy than problem he had solved. Now yifenfei give him n difficulty problems, and tell him their rel 阅读全文
posted @ 2012-03-15 12:55
'wind
阅读(218)
评论(0)
推荐(0)
摘要:
Problem Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。Output共有若干行,每行一个正整数,表示对应输入行的皇后的不同放置数量。Sample Input1850Sample Output19210code :View Code #include<stdio.h>#include<string.h>int tot 阅读全文
posted @ 2012-03-15 12:54
'wind
阅读(196)
评论(0)
推荐(0)
摘要:
Problem Description呃......变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如果咒语是以a开头b结尾的一个单词,那么它的作用就恰好是使A物体变成B物体.Harry已经将他所会的所有咒语都列成了一个表,他想让你帮忙计算一下他是否能完成老师的作业,将一个B(ball)变成一个M(Mouse),你知道,如果他自己不能完成的话,他就只好向Hermione请教,并且被迫听一大堆好好学习的道理.Input测试数据有多组。每组有多行,每行一个单词,仅包括小写字母,是Harry所 阅读全文
posted @ 2012-03-15 12:53
'wind
阅读(181)
评论(0)
推荐(0)
摘要:
DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is lying either it's black or white side up. Each round you flip 3 to 5 pieces, thus changing the color of t 阅读全文
posted @ 2012-03-15 12:52
'wind
阅读(275)
评论(0)
推荐(0)
摘要:
Problem DescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the prison.Angel's friends want to save Angel. Their task is: approach Angel. We assume that "approach Angel 阅读全文
posted @ 2012-03-15 12:51
'wind
阅读(174)
评论(0)
推荐(0)
摘要:
DescriptionBackgroundMr Somurolov, fabulous chess-gamer indeed, asserts that no one else but him can move knights from one position to another so fast. Can you beat him?The ProblemYour task is to write a program to calculate the minimum number of moves needed for a knight to reach one point from ano 阅读全文
posted @ 2012-03-15 12:50
'wind
阅读(187)
评论(0)
推荐(0)
摘要:
View Code #include<stdio.h>#include<string.h>int prime[40];int a[20];int vis[20];int n;int isprime(int n){ int i; for(i=2;i*i<=n;i++) if(n%i==0) return 0; return 1;}void dfs(int cur){ int i; if(cur==n&&prime[a[0]+a[n-1]]) //递归边界,最后一个数和第一个数和是质数 { for(i=0;i<n;i++... 阅读全文
posted @ 2012-03-15 12:49
'wind
阅读(138)
评论(0)
推荐(0)
摘要:
DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21 813 12 11 10 9一个人可以从某个点滑向上下左右相邻四个点之一,当且仅当高度减小。在上面的例子中,一条可滑行的滑坡为24-17-16-1。当然25-24-23-...-3-2-1更长。事实上,这是最长的一条。 阅读全文
posted @ 2012-03-15 12:46
'wind
阅读(142)
评论(0)
推荐(0)
摘要:
迷宫问题Time Limit:1000MSMemory Limit:65536KTotal Submissions:3850Accepted:2226Description定义一个二维数组:int maze[5][5] = {0, 1, 0, 0, 0,0, 1, 0, 1, 0,0, 0, 0, 0, 0,0, 1, 1, 1, 0,0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。Input一个5 × 5的二维数组,表示一个迷宫。数据保证有唯一解。Output左上角到右下角 阅读全文
posted @ 2012-03-15 12:44
'wind
阅读(331)
评论(0)
推荐(0)
摘要:
要求: 输入行数为n列数为m的迷宫,用‘s’表示起点,‘#’表示墙头,输出起点到各点的最短路。sample input:5 5s#....#....#..........#..sample output:0 0 8 9 101 0 7 0 92 0 6 0 83 4 5 6 74 5 0 7 8code:View Code #include<stdio.h> #include<string.h> int dx[4]={-1,0,0,1},dy[4]={0,-1,1,0}; int q[100000]; int maze[200][200]; int vis[200][2 阅读全文
posted @ 2012-03-15 12:36
'wind
阅读(266)
评论(0)
推荐(0)
摘要:
DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a pointN(0 ≤N≤ 100,000) on a number line and the cow is at a pointK(0 ≤K≤ 100,000) on the same number line. Farmer John has two modes of transportation: walking and teleporting 阅读全文
posted @ 2012-03-15 12:35
'wind
阅读(196)
评论(0)
推荐(0)
摘要:
Problem DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides the land into numerous square plots. It then analyzes each plot separately, using s 阅读全文
posted @ 2012-03-15 12:34
'wind
阅读(175)
评论(0)
推荐(0)
摘要:
Problem 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 tile, he can move to one of four adjacent tiles. But he can't move on red tiles, he can move only on black tiles.Write a program to count 阅读全文
posted @ 2012-03-15 12:34
'wind
阅读(254)
评论(0)
推荐(0)
摘要:
View Code #include<stdio.h>#include<string.h>int id,jd,k,t,m,n,f[8]={0,0,1,-1,1,-1,0,0};char s[8][8];void dfs(int i,int j,int c){ int p,ii,jj; if(i==id&&j==jd) { if(c==k) t=1; return; } for(p=0;p<4;p++) { ii=i+f[p]; jj=j+f[p+4]; if(... 阅读全文
posted @ 2012-03-15 12:33
'wind
阅读(193)
评论(0)
推荐(0)
摘要:
DescriptionLeyni是一个地址调查员,有一天在他调查的地方突然出现个泉眼。由于当地的地势不均匀,有高有低,他觉得如果这个泉眼不断的向外溶出水来,这意味着这里在不久的将来将会一个小湖。水往低处流,凡是比泉眼地势低或者等于的地方都会被水淹没,地势高的地方水不会越过。而且又因为泉水比较弱,当所有地势低的地方被淹没后,水位将不会上涨,一直定在跟泉眼一样的水位上。 由于Leyni已经调查过当地很久了,所以他手中有这里地势的详细数据。所有的地图都是一个矩形,并按照坐标系分成了一个个小方格,Leyni知道每个方格的具体高度。我们假定当水留到地图边界时,不会留出地图外,现在他想通过这些数据分析出, 阅读全文
posted @ 2012-03-15 12:30
'wind
阅读(356)
评论(0)
推荐(0)
摘要:
Problem DescriptionDo you remember the box of Matryoshka dolls last week? Adam just got another box of dolls from Matryona. This time, the dolls have different shapes and sizes: some are skinny, some are fat, and some look as though they were attened. Specifically, doll i can be represented by three 阅读全文
posted @ 2012-03-15 01:00
'wind
阅读(237)
评论(0)
推荐(0)
摘要:
Problem Description给你一个n*n的格子的棋盘,每个格子里面有一个非负数。从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取的数所在的2个格子不能相邻,并且取出的数的和最大。Input包括多个测试实例,每个测试实例包括一个整数n 和n*n个非负数(n<=20)Output对于每个测试实例,输出可能取得的最大的和Sample Input375 15 21 75 15 28 34 70 5Sample Output188预备知识:点覆盖集:无向图G的一个点集,使得该图中所有边都至少有一个端点在该集合内。最小点权覆盖集:在带点权无向图G中,点权之和最小的覆盖集 阅读全文
posted @ 2012-03-15 00:59
'wind
阅读(238)
评论(0)
推荐(0)
摘要:
DescriptionBessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 <= N <= 500). The grid contains K asteroids (1 <= K <= 10,000), which are conveniently located at the lattice points of the grid. Fortunately, Bessie has a powerful weapo 阅读全文
posted @ 2012-03-15 00:58
'wind
阅读(229)
评论(0)
推荐(0)
摘要:
Problem DescriptionThere are a group of students. Some of them may know each other, while others don't. For example, A and B know each other, B and C know each other. But this may not imply that A and C know each other.Now you are given all pairs of students who know each other. Your task is to 阅读全文
posted @ 2012-03-15 00:57
'wind
阅读(256)
评论(0)
推荐(0)
摘要:
Problem DescriptionRPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Grass只愿意和linle或LL做partner,PrincessSnow愿意和水域浪子或伪酷儿做partner。考虑到经费问题,boss刘决定只让找到partner的人去坐过山车,其他的人,嘿嘿,就站在下面看着吧。聪明的Acmer,你可以帮忙算算最多有多少对组合可以坐上过山车吗 阅读全文
posted @ 2012-03-15 00:55
'wind
阅读(244)
评论(0)
推荐(0)
摘要:
Problem DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time to regrow. Thus, Farmer John has built a set of drainage ditches so that Bessie's clover 阅读全文
posted @ 2012-03-15 00:54
'wind
阅读(206)
评论(0)
推荐(0)
摘要:
Problem DescriptionNetwork flow is a well-known difficult problem for ACMers. Given a graph, your task is to find out the maximum flow for the weighted directed graph.InputThe first line of input contains an integer T, denoting the number of test cases.For each test case, the first line contains two 阅读全文
posted @ 2012-03-15 00:52
'wind
阅读(230)
评论(0)
推荐(0)
摘要:
Problem DescriptionNetwork flow is a well-known difficult problem for ACMers. Given a graph, your task is to find out the maximum flow for the weighted directed graph.InputThe first line of input contains an integer T, denoting the number of test cases.For each test case, the first line contains two 阅读全文
posted @ 2012-03-15 00:51
'wind
阅读(742)
评论(0)
推荐(0)
摘要:
Problem 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 metallic sticks which are of the same length.Now Pudge wants to do some operations on the hook.Let us number the consecutive metallic stick 阅读全文
posted @ 2012-03-15 00:49
'wind
阅读(194)
评论(0)
推荐(0)
摘要:
Problem DescriptionN个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气球被涂过几次颜色吗?Input每个测试实例第一行为一个整数N,(N <= 100000).接下来的N行,每行包括2个整数a b(1 <= a <= b <= N)。当N = 0,输入结束。Output每个测试实例输出一行,包括N个整数,第I个数代表第I个气球总共 阅读全文
posted @ 2012-03-15 00:47
'wind
阅读(434)
评论(0)
推荐(0)
摘要:
Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is the place where all possible announcements are posted: nearest programming competitions, changes in the dining room menu, and other important inf 阅读全文
posted @ 2012-03-15 00:45
'wind
阅读(198)
评论(0)
推荐(0)
摘要:
Problem DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai > aj.For a given sequence of numbers a1, a2, ..., an, if we move the first m >= 0 numbers to the end of the seqence, we will obtain another sequence. 阅读全文
posted @ 2012-03-15 00:44
'wind
阅读(201)
评论(0)
推荐(0)
摘要:
Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200000,0<M<5000 ),分别代表学生的数目和操作的数目。学生ID编号分别从1编到N。第二行包含N个整数,代表这N个学生的初始成绩,其中第i个数代表ID为i的学生的成绩。接下来有M行。每一行有一个 阅读全文
posted @ 2012-03-15 00:42
'wind
阅读(166)
评论(0)
推荐(0)
摘要:
Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情报局要研究敌人究竟演习什么战术,所以Tidy要随时向Derek汇报某一段连续的工兵营地一共有多少人,例如Derek问:“Tidy,马上汇报第3个营地到第10个营地共有多少人!”Tidy就要马上开始计算 阅读全文
posted @ 2012-03-15 00:41
'wind
阅读(179)
评论(0)
推荐(0)
摘要:
DescriptionAn array of sizen≤ 106is given to you. There is a sliding window of sizekwhich is moving from the very left of the array to the very right. You can only see theknumbers in the window. Each time the sliding window moves rightwards by one position. Following is an example:The array is [13-1 阅读全文
posted @ 2012-03-15 00:34
'wind
阅读(199)
评论(0)
推荐(0)
摘要:
DescriptionLeyni被人掳走,身在水深火热之中...小奈叶为了拯救Leyni,独自一人前往森林深处从静竹手中夺回昏迷中的Leyni。历经千辛万苦,小奈叶救出了Leyni,但是静竹为此极为恼怒,决定对他们发起最强烈的进攻。不过小奈叶有一个叫做能量保护圈的道具,可以保护他们。这个保护圈由n个小的小护盾围成一圈,从1到n编号。当某一块小护盾受到攻击的时候,小护盾就会抵消掉这次攻击,也就是说对这一块小护盾的攻击是无效攻击,从而保护圈里的人,不过小护盾在遭到一次攻击后,需要t秒进行冷却,在冷却期间受到的攻击都是有效攻击,此时他们就会遭到攻击, 即假设1秒时受到攻击并成功防御,到1+t秒时冷却 阅读全文
posted @ 2012-03-15 00:31
'wind
阅读(271)
评论(0)
推荐(0)
摘要:
DescriptionTigers are enclosed in wire-net fencing at zoo.If they get out of the fencing, they may attack people.We use some lines to present the fencing as the picture following:Your task is to judge if a tiger in the fencing or not.In picture 1 the tiger is in the fencing.Note that enclosed fencin 阅读全文
posted @ 2012-03-15 00:29
'wind
阅读(230)
评论(0)
推荐(0)
摘要:
Description一个封闭的多边形定义是被有限个线段包围。线段的相交点称作多边形的顶点,当你从多边形的一个顶点沿着线段行走时,最终你会回到出发点。凸多边形(convex)想必大家已经很熟悉了,下图给出了凸多边形和非凸多边形实例。这里讨论的是在平面坐标的封闭凸多边形,多变形的顶点一个顶点在原点(x=0,y=0).图2显示的那样。这样的图形有两种性质。第一种性质是多边形的顶点会在平面上少于等于三个象限,就如图二那样,第二向县里面没有多边形的点(x<0,y>0)。为了解释第二种性质,假设你沿着多边形旅行,从原点(0,0)出发遍历每个顶点一次,当你遍历到除原点(0,0)时候,从这一点画 阅读全文
posted @ 2012-03-15 00:28
'wind
阅读(331)
评论(0)
推荐(0)
摘要:
DescriptionArcheologists from the Antiquities and Curios Museum (ACM) have flown to Egypt to examine the great pyramid of Key-Ops. Using state-of-the-art technology they are able to determine that the lower floor of the pyramid is constructed from a series of straightline walls, which intersect to f 阅读全文
posted @ 2012-03-15 00:27
'wind
阅读(185)
评论(0)
推荐(0)
摘要:
DescriptionStan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to find the top sticks, that is these sticks such that there is no stick on top of them. Stan has noticed that the last thrown stick is always on top but he 阅读全文
posted @ 2012-03-15 00:25
'wind
阅读(222)
评论(0)
推荐(0)


浙公网安备 33010602011771号