01 2014 档案

摘要:Problem DescriptionGiven two positive integersnandk, you are asked to generate a new integer, saym, by changing some (maybe none) digits ofn, such that the following properties holds:mcontains no leading zeros and has the same length asn(We considerzeroitself a one-digit integer without leading zero 阅读全文
posted @ 2014-01-30 11:35 persistent codeants 阅读(540) 评论(0) 推荐(0)
摘要:Problem DescriptionAcellular automatonis a collection of cells on a grid of specified shape that evolves through a number of discrete time steps according to a set of rules that describe the new state of a cell based on the states of neighboring cells. Theorder of the cellular automatonis the number 阅读全文
posted @ 2014-01-29 15:13 persistent codeants 阅读(902) 评论(0) 推荐(0)
摘要:题意:把奶牛分成3组,只要有两组大于1/2量,用深搜剪枝 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int maxn=220; 7 struct node 8 { 9 int key,id;10 bool operator xx.key;13 }14 }data[maxn];15 16 bool cmp(const node &p,const node &q)17 {18 return p.keyn*500&&sum[n+n]-ans>n*500). 阅读全文
posted @ 2014-01-27 12:22 persistent codeants 阅读(528) 评论(0) 推荐(0)
摘要:把题意写一下: 给你一个n*n的矩阵,每个格子都有一个非负整数,从左上角走到右下角,收集走过的数字,累加,但是只能向右或者向下走,走过之后数字就变为0,让你求从左上角到右下角,走k次之后,所得的最大值是多少。典型的最小费用最大流入门题,只需在建图时,把源点到1的cap设成k,对走完一次变成0的处理时,只需拆点,拆成两条边,一条容量为1,权值为点权,另一条是跳板,容量为inf,费用为0,即可******************************************************************************************************** 阅读全文
posted @ 2014-01-27 11:48 persistent codeants 阅读(462) 评论(0) 推荐(0)
摘要:Problem DescriptionThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the island. But unfortunately, these maps describe different regions of Atlantis. Your friend Bill has to know the total area for which 阅读全文
posted @ 2014-01-23 15:59 persistent codeants 阅读(428) 评论(0) 推荐(0)
摘要:Problem DescriptionFleeting time does not blur my memory of you. Can it really be 4 years since I first saw you? I still remember, vividly, on the beautiful Zhuhai Campus, 4 years ago, from the moment I saw you smile, as you were walking out of the classroom and turned your head back, with the soft 阅读全文
posted @ 2014-01-22 18:23 persistent codeants 阅读(618) 评论(0) 推荐(0)
摘要:Problem DescriptionThe little cat takes over the management of a new park. There is a large circular statue in the center of the park, surrounded by N pots of flowers. Each potted flower will be assigned to an integer number (possibly negative) denoting how attractive it is. See the following graph 阅读全文
posted @ 2014-01-21 12:49 persistent codeants 阅读(472) 评论(0) 推荐(0)
摘要:Problem DescriptionYou are given a sequence ofnintegersa1, a2, ... , anin non-decreasing order. In addition to that, you are given several queries consisting of indicesiandj(1 ≤ i ≤ j ≤ n). For each query, determine the most frequent value among the integersai, ... , aj.InputThe input consists of se 阅读全文
posted @ 2014-01-20 17:16 persistent codeants 阅读(501) 评论(0) 推荐(0)
摘要:Problem DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and not to the right of the given star. Astronomers want to know the distribution of 阅读全文
posted @ 2014-01-20 14:33 persistent codeants 阅读(752) 评论(0) 推荐(0)
摘要:Problem DescriptionImagine you are attending your math lesson at school. Once again, you are bored because your teacher tells things that you already mastered years ago (this time he's explaining that (a+b)2=a2+2ab+b2). So you decide to waste your time with drawing modern art instead.Fortunately 阅读全文
posted @ 2014-01-19 16:36 persistent codeants 阅读(533) 评论(0) 推荐(0)
摘要:Problem DescriptionTransmitting and memorizing information is a task that requires different coding systems for the best use of the available space. A well known system is that one where a number is associated to a character sequence. It is considered that the words are made only of small characters 阅读全文
posted @ 2014-01-19 15:19 persistent codeants 阅读(423) 评论(0) 推荐(0)
摘要:Problem DescriptionThe cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as 'Rock, Paper, Scissors', 'Ro, Sham, Bo', and a host of other names) in order to make arbitrary decisions such as who gets to be milked first. The 阅读全文
posted @ 2014-01-19 10:53 persistent codeants 阅读(338) 评论(0) 推荐(0)
摘要:Problem DescriptionWhen a radio station is broadcasting over a very large area, repeaters are used to retransmit the signal so that every receiver has a strong signal. However, the channels used by each repeater must be carefully chosen so that nearby repeaters do not interfere with one another. Thi 阅读全文
posted @ 2014-01-18 14:46 persistent codeants 阅读(593) 评论(0) 推荐(0)
摘要:Problem DescriptionIn a certain course, you takentests. If you getaiout ofbiquestions correct on testi, your cumulative average is defined to be.Given your test scores and a positive integerk, determine how high you can make your cumulative average if you are allowed to drop anykof your test scores. 阅读全文
posted @ 2014-01-16 14:49 persistent codeants 阅读(142) 评论(0) 推荐(0)
摘要:Problem DescriptionYou are given threen×nmatricesA,BandC. Does the equationA×B=Chold true?InputThe first line of input contains a positive integern(n≤ 500) followed by the the three matricesA,BandCrespectively. Each matrix's description is a block of n × n integers.It guarantees t 阅读全文
posted @ 2014-01-15 17:15 persistent codeants 阅读(140) 评论(0) 推荐(0)
摘要:Cow SortingTime Limit : 4000/2000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 16Accepted Submission(s) : 2Problem DescriptionFarmer John'sN(1 ≤N≤ 10,000) cows are lined up to be milked in the evening. Each cow has a unique "grumpiness" level in the rang 阅读全文
posted @ 2014-01-15 16:17 persistent codeants 阅读(258) 评论(0) 推荐(0)