摘要: 今天补了下 cf 239div2顿时信心再度受挫老子几乎已经木有时间了啊坐着等死的命。哎!!!到现在还只能做大众题,打铁都不行。每次D题都是有思路敲错,尼玛不带这么坑爹的。哎!不写了,写这个也是浪费时间,还不如去睡觉了呢。就这样吧。 阅读全文
posted @ 2014-03-31 19:58 acvc 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Print ArticleZero has an old printer that doesn't work well sometimes. As it is antique, he still like to use it to print articles. But it is too old to work for a long time and it will certainly wear and tear, so Zero use a cost to evaluate this degree.One day Zero want to print an article wh.. 阅读全文
posted @ 2014-03-28 21:41 acvc 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 很高端的理论,一下来自维基百科。在图论中,标号树的普吕弗(Prüfer)序列是由树唯一地产生的序列。n顶点的标号树有长n−2的普吕弗序列,可以从一个简单的迭代算法得到。普吕弗序列在1918年首先由海因茨·普吕弗用来证明凯莱公式。一棵树要得到普吕弗序列,方法是逐次去掉树的顶点,直到剩下两个顶点。考虑树T,其顶点为{1, 2, ...,n}。在第i步,去掉标号最小的叶,并把普吕弗序列的第i项设为这叶的邻顶点的标号。一棵树的序列明显是唯一的,而且长为n−2。这棵标号树有普吕弗序列{4,4,4,5}。把上述算法用在右图标号树。第一步,顶点1是最小标号的叶,因此首先去掉,普吕弗序列首 阅读全文
posted @ 2014-03-27 21:10 acvc 阅读(1808) 评论(0) 推荐(0) 编辑
摘要: DNA SequenceTime Limit:1000MSMemory Limit:65536KTotal Submissions:10868Accepted:4146DescriptionIt's well known that DNA Sequence is a sequence only contains A, C, T and G, and it's very useful to analyze a segment of DNA Sequence,For example, if a animal's DNA sequence contains segment A 阅读全文
posted @ 2014-03-25 21:42 acvc 阅读(188) 评论(0) 推荐(0) 编辑
摘要: A. Valera and Xtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputValera is a little boy. Yesterday he got a huge Math hometask at school, so Valera didn't have enough time to properly learn the English alphabet for his English lesson. Unfortunat 阅读全文
posted @ 2014-03-20 21:20 acvc 阅读(344) 评论(0) 推荐(0) 编辑
摘要: Road ConstructionTime Limit:2000MSMemory Limit:65536KTotal Submissions:7980Accepted:4014DescriptionIt's almost summer time, and that means that it's almost summer construction time! This year, the good people who are in charge of the roads on the tropical island paradise of Remote Island wou 阅读全文
posted @ 2014-03-19 21:44 acvc 阅读(233) 评论(0) 推荐(0) 编辑
摘要: by :Tsaidhttp://blog.csdn.net/tsaid/article/details/6877404[点连通度与边连通度]在一个无向连通图中,如果有一个顶点集合,删除这个顶点集合,以及这个集合中所有顶点相关联的边以后,原图变成多个连通块,就称这个点集为割点集合。一个图的点连通度的定义为,最小割点集合中的顶点数。类似的,如果有一个边集合,删除这个边集合以后,原图变成多个连通块,就称这个点集为割边集合。一个图的边连通度的定义为,最小割边集合中的边数。[双连通图、割点与桥]如果一个无向连通图的点连通度大于1,则称该图是点双连通的(point biconnected),简称双连通或重 阅读全文
posted @ 2014-03-19 20:23 acvc 阅读(413) 评论(0) 推荐(0) 编辑
摘要: Popular CowsTime Limit:2000MSMemory Limit:65536KTotal Submissions:21823Accepted:8900DescriptionEvery cow's dream is to become the most popular cow in the herd. In a herd of N (1 3#include4#include5#include6usingnamespacestd;7constintMAX=50000+10;8intvis[MAX];intsccno[MAX];9vectorG[MAX],vs,RG[MAX 阅读全文
posted @ 2014-03-19 19:19 acvc 阅读(150) 评论(0) 推荐(0) 编辑
摘要: A. Nutstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou haveanuts and lots of boxes. The boxes have a wonderful feature: if you putx(x ≥ 0)divisors (the spacial bars that can divide a box) to it, you get a box, divided intox + 1sections.You are 阅读全文
posted @ 2014-03-17 20:34 acvc 阅读(371) 评论(0) 推荐(0) 编辑
摘要: Sliding WindowTime Limit:12000MSMemory Limit:65536KTotal Submissions:35486Accepted:10492Case Time Limit:5000MSDescriptionAn 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 win 阅读全文
posted @ 2014-03-15 01:09 acvc 阅读(178) 评论(0) 推荐(0) 编辑