随笔分类 - ACM — 图论
摘要:【题解】:最短路径问题,保证距离最短的同时,学妹权值最大,哈哈【code】: 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 #define N 50005 8 #define INF 100000000 9 using namespace std; 10 11 struct Edge 12 { 13 int to; 14 int next; 15 int w; 16 int num; 17 }edge[Nb.dis; 30 return a.num p_q; 5...
阅读全文
摘要:http://poj.org/problem?id=3207Ikki's Story IV - Panda's TrickTime Limit:1000MSMemory Limit:131072KTotal Submissions:7021Accepted:2604Descriptionliympanda, one of Ikki’s friend, likes playing games with Ikki. Today after minesweeping with Ikki and winning so many times, he is tired of such ea
阅读全文
摘要:http://poj.org/problem?id=1094Sorting It All OutTime Limit:1000MSMemory Limit:10000KTotal Submissions:24505Accepted:8487DescriptionAn ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to largest. For example, th
阅读全文
摘要:http://poj.org/problem?id=2226Muddy FieldsTime Limit:1000MSMemory Limit:65536KTotal Submissions:7078Accepted:2622DescriptionRain has pummeled the cows' field, a rectangular grid of R rows and C columns (1 8 #include 9 #include 10 #include 11 #include 12 13 #define N 55 14 #define M N*N 15 using
阅读全文
摘要:http://poj.org/problem?id=3041AsteroidsTime Limit:1000MSMemory Limit:65536KTotal Submissions:12601Accepted:6849DescriptionBessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 8 #include 9 #include10 #include11 #include12 13 #define N 55014 using.
阅读全文
摘要:http://poj.org/problem?id=2060Taxi Cab SchemeTime Limit:1000MSMemory Limit:30000KTotal Submissions:5459Accepted:2286DescriptionRunning a taxi station is not all that simple. Apart from the obvious demand for a centralised coordination of the cabs in order to pick up the customers calling to get a ca
阅读全文
摘要:http://poj.org/problem?id=2728Desert KingTime Limit:3000MSMemory Limit:65536KTotal Submissions:18595Accepted:5245DescriptionDavid the Great has just become the king of a desert country. To win the respect of his people, he decided to build channels all over his country to bring water to every villag
阅读全文
摘要:http://poj.org/problem?id=2449Remmarguts' DateTime Limit:4000MSMemory Limit:65536KTotal Submissions:18168Accepted:4984Description"Good man never makes girls wait or breaks an appointment!" said the mandarin duck father. Softly touching his little ducks' head, he told them a story.&
阅读全文
摘要:http://poj.org/problem?id=3463SightseeingTime Limit:2000MSMemory Limit:65536KTotal Submissions:6420Accepted:2270DescriptionTour operator Your Personal Holiday organises guided bus trips across the Benelux. Every day the bus moves from one citySto another cityF. On this way, the tourists in the bus c
阅读全文
摘要:http://poj.org/problem?id=3522Slim SpanTime Limit:5000MSMemory Limit:65536KTotal Submissions:5666Accepted:2965DescriptionGiven an undirected weighted graphG, you should find one of spanning trees specified as follows.The graphGis an ordered pair (V,E), whereVis a set of vertices {v1,v2, …,vn} andEis
阅读全文
摘要:http://poj.org/problem?id=1236Network of SchoolsTime Limit:1000MSMemory Limit:10000KTotal Submissions:9481Accepted:3767DescriptionA number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools to which it distribut
阅读全文
摘要:http://poj.org/problem?id=2762Going from u to v or from v to u?Time Limit:2000MSMemory Limit:65536KTotal Submissions:12733Accepted:3286DescriptionIn order to make their sons brave, Jiajia and Wind take them to a big cave. The cave has n rooms, and one-way corridors connecting some rooms. Each time,
阅读全文
摘要:题目地址:http://poj.org/problem?id=2553The Bottom of a GraphTime Limit:3000MSMemory Limit:65536KTotal Submissions:7881Accepted:3263DescriptionWe will use the following (standard) definitions from graph theory. LetVbe a nonempty and finite set, its elements being called vertices (or nodes). LetEbe a subs
阅读全文
摘要:http://poj.org/problem?id=2186Popular CowsTime Limit:2000MSMemory Limit:65536KTotal Submissions:20191Accepted:8193DescriptionEvery cow's dream is to become the most popular cow in the herd. In a herd of N (1 7 #include 8 #include 9 #include 10 #include 11 #include 12 13 #define N 10010 14 using.
阅读全文
摘要:http://poj.org/problem?id=3013Big Christmas TreeTime Limit:3000MSMemory Limit:131072KTotal Submissions:19009Accepted:4048DescriptionChristmas is coming to KCM city. Suby the loyal civilian in KCM city is preparing a big neat Christmas tree. The simple structure of the tree is shown in right picture.
阅读全文
摘要:http://poj.org/problem?id=1679The Unique MSTTime Limit:1000MSMemory Limit:10000KTotal Submissions:17726Accepted:6150DescriptionGiven a connected undirected graph, tell if its minimum spanning tree is unique.Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning t
阅读全文
摘要:http://poj.org/problem?id=3249Test for JobTime Limit:5000MSMemory Limit:65536KTotal Submissions:8206Accepted:1831DescriptionMr.Dog was fired by his company. In order to support his family, he must find a new job as soon as possible. Nowadays, It's hard to have a job, since there are swelling num
阅读全文
摘要:http://poj.org/problem?id=2230WatchcowTime Limit:3000MSMemory Limit:65536KTotal Submissions:5236Accepted:2194Special JudgeDescriptionBessie's been appointed the new watch-cow for the farm. Every night, it's her job to walk across the farm and make sure that no evildoers are doing any evil. S
阅读全文
摘要:http://poj.org/problem?id=1386Play on WordsTime Limit:1000MSMemory Limit:10000KTotal Submissions:8092Accepted:2848DescriptionSome of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is no other way to open the doors
阅读全文
摘要:CatenymsTime Limit:1000MSMemory Limit:65536KTotal Submissions:8078Accepted:2127DescriptionA catenym is a pair of words separated by a period such that the last letter of the first word is the same as the last letter of the second. For example, the following are catenyms:dog.gophergopher.ratrat.tiger
阅读全文

浙公网安备 33010602011771号