随笔分类 -  最小生成树,最短路,并查集

摘要:A Bug's LifeTime Limit: 15000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6742Accepted Submission(s): 2197Problem DescriptionBackgroundProfessor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different 阅读全文
posted @ 2013-09-12 22:51 线性无关 阅读(82) 评论(0) 推荐(0)
摘要:Segment setTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2896Accepted Submission(s): 1073Problem DescriptionA segment and all segments which are connected with it compose a segment set. The size of a segment set is the number of segments in it. T 阅读全文
posted @ 2013-09-12 21:48 线性无关 阅读(107) 评论(0) 推荐(0)
摘要:EvolutionTime Limit: 20000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 435Accepted Submission(s): 93Problem DescriptionEvery kind of living creatures has a kind of DNA. The nucleotide bases from which DNA is built are A (adenine), C (cytosine), G (guanine), an. 阅读全文
posted @ 2013-09-12 21:45 线性无关 阅读(133) 评论(0) 推荐(0)
摘要:RegroupTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 590Accepted Submission(s): 135Problem DescriptionWhen ALPC42 got to a panzer brigade, He was asked to build software to help them regroup the battalions or companies.As the tradition of army, . 阅读全文
posted @ 2013-09-12 20:33 线性无关 阅读(99) 评论(0) 推荐(0)
摘要:John are playing with blocks. There are N blocks (1 #include#include#includeusingnamespacestd;intfa[60000],sum[60000],n,rank[60000];voidinit(){for(inti=0;i>ch;if(ch=='M'){cin>>i>>j;bin(i,j);}else{cin>>i;find(i);cout<<sum[i]<<endl;}}}return0;} 阅读全文
posted @ 2013-09-12 13:23 线性无关 阅读(161) 评论(0) 推荐(0)
摘要:Zjnu StadiumTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 999Accepted Submission(s): 394Problem DescriptionIn 12th Zhejiang College Students Games 2007, there was a new stadium built in Zhejiang Normal University. It was a modern stadium which c. 阅读全文
posted @ 2013-09-12 11:33 线性无关 阅读(96) 评论(0) 推荐(0)
摘要:Find them, Catch themTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 26287Accepted: 7940DescriptionThe police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs to identif. 阅读全文
posted @ 2013-09-10 23:50 线性无关 阅读(115) 评论(0) 推荐(0)
摘要:食物链Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 37456Accepted: 10901Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用两种说法对这N个动物所构成的食物链关系进行描述: 第一种说法是"1 X Y",表示X和Y是同类。 第二种说法是"2 X Y",表示X吃Y。 此人对N个动物,用上述两种说法,一句接一句 阅读全文
posted @ 2013-09-10 23:09 线性无关 阅读(143) 评论(0) 推荐(0)
摘要:Transfer waterTime Limit: 5000/3000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 3045Accepted Submission(s): 1136Problem DescriptionXiaoA lives in a village. Last year flood rained the village. So they decide to move the whole village to the mountain nearby this yea. 阅读全文
posted @ 2013-09-10 01:09 线性无关 阅读(117) 评论(0) 推荐(0)
摘要:Command NetworkTime Limit: 1000MSMemory Limit: 131072KTotal Submissions: 10800Accepted: 3153DescriptionAfter a long lasting war on words, a war on arms finally breaks out between littleken’s and KnuthOcean’s kingdoms. A sudden and violent assault by KnuthOcean’s force has rendered a total failure o. 阅读全文
posted @ 2013-09-10 00:25 线性无关 阅读(136) 评论(0) 推荐(0)
摘要:Two Famous CompaniesTime Limit: 50000/15000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 407Accepted Submission(s): 116Problem DescriptionIn China, there are two companies offering the Internet service for the people from all cities: China Telecom and China Unicom. . 阅读全文
posted @ 2013-09-09 15:55 线性无关 阅读(149) 评论(0) 推荐(0)
摘要:find the most comfortable roadTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2779Accepted Submission(s): 1186Problem DescriptionXX星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure---超级空中漫游结构)进行交流,每条SARS都对行驶在上面的Flycar限制了固定的Speed,同时XX星人对 Flycar的“舒 阅读全文
posted @ 2013-09-02 18:08 线性无关 阅读(115) 评论(0) 推荐(0)
摘要:In ActionProblem DescriptionSince 1945, when the first nuclear bomb was exploded by the Manhattan Project team in the US, the number of nuclear weapons have soared across the globe.Nowadays,the crazy boy in FZU named AekdyCoin possesses some nuclear weapons and wanna destroy our world. Fortunately,. 阅读全文
posted @ 2013-09-02 15:53 线性无关 阅读(125) 评论(0) 推荐(0)
摘要:A Walk Through the ForestTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4448 Accepted Submission(s): 1597Problem DescriptionJimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax aft.. 阅读全文
posted @ 2013-07-29 02:47 线性无关 阅读(124) 评论(0) 推荐(0)
摘要:Connect themTime Limit: 1 Second Memory Limit: 32768 KBYou have n computers numbered from 1 to n and you want to connect them to make a small local area network (LAN). All connections are two-way (that is connecting computers i and j is the same as connecting computers j and i). The cost of connecti 阅读全文
posted @ 2013-07-05 22:22 线性无关 阅读(303) 评论(0) 推荐(0)