自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(92)
  • 资源 (1)
  • 收藏
  • 关注

原创 More is better(HDU 1856)

题目链接题目描述Mr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course there are certain requirements.Mr Wang selected a room big enough to hold the boys. The boy who ar.

2020-06-08 16:48:41 166

原创 Is It A Tree?(HDU 1325)---并查集+树知识

题目链接题目描述A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following properties.There is exactly one node, called the root, to whi.

2020-06-08 14:20:13 218

原创 Battle ships(HDU 5093)---行列缩点建图求最大匹配数

题目链接题目描述Dear contestant, now you are an excellent navy commander, who is responsible of a tough mission currently.Your fleet unfortunately encountered an enemy fleet near the South Pole where th...

2020-05-06 17:25:32 148

原创 Fire Net(HDU 1045)---行列缩点建图最大匹配数

题目链接题目描述Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall.A blockhouse is a sma...

2020-05-06 16:21:17 158

原创 Ollivanders: Makers of Fine Wands since 382 BC(HDU 1179)---二分图最大匹配数

题目链接题目描述In Diagon Alley ,there is only one Wand-seller,peeling gold letters over the door read Ollivanders: Makers of Fine Wands since 382 BC.A single wand lay on a faded purple cushion in the du...

2020-05-05 15:34:51 236

原创 过山车(HDU 2063)---最大匹配数

题目链接题目描述RPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Grass只愿意和linle或LL做partner,PrincessSnow愿意和水域浪子或伪...

2020-05-05 03:46:27 197

原创 Gopher II(POJ 2536)---二分图最大匹配

题目链接题目描述The gopher family, having averted the canine threat, must face a new predator.The are n gophers and m gopher holes, each at distinct (x, y) coordinates. A hawk arrives and if a gopher do...

2020-05-05 02:39:25 121

原创 Selecting Courses(POJ 2239)---二分图最大匹配

题目链接题目描述Farmer John completed his new barn just last week, complete with all the latest milking technology. Unfortunately, due to engineering problems, all the stalls in the new barn are differen...

2020-05-05 01:37:34 116

原创 The Perfect Stall(POJ 1274)---二分图最大匹配模板题

题目链接题目描述Farmer John completed his new barn just last week, complete with all the latest milking technology. Unfortunately, due to engineering problems, all the stalls in the new barn are differen...

2020-05-05 00:38:53 136

原创 COURSES(POJ 1469)---二分图最大匹配

题目链接题目描述Consider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is possible to form a committee of exactly P stu...

2020-05-04 23:59:09 111

原创 Arbiter(HDU 3118)---二进制枚举+去边构造二分图

题目链接题目描述Arbiter is a kind of starship in the StarCraft science-fiction series. The Arbiter-class starship is a Protoss warship specializing in providing psychic support. Arbiters were crewed excl...

2020-05-04 21:25:16 691

原创 Catch(HDU 3478)---二分图思想

题目链接题目描述A thief is running away!We can consider the city where he locates as an undirected graph in which nodes stand for crosses and edges stand for streets. The crosses are labeled from 0 to N...

2020-05-04 00:20:27 126

原创 营救(洛谷 P1396)---最小瓶颈路模板题

题目链接题目描述妈妈下班回家,街坊邻居说小明被一群陌生人强行押上了警车!妈妈丰富的经验告诉她小明被带到了 tt 区,而自己在 ss 区。该市有 mm 条大道连接 nn 个区,一条大道将两个区相连接,每个大道有一个拥挤度。小明的妈妈虽然很着急,但是不愿意拥挤的人潮冲乱了她优雅的步伐。所以请你帮她规划一条从 ss 至 tt 的路线,使得经过道路的拥挤度最大值最小。输入格式第一行有四个用...

2020-05-02 18:23:02 349

原创 Out of Hay(POJ 2395)---最小瓶颈生成树模板题

题目链接题目描述The cows have run out of hay, a horrible event that must be remedied immediately. Bessie intends to visit the other farms to survey their hay situation. There are N (2 <= N <= 2,000...

2020-05-02 18:18:23 112

原创 Ice_cream’s world II(HDU 2121)---无定根最小树形图(超级源点)

题目链接题目描述After awarded lands to ACMers, the queen want to choose a city be her capital. This is an important event in ice_cream world, and it also a very difficult problem, because the world have ...

2020-05-02 18:09:47 145

原创 Command Network(POJ 3164)---定根最小树形图模板题

题目链接题目描述After 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 ...

2020-05-02 17:58:33 103

原创 Qin Shi Huang's National Road System(HDU-4081)---次小生成树思想

题目链接题目描述During the Warring States Period of ancient China(476 BC to 221 BC), there were seven kingdoms in China ---- they were Qi, Chu, Yan, Han, Zhao, Wei and Qin. Ying Zheng was the king of the...

2020-05-02 17:43:54 85

原创 The Unique MST(POJ 1679)---次小生成树模板题

题目链接题目描述Given 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 tree of G is a...

2020-05-02 17:25:40 161

原创 扩散(洛谷 P1661)---曼哈顿最小生成树模板题(朴素版)

题目链接题目描述一个点每过一个单位时间就会向四个方向扩散一个距离,如图。两个点a、b连通,记作e(a,b),当且仅当a、b的扩散区域有公共部分。连通块的定义是块内的任意两个点u、v都必定存在路径e(u,a0),e(a0,a1),…,e(ak,v)。给定平面上的n给点,问最早什么时刻它们形成一个连通块。输入格式第一行一个数n,以下n行,每行一个点坐标。【数据规模】对于20%的数...

2020-04-30 15:46:56 189

原创 find the most comfortable road(HDU 1598)---并查集+贪心

题目链接题目描述XX星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure—超级空中漫游结构)进行交流,每条SARS都对行驶在上面的Flycar限制了固定的Speed,同时XX星人对 Flycar的“舒适度”有特殊要求,即乘坐过程中最高速度与最低速度的差越小乘坐越舒服 ,(理解为SARS的限速要求,flycar必须瞬间提速/降速,痛苦呀 )...

2020-04-30 15:13:08 132

原创 Building Roads(POJ 3625)---局部连通的最小生成树(稠密图Prim算法)

题目链接题目描述Farmer John had just acquired several new farms! He wants to connect the farms with roads so that he can travel from any farm to any other farm via a sequence of roads; roads already conn...

2020-04-30 00:15:55 132

原创 Connect the Cities(HDU 3371)---局部连通的最小生成树

题目链接题目描述In 2100, since the sea level rise, most of the cities disappear. Though some survived cities are still connected with others, but most of them become disconnected. The government wants to...

2020-04-29 21:45:12 126

原创 Pseudoforest(HDU 3367)---伪森林(贪心+Kruskal算法思想)

题目链接题目描述In graph theory, a pseudoforest is an undirected graph in which every connected component has at most one cycle. The maximal pseudoforests of G are the pseudoforest subgraphs of G that ar...

2020-04-29 20:58:43 399

原创 Constructing Roads(HDU 1102)---已确定边的最小生成树(Kruskal算法)

题目链接题目描述There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, if ...

2020-04-29 15:50:17 113

原创 继续畅通工程(HDU 1879)---已确定部分边的最小生成树(Kruskal算法)

题目链接题目描述省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。现得到城镇道路统计表,表中列出了任意两城镇间修建道路的费用,以及该道路是否已经修通的状态。现请你编写程序,计算出全省畅通需要的最低成本。输入格式测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( 1< N < 100 );...

2020-04-29 13:52:31 209 1

原创 还是畅通工程(HDU 1233)---最小生成树模板题(Prim和Kruskal)

题目链接题目描述某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。输入格式测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( < 100 );随后的N(N-1)/2行对应村庄间的...

2020-04-29 13:27:41 315

原创 Jungle Roads(HDU 1301)---最小生成树模板题(Prim算法和Kruskal算法)

题目链接题目描述The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads ...

2020-04-29 13:24:22 242

原创 Eddy's picture(HDU 1162)---最小生成树模板题(Prim+Kruskal)

题目链接题目描述Eddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his small room, and he usually puts out his newest pictures to l...

2020-04-29 13:20:05 158

原创 Peaceful Commission(HDU 1814)---2-SAT输出最小序的解

题目链接题目描述The Public Peace Commission should be legislated in Parliament of The Democratic Republic of Byteland according to The Very Important Law. Unfortunately one of the obstacles is the fact t...

2020-04-27 16:05:32 124

原创 Building roads(POJ 2749)---2-SAT模板题+二分

题目链接题目描述Farmer John’s farm has N barns, and there are some cows that live in each barn. The cows like to drop around, so John wants to build some roads to connect these barns. If he builds roads ...

2020-04-27 11:28:12 632

原创 Katu Puzzle(POJ 3678)---2-SAT模板题判断解

题目链接题目描述Katu Puzzle is presented as a directed graph G(V, E) with each edge e(a, b) labeled by a boolean operator op (one of AND, OR, XOR) and an integer c (0 ≤ c ≤ 1). One Katu is solvable if on...

2020-04-27 00:50:14 177

原创 Perfect Election(POJ 3905)---2-SAT模板题判断

题目链接题目描述In a country (my memory fails to say which), the candidates {1, 2 …, N} are running in the parliamentary election. An opinion poll asks the question “For any two candidates of your own ch...

2020-04-26 18:58:10 111

原创 Wedding(POJ 3648)---2-SAT模板题输出任意一组解(tarjan求解)

题目链接题目描述Up to thirty couples will attend a wedding feast, at which they will be seated on either side of a long table. The bride and groom sit at one end, opposite each other, and the bride wears...

2020-04-26 17:10:42 205 1

原创 Let's go home(POJ 1824)---2-SAT模板题

题目链接题目描述小时候,乡愁是一枚小小的邮票,我在这头,母亲在那头。—— 余光中集训是辛苦的,道路是坎坷的,休息还是必须的。经过一段时间的训练,lcy决定让大家回家放松一下,但是训练还是得照常进行,lcy想出了如下回家规定,每一个队(三人一队)或者队长留下或者其余两名队员同时留下;每一对队员,如果队员A留下,则队员B必须回家休息下,或者B留下,A回家。由于今年集训队人数突破往年同期最...

2020-04-24 21:01:33 170

原创 Redundant Paths(POJ 3177)---含重边的加边双连通

题目链接题目描述In order to get from one of the F (1 <= F <= 5,000) grazing fields (which are numbered 1…F) to another field, Bessie and the rest of the herd are forced to cross near the Tree of Ro...

2020-04-24 14:42:07 197 4

原创 Road Construction(POJ 3352)---加边双连通

题目链接题目描述It’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 Isla...

2020-04-24 14:23:22 358

原创 Financial Crisis(HDU 3749)---点双+并查集

题目链接题目描述Because of the financial crisis, a large number of enterprises go bankrupt. In addition to this, other enterprises, which have trade relation with the bankrup enterprises, are also faced ...

2020-04-23 21:24:07 118

原创 Street Directions(POJ 1515)---无向连通图->有向强连通图

题目链接题目描述According to the Automobile Collision Monitor (ACM), most fatal traffic accidents occur on two-way streets. In order to reduce the number of fatalities caused by traffic accidents, the ma...

2020-04-22 15:30:04 271

原创 Caocao's Bridges(HDU 4738)-----重边无向图+桥

题目链接题目描述Caocao was defeated by Zhuge Liang and Zhou Yu in the battle of Chibi. But he wouldn’t give up. Caocao’s army still was not good at water battles, so he came up with another idea. He buil...

2020-04-21 19:32:10 236

原创 By Recognizing These Guys, We Find Social Networks Useful(HDU 3849)---桥模板题

题目链接题目描述Social Network is popular these days.The Network helps us know about those guys who we are following intensely and makes us keep up our pace with the trend of modern times.But how?By wh...

2020-04-21 17:36:51 162

BusSearchApplication.zip

安卓大作业公交查询系统

2021-02-19

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除