自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Ice_Confuse

go ahead

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

原创 【POJ 3126】Prime Path(枚举+BFS)

DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It is a m

2016-07-29 20:55:07 237

原创 【POJ 3279】Fliptile(状压DP+搜索)

DescriptionFarmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate an M × N grid (1 ≤ M ≤ 15;

2016-07-29 16:10:11 444

原创 【HDU 1506】Largest Rectangle in a Histogram(DP)

Problem DescriptionA histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figure

2016-07-26 20:36:15 423 1

原创 【HDU 1950】Bridging signals(LIS算法求最长上升子序列)

Problem Description‘Oh no, they’ve done it again’, cries the chief designer at the Waferland chip factory. Once more the routing designers have screwed up completely, making the signals on the chip con

2016-07-26 20:25:45 358

原创 【LightOJ 1013】Love Calculator(LCS+DP)

Problem DescriptionYes, you are developing a ‘Love calculator’. The software would be quite complex such that nobody could crack the exact behavior of the software.So, given two names your software wil

2016-07-26 20:17:06 439

原创 【HDU 1159】Common Subsequence(最长公共序列LCS算法)

Problem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = Sample Inputabcfbc abfcab programming contest abcd mnpSam

2016-07-26 09:26:30 401

原创 【HDU 1231】最大连续子序列(DP)

Problem Description给定K个整数的序列{ N1, N2, …, NK },其任意连续子序列可表示为{ Ni, Ni+1, …, Nj },其中 1 <= i <= j <= K。最大连续子序列是所有连续子序列中元素和最大的一个, 例如给定序列{ -2, 11, -4, 13, -5, -2 },其最大连续子序列为{ 11, -4, 13 },最大和 为20。 在今年

2016-07-25 21:25:43 396 1

原创 【HDU 1422】重温世界杯(DP)

Problem Description世界杯结束了,意大利人连本带利的收回了法国人6年前欠他们的债,捧起了大力神杯,成就了4星意大利. 世界杯虽然结束了,但是这界世界杯给我们还是留下许多值得回忆的东西.比如我们听到了黄名嘴的3分钟激情解说,我们懂得了原来可以向同一个人出示3张黄牌,我们还看到了齐达内的头不仅能顶球还能顶人………… 介于有这么多的精彩,xhd决定重温德国世界杯,当然只是去各个承办世

2016-07-25 21:16:07 332

原创 【HDU 2191】 悼念512汶川大地震遇难同胞——珍惜现在,感恩生活(多重背包)

Problem Description急!灾区的食物依然短缺! 为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并且只能整袋购买。 请问:你用有限的资金最多能采购多少公斤粮食呢?后记: 人生是一个充满了变数的生命过程,天灾、人祸、病痛是我们生命历程中不可预知的威胁。 月有阴晴圆缺,人有旦夕祸福

2016-07-25 21:07:17 260

原创 【HDU 2602】Bone Collector(01背包)

Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grave …

2016-07-25 21:02:42 288

原创 【HDU 1069】Monkey and Banana(DP)

DescriptionA group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. I

2016-07-25 16:52:34 314

原创 【POJ 2533】Longest Ordered Subsequence(最长上升子序列LIS)

DescriptionA numeric sequence of ai is ordered if a1 < a2 < … < aN. Let the subsequence of the given numeric sequence ( a1, a2, …, aN) be any sequence ( ai1, ai2, …, aiK), where 1 <= i1 < i2 < … < iK <

2016-07-22 21:17:58 326

原创 【HDU 1025】Constructing Roads In JGShining's Kingdom(最长上升子序列LIS)

DescriptionJGShining’s kingdom consists of 2n(n is no more than 500,000) small cities which are located in two parallel lines. Half of these cities are rich in resource (we call them rich cities) while

2016-07-22 21:14:53 459

原创 【HDU 1024】Max Sum Plus Plus(DP+滚动数组优化+最大m段字段之和)

DescriptionNow I think you have got an AC in Ignatius.L’s “Max Sum” problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced with a more difficult probl

2016-07-22 16:16:55 512

原创 【HDU 1231】最大连续子序列(DP)

Description给定K个整数的序列{ N1, N2, …, NK },其任意连续子序列可表示为{ Ni, Ni+1, …, Nj },其中 1 <= i <= j <= K。最大连续子序列是所有连续子序列中元素和最大的一个, 例如给定序列{ -2, 11, -4, 13, -5, -2 },其最大连续子序列为{ 11, -4, 13 },最大和 为20。 在今年的数据结构考卷中

2016-07-22 10:51:52 506

原创 【POJ 3259】Wormholes(最短路SPFA/Bellman_Ford)

DescriptionWhile 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 its destination at a t

2016-07-21 21:31:29 1138

原创 【POJ 3268】Silver Cow Party(邻接矩阵+优先队列优化+dij)

DescriptionOne 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 ≤ M ≤ 100,000) unidirectional (

2016-07-21 21:22:16 703

原创 【POJ 2502】Subway(最短路dij)

DescriptionYou have just moved from a quiet Waterloo neighbourhood to a big, noisy city. Instead of getting to ride your bike to school every day, you now get to walk and take the subway. Because you d

2016-07-21 21:13:15 517

原创 【POJ 1797】Heavy Transportation(最短路dij)

DescriptionBackground Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the pl

2016-07-21 21:04:30 374

原创 【HDU 1198】Farm Irrigation(dfs+并查集+bfs)

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 squares. Different square has a differen

2016-07-20 15:10:06 1406 1

原创 【HDU 1195】Open the Lock(BFS)

DescriptionNow an emergent task for you is to open a password lock. The password is consisted of four digits. Each digit is numbered from 1 to 9. Each time, you can add or minus 1 to any digit. When

2016-07-19 21:25:18 394

原创 【HDU 1181】变形课(BFS)

Description呃……变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如果咒语是以a开头b结尾的一个单词,那么它的作用就恰好是使A物体变成B物体. Harry已经将他所会的所有咒语都列成了一个表,他想让你帮忙计算一下他是否能完成老师的作业,将一个B(ball)变成一个M(Mouse)

2016-07-19 20:04:00 475

原创 【HDU 1175】连连看(DFS)

Description“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩过连连看,咨询了同学的意见,连线不能从外面绕过去的,但事实上这是错的。现在已经酿成大祸,就只能将错就错了,连线不能从外

2016-07-19 19:24:00 508

原创 【HDU 1180】诡异的楼梯(BFS)

Problem DescriptionHogwarts正式开学以后,Harry发现在Hogwarts里,某些楼梯并不是静止不动的,相反,他们每隔一分钟就变动一次方向. 比如下面的例子里,一开始楼梯在竖直方向,一分钟以后它移动到了水平方向,再过一分钟它又回到了竖直方向.Harry发现对他来说很难找到能使得他最快到达目的地的路线,这时Ron(Harry最好的朋友)告诉Harry正好有一个魔法道具可以

2016-07-19 14:25:22 411

原创 【HDU 1287】Networking(最小生成树Prim)

DescriptionYou are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may connect

2016-07-18 16:19:25 461

原创 【HDU 2717】Catch That Cow(BFS)

Problem DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a poin

2016-07-18 16:13:57 305

原创 【HDU 4006】The kth great number(优先队列)

Problem DescriptionXiao Ming and Xiao Bao are playing a simple Numbers game. In a round Xiao Ming can choose to write down a number, or ask Xiao Bao what the kth great number is. Because the number wri

2016-07-18 16:05:58 354

原创 【POJ 2387】Til the Cows Come Home(Dij最短路)

DescriptionBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she want

2016-07-18 16:00:12 376

空空如也

空空如也

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

TA关注的人

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