自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

nudt_oys的博客

欢迎访问个人网站:https://www.cnblogs.com/littleorange/

  • 博客(66)
  • 收藏
  • 关注

原创 HDOJ 5253 连接的管道(最小生成树)

连接的管道Problem Description老 Jack 有一片农田,以往几年都是靠天吃饭的。但是今年老天格外的不开眼,大旱。所以老 Jack 决定用管道将他的所有相邻的农田全部都串联起来,这样他就可以从远处引水过来进行灌溉了。当老 Jack 买完所有铺设在每块农田内部的管道的时候,老 Jack 遇到了新的难题,因为每一块农田的地势高度都不同,所以要想将两块农田的管

2016-08-30 22:04:18 366

原创 HDOJ 3790 最短路径问题(双权值最短路)

最短路径问题Problem Description给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。 Input输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花费为p。最后一行是两个数

2016-08-27 10:09:29 724

原创 POJ 1511 Invitation Cards(双向最短路)

Invitation CardsDescriptionIn the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater an

2016-08-27 09:54:56 568

原创 POJ 3522 Slim Span(最小差值生成树)

Slim SpanDescriptionGiven an undirected weighted graph G, you should find one of spanning trees specified as follows.The graph G is an ordered pair (V, E), where V is a set of vertices {

2016-08-26 21:14:26 1716

原创 POJ 3268 Silver Cow Party(双向最短路)

Silver Cow PartyDescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤

2016-08-26 13:49:18 529

原创 POJ 3273 Conscription(最小生成树)

ConscriptionDescriptionWindy has a country, and he wants to build an army to protect his country. He has picked up N girls and M boys and wants to collect them to be his soldiers. To colle

2016-08-25 21:56:49 369

原创 HDOJ 1102 Constructing Roads(最小生成树)

Constructing RoadsProblem DescriptionThere 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

2016-08-24 18:04:35 317

原创 HDOJ 1856 More is better(并查集)

More is betterProblem DescriptionMr 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

2016-08-24 16:32:27 350

原创 POJ 1258 Agri-Net(最小生成树)

Agri-NetDescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course. 

2016-08-23 22:45:17 340

原创 POJ 3259 Wormholes(判负圈)

WormholesDescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to

2016-08-22 16:57:40 282

原创 HDOJ 3635 Dragon Balls(并查集)

Dragon BallsProblem DescriptionFive hundred years later, the number of dragon balls will increase unexpectedly, so it's too difficult for Monkey King(WuKong) to gather all of the dragon ba

2016-08-21 17:17:32 329

原创 CodeForces 707B Bakery(建图 + 枚举)

B. BakeryMasha wants to open her own bakery and bake muffins in one of the n cities numbered from 1 to n. There are m bidirectional roads, each of whose connects some pair of cities.

2016-08-21 09:12:23 506

原创 HDOJ 2066 一个人的旅行(最短路)

一个人的旅行Problem Description虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的人,汗~),但是草儿仍然很喜欢旅行,因为在旅途中 会遇见很多人(白马王子,^0^),很多事,还能丰富自己的阅历,还可以看美丽的风景……草儿想去很多地方,她想要去东京铁塔看夜景,去威尼斯看电影,去阳明山上看海芋,去纽约纯粹看雪景,去巴黎喝咖啡写信,去北京探望孟姜

2016-08-20 20:15:34 305

原创 POJ 3255 Roadblocks(次短路)

RoadblocksDescriptionBessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old home too quickly, because she lik

2016-08-20 16:00:10 274

转载 POJ 2142 The Balance(扩展欧几里德)

The BalanceDescriptionMs. Iyo Kiffa-Australis has a balance and only two kinds of weights to measure a dose of medicine. For example, to measure 200mg of aspirin using 300mg weights and 70

2016-08-19 23:35:53 646

原创 POJ 2115 C Looooops(扩展欧几里德 + 求解模线性方程)

C LooooopsDescriptionA Compiler Mystery: We are given a C-language style for loop of type for (variable = A; variable != B; variable += C) statement;I.e., a loop which starts by s

2016-08-19 21:53:42 396

原创 POJ 3070 Fibonacci(矩阵快速幂)

FibonacciDescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are:0, 1, 1, 2,

2016-08-19 19:58:41 239

原创 POJ 2349 Arctic Network(最小生成树)

Arctic NetworkDescriptionThe Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used

2016-08-18 22:57:51 368

原创 HDOJ 1875 畅通工程再续(最小生成树)

畅通工程再续Problem Description相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离

2016-08-18 22:42:47 349

原创 CodeForces 115A Party(并查集)

A. PartyA company has n employees numbered from 1 to n. Each employee either has no immediate manager or exactly one immediate manager, who is another employee with a different number. A

2016-08-18 15:41:47 496

原创 POJ 1724 ROADS(BFS + 优先队列)

ROADSDescriptionN cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associated with it : the road length and the toll that needs to be paid f

2016-08-17 23:46:33 420

原创 POJ 2485 Highways(最小生成树)

HighwaysDescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Flatopian government is awa

2016-08-17 22:16:13 263

原创 CSUOJ 1256 天朝的单行道(最短路)

1256: 天朝的单行道Description    在另一个平行宇宙中,有一个神奇的国度名叫天朝。天朝一共有N个城市(标号分别为1, 2, …, N),M条道路,为了方便交通管制,天朝的M条道路都是单行道。    不久前天朝大选,小Q当选了天朝的总统。小Q家住在城市1,但天朝的办公地点在城市N,于是为了便于工作,小Q决定举家从城市1搬迁到城市N去居住。然而小Q惊奇的发

2016-08-17 17:04:54 313

原创 HDOJ 1874 畅通工程续(最短路)

畅通工程续Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。 Input本题目包含多

2016-08-16 22:59:44 301

原创 CodeForces 471D MUH and Cube Walls(KMP)

D. MUH and Cube WallsPolar bears Menshykov and Uslada from the zoo of St. Petersburg and elephant Horace from the zoo of Kiev got hold of lots of wooden cubes somewhere. They started makin

2016-08-16 20:08:14 438

原创 HDOJ 1072 Nightmare(BFS)

NightmareProblem DescriptionIgnatius had a nightmare last night. He found himself in a labyrinth with a time bomb on him. The labyrinth has an exit, Ignatius should get out of the labyri

2016-08-16 16:51:31 356

原创 HDOJ 1166 敌兵布阵(树状数组)

敌兵布阵Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人

2016-08-14 22:26:59 309

转载 POJ 3321 Apple Tree(DFS + 树状数组)

Apple TreeDescriptionThere is an apple tree outside of kaka's house. Every autumn, a lot of apples will grow in the tree. Kaka likes apple very much, so he has been carefully nurturing the

2016-08-13 23:02:51 589

原创 CSUOJ 1726 你经历过绝望吗?两次!(BFS + 优先队列)

1726: 你经历过绝望吗?两次!Description4月16日,日本熊本地区强震后,受灾严重的阿苏市一养猪场倒塌,幸运的是,猪圈里很多头猪依然坚强存活。当地15名消防员耗时一天解救围困的“猪坚强”。不过与在废墟中靠吃木炭饮雨水存活36天的中国汶川“猪坚强”相比,熊本的猪可没那么幸运,因为它们最终还是没能逃过被送往屠宰场的命运。我们假设“猪坚强”被困在一个N*M的

2016-08-13 16:41:40 831

原创 CodeForces 706B Interesting drink(树状数组)

B. Interesting drinkVasiliy likes to rest after a hard work, so you may often meet him in some bar nearby. As all programmers do, he loves the famous drink "Beecola", which can be bought

2016-08-13 14:48:11 575

原创 POJ 2155 Matrix(二维树状数组)

MatrixDescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 We can change the m

2016-08-12 22:09:58 396

原创 POJ 1195 Mobile phones(二维树状数组)

Mobile phonesDescriptionSuppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares form an S * S ma

2016-08-12 17:27:53 320

原创 HDOJ 1272 小希的迷宫(并查集)

小希的迷宫Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一

2016-08-11 21:30:51 267

原创 HDOJ 1198 Farm Irrigation(并查集)

Farm IrrigationProblem DescriptionBenny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of samll squares. Water pipes are placed in these sq

2016-08-11 00:02:57 316

原创 POJ 2492 A Bug's Life(并查集)

A Bug's LifeDescriptionBackground Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only int

2016-08-10 21:02:43 270

原创 POJ 1611 The Suspects(并查集)

The SuspectsDescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission t

2016-08-10 20:49:08 238

原创 HDOJ 1558 Segment set(并查集 + 线段判交)

Segment setProblem 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. The problem is to f

2016-08-10 20:41:32 368

原创 HDOJ 3172 Virtual Friends(并查集 + STL)

Virtual FriendsProblem DescriptionThese days, you can do all sorts of things online. For example, you can use various websites to make virtual friends. For some people, growing their soc

2016-08-10 20:32:29 299

原创 HDOJ 1213 How Many Tables(并查集)

How Many TablesProblem DescriptionToday is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to noti

2016-08-09 21:45:57 300

原创 LightOJ 1265 Island of Survival(概率DP)

1265 - Island of SurvivalYou are in a reality show, and the show is way too real that they threw into an island. Only two kinds of animals are in the island, the tigers and the deer. Though un

2016-08-09 15:02:38 478

空空如也

空空如也

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

TA关注的人

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