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

摘要:Sightseeing tripTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4356Accepted: 1677Special JudgeDescriptionThere is a travel agency in Adelton town on Zanzibar island. It has decided to offer its clients, besides many other attractions, sightseeing the town. To earn as much as possible from 阅读全文
posted @ 2013-09-22 11:28 线性无关 阅读(145) 评论(0) 推荐(0)
摘要:Count The PairsTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 103Accepted Submission(s): 47 Problem DescriptionWith the 60th anniversary celebration of Nanjing University of Science and Technology coming soon, the university sets n tourist spot 阅读全文
posted @ 2013-09-21 19:43 线性无关 阅读(113) 评论(0) 推荐(0)
摘要:PortalTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 657Accepted Submission(s): 332 Problem DescriptionZLGG found a magic theory that the bigger banana the bigger banana peel .This important theory can help him make a portal in our universal. Unf 阅读全文
posted @ 2013-09-21 19:20 线性无关 阅读(131) 评论(0) 推荐(0)
摘要:The DoorsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 5526Accepted: 2230DescriptionYou are to find the length of the shortest path through a chamber containing obstructing walls. The chamber will always have sides at x = 0, x = 10, y = 0, and y = 10. The initial and final points of the p 阅读全文
posted @ 2013-09-20 22:08 线性无关 阅读(134) 评论(0) 推荐(0)
摘要:Invade the MarsTime Limit: 5000/2000 MS (Java/Others)Memory Limit: 365768/165536 K (Java/Others)Total Submission(s): 1061Accepted Submission(s): 309Problem DescriptionIt's now the year 21XX,when the earth will explode soon.The evil U.S. decided to invade the Mars to save their lives.But the chil 阅读全文
posted @ 2013-09-17 20:12 线性无关 阅读(172) 评论(0) 推荐(0)
摘要:TravelTime Limit: 10000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1354Accepted Submission(s): 463Problem DescriptionOne day, Tom traveled to a country named BGM. BGM is a small country, but there are N (N #include#include#include#include#include#includeusing. 阅读全文
posted @ 2013-09-17 15:48 线性无关 阅读(146) 评论(0) 推荐(0)
摘要:ShoppingTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 374Accepted Submission(s): 139Problem DescriptionYou have just moved into a new apartment and have a long list of items you need to buy. Unfortunately, to buy this many items requires going . 阅读全文
posted @ 2013-09-17 00:52 线性无关 阅读(150) 评论(0) 推荐(0)
摘要:TruckingTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1488Accepted Submission(s): 515Problem DescriptionA certain local trucking company would like to transport some goods on a cargo truck from one place to another. It is desirable to transpor. 阅读全文
posted @ 2013-09-16 23:05 线性无关 阅读(127) 评论(0) 推荐(0)
摘要:Delay Constrained Maximum Capacity PathTime Limit: 10000/10000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 560Accepted Submission(s): 197Problem DescriptionConsider an undirected graph with N vertices, numbered from 1 to N, and M edges. The vertex numbered with 1 co 阅读全文
posted @ 2013-09-16 20:59 线性无关 阅读(115) 评论(0) 推荐(0)
摘要:Earth HourTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 125536/65536 K (Java/Others)Total Submission(s): 1165Accepted Submission(s): 472Problem DescriptionEarth Hour is an annual international event created by the WWF (World Wide Fund for Nature/World Wildlife Fund), held on the last Saturday. 阅读全文
posted @ 2013-09-16 19:09 线性无关 阅读(126) 评论(0) 推荐(0)
摘要:zz's Mysterious PresentTime Limit: 10000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 721Accepted Submission(s): 154Problem DescriptionThere are m people in n cities, and they all want to attend the party which hold by zz. They set out at the same time, and 阅读全文
posted @ 2013-09-16 17:01 线性无关 阅读(134) 评论(0) 推荐(0)
摘要:Harry Potter and the Final BattleTime Limit: 5000/3000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1991Accepted Submission(s): 543Problem DescriptionThe final battle is coming. Now Harry Potter is located at city 1, and Voldemort is located at city n. To make the w. 阅读全文
posted @ 2013-09-16 16:29 线性无关 阅读(770) 评论(0) 推荐(0)
摘要:find the longest of the shortestTime Limit: 1000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1173Accepted Submission(s): 409Problem DescriptionMarica is very angry with Mirko because he found a new girlfriend and she seeks revenge.Since she doesn't live in 阅读全文
posted @ 2013-09-16 15:54 线性无关 阅读(324) 评论(0) 推荐(0)
摘要:constintinf=1000000000;constintmaxn=300010;intdist[maxn],head[maxn],tol,m,n;structEdge{intto,next,val;}edge[10*maxn];voidadd(intu,intv,intw){edge[tol].to=v;edge[tol].next=head[u];edge[tol].val=w;head[u]=tol++;}structNode{intid,dist;Node(inta=0,intb=0):id(a),dist(b){}booloperatorb.dist;}};voidfun(i.. 阅读全文
posted @ 2013-09-16 01:01 线性无关 阅读(192) 评论(0) 推荐(0)
摘要:The Shortest Path in Nya GraphTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1319Accepted Submission(s): 293Problem DescriptionThis is a very easy problem, your task is just calculate el camino mas corto en un grafico, and just solo hay que cambi. 阅读全文
posted @ 2013-09-15 22:38 线性无关 阅读(129) 评论(0) 推荐(0)
摘要:A Walk Through the ForestTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4748Accepted Submission(s): 1717Problem DescriptionJimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax after . 阅读全文
posted @ 2013-09-15 22:03 线性无关 阅读(113) 评论(0) 推荐(0)
摘要:ArbitrageTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3469Accepted Submission(s): 1579Problem DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same cu. 阅读全文
posted @ 2013-09-15 21:32 线性无关 阅读(147) 评论(0) 推荐(0)
摘要:PseudoforestTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1276Accepted Submission(s): 482Problem DescriptionIn graph theory, a pseudoforest is an undirected graph in which every connected component has at most one cycle. The maximal pseudofores. 阅读全文
posted @ 2013-09-13 16:39 线性无关 阅读(127) 评论(0) 推荐(0)
摘要:Junk-Mail FilterTime Limit: 15000/8000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5023Accepted Submission(s): 1611Problem DescriptionRecognizing junk mails is a tough task. The method used here consists of two steps:1) Extract the common characteristics from the i. 阅读全文
posted @ 2013-09-13 16:12 线性无关 阅读(114) 评论(0) 推荐(0)
摘要:Hand in HandTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 122768/62768 K (Java/Others)Total Submission(s): 1005Accepted Submission(s): 370Problem DescriptionIn order to get rid of Conan, Kaitou KID disguises himself as a teacher in the kindergarten. He knows kids love games and works out a ne. 阅读全文
posted @ 2013-09-13 13:47 线性无关 阅读(143) 评论(0) 推荐(0)