自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(39)
  • 收藏
  • 关注

原创 hdu 1387 Team Queue

DescriptionQueues and Priority Queues are data structures which are known to most computer scientists. The Team Queue, however, is not so well known, though it occurs often in everyday life. At

2015-04-18 11:27:08 728

原创 hdu 4006 The kth great number 线段树

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 writte

2015-04-13 22:06:30 589

原创 codeforces 330c

DescriptionYou are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square room consisting of tiles forming an n × n grid. The

2015-04-13 20:42:50 673

原创 uva 816Abbott's Revenge

Description  Abbott’s Revenge The 1999 World Finals Contest included a problem based on a “dice maze.” At the time the problem was written, the judges were unable to disc

2015-03-07 10:12:39 1124

原创 uva 514 Rails

DescriptionThere is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time.

2015-02-04 21:08:13 822

原创 uva 213 Message Decoding

Description Message Decoding Some message encoding schemes require that an encoded message be sent in two parts. The first part, called the header, contains the character

2015-01-19 15:17:14 1290

原创 hdu 4745 Two Rabbits 最长回文子序列

DescriptionLong long ago, there lived two rabbits Tom and Jerry in the forest. On a sunny afternoon, they planned to play a game with some stones. There were n stones on the ground and the

2014-11-26 09:40:28 982

原创 codeforces 268C

Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:The coordinates of each point i

2014-11-24 11:17:08 920

原创 poj 1141 Brackets Sequence dp

DescriptionLet us define a regular brackets sequence in the following way: 1. Empty sequence is a regular sequence. 2. If S is a regular sequence, then (S) and [S] are both regular sequenc

2014-11-22 16:28:46 935

原创 zoj 3623 Battle Ships dp

DescriptionBattle Ships is a new game which is similar to Star Craft. In this game, the enemy builds a defense tower, which has L longevity. The player has a military factory, which can

2014-11-19 18:54:54 776

原创 hdu 1172 模拟

Description猜数字游戏是gameboy最喜欢的游戏之一。游戏的规则是这样的:计算机随机产生一个四位数,然后玩家猜这个四位数是什么。每猜一个数,计算机都会告诉玩家猜对几个数字,其中有几个数字在正确的位置上。 比如计算机随机产生的数字为1122。如果玩家猜1234,因为1,2这两个数字同时存在于这两个数中,而且1在这两个数中的位置是相同的,所以计算机会告诉玩家猜对

2014-11-14 11:36:11 751

原创 poj 2581 Exact Change Only (dp)

DescriptionBoudreaux reached over and shook awake Thibodeaux, who had dozed off somewhere in New Mexico. "Where we at?" Thibodeaux groggily yawned. "Not in Vegas, I gua-ran-tee, but co

2014-11-12 09:17:12 2104

原创 poj 1416 Shredding Company dfs

DescriptionYou have just been put in charge of developing a new shredder for the Shredding Company Although a "normal" shredder would just shred sheets of paper into little pieces so that the co

2014-09-08 14:48:18 1065

原创 hdu 1050 Moving Tables

DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure.The floor has 200 rooms each on the north side and south side

2014-08-20 14:11:35 752

原创 zoj 2027 Travelling Fee

DescriptionSamball is going to travel in the coming vacation. Now it's time to make a plan. After choosing the destination city, the next step is to determine the travel route. As this poor guy has

2014-08-18 10:10:55 864

原创 poj 2570 Fiber Network Floyd

DescriptionSeveral startup companies have decided to build a better Internet, called the "FiberNet". They have already installed many nodes that act as routers all around the world. Unfortunately, t

2014-08-17 16:10:57 644

原创 poj 3522 Slim Span

DescriptionGiven 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 {v1, v2, …, vn}

2014-08-15 08:24:16 703

原创 hdu 1226 超级密码 bfs

DescriptionIgnatius花了一个星期的时间终于找到了传说中的宝藏,宝藏被放在一个房间里,房间的门用密码锁起来了,在门旁边的墙上有一些关于密码的提示信息:密码是一个C进制的数,并且只能由给定的M个数字构成,同时密码是一个给定十进制整数N(0注意:由于宝藏的历史久远,当时的系统最多只能保存500位密码.因此如果得到的密码长度大于500也不能用来开启房门,这种情况也被认

2014-08-14 22:28:10 823

原创 hdu 1885 Key Task bfs

DescriptionThe Czech Technical University is rather old ― you already know that it celebrates 300 years of its existence in 2007. Some of the university buildings are old as well. And the navigati

2014-08-13 20:23:04 1007

原创 poj 2907 Collecting Beepers dfs

DescriptionKarel is a robot who lives in a rectangular coordinate system where each place is designated by a set of integer coordinates (x and y). Your job is to design a program that will help Ka

2014-08-13 20:05:52 966

原创 hdu 1385 Minimum Transport Cost(最短路+字典序+打印路径)

DescriptionThese are N cities in Spring country. Between each pair of cities there may be one transportation track or none. Now there is some cargo that should be delivered from one city to anothe

2014-08-10 20:20:33 789

原创 poj 1827 A Bunch Of Monsters 贪心(并查集优化)

DescriptionBackground Jim is a brave explorer. One day, he set out for his next destination, a mysterious hill. When he arrived at the foot of the hill, he was told that there were a bunch of mons

2014-08-08 10:18:43 1003

原创 poj 3414 Pots BFS

DescriptionYou are given two pots, having the volume of A and B liters respectively. The following operations can be performed:FILL(i)        fill the pot i (1 ≤ i ≤ 2) from the tap;DROP(i)   

2014-08-07 19:56:45 629

原创 zoj 1655 Transport Goods Dijkstra

DescriptionThe HERO country is attacked by other country. The intruder is attacking the capital so other cities must send supports to the capital. There are some roads between the cities and the goo

2014-08-06 18:58:06 865

原创 poj 3026 Borg Maze bfs+prim

DescriptionThe Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to describe the group consciousness of the Borg ci

2014-08-06 14:40:30 741

原创 zoj 2412 Farm Irrigation dfs

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 dif

2014-08-06 11:02:17 586

原创 poj 2349 Arctic Network 最小生成树

DescriptionThe Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the net

2014-08-04 19:26:57 518

原创 zoj 1586 QS Network 最小生成树

DescriptionSunny Cup 2003 - Preliminary RoundApril 20th, 12:00 - 17:00Problem E: QS NetworkIn the planet w-503 of galaxy cgb, there is a kind of intelligent creature named QS. QScommunicat

2014-08-04 14:34:39 591

原创 poj 2421 Constructing Roads 并查集+最小生成树

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 two village A and B are connected, if

2014-08-04 09:35:48 955

原创 poj 2031 Building a Space Station 最小生成树

DescriptionYou are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a computer program to complete the

2014-08-04 08:44:20 615

原创 poj 2585 Window Pains 拓扑排序

DescriptionBoudreaux likes to multitask, especially when it comes to using his computer. Never satisfied with just running one application at a time, he usually runs nine applications, each in its

2014-08-03 19:40:19 770

原创 poj 1111 Image Perimeters DFS

DescriptionTechnicians in a pathology lab analyze digitized images of slides. Objects on a slide are selected for analysis by a mouse click on the object. The perimeter of the boundary of an object

2014-07-30 09:22:06 680

原创 poj 3255 Roadblocks Dijkstra求次短路

RoadblocksTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 7067 Accepted: 2626DescriptionBessie has moved to a small farm and sometimes enjoys returning

2014-07-22 10:03:08 824

原创 poj 1797 Heavy Transportation

Heavy TransportationTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 19984 Accepted: 5315DescriptionBackground Hugo Heavy is happy. After the breakdown o

2014-07-21 08:32:11 699

原创 zoj 3080 ChiBi

Descriptionwatashi's mm is so pretty as well as smart. Recently, she has watched the movie Chibi. So she knows more about the War of ChiBi. In the war, Cao Cao had 800,000 soldiers, much more than

2014-07-10 15:53:38 712

原创 hdu 2337 Escape from Enemy Territory

题目:

2014-06-18 19:47:35 750

转载 一位acm过来人的心得

刻苦的训练我打算最后稍微提一下。主要说后者:什么是有效地训练?我想说下我的理解。很多ACMer入门的时候,都被告知:要多做题,做个500多道就变牛了。其实,这既不是充分条件、也不会是必要条件。我觉得一般情况下,对于我们普通学校的大学生,各方面能力的差距不会太大,在这种情况下,训练和学习的方法尤为重要。其实,500题仅仅是一个标志,而且仅仅表示你做ACM-ICPC有一定的

2014-05-27 14:42:20 719

原创 hdu 1712

题目描述:  #include#include#includeint dp[150][150],a[150][150],m,n;using namespace std;int main(){ int i,j,k; while(scanf("%d%d",&n,&m)) { if(n==0&&m==0)

2014-05-23 12:04:12 622

转载 世界十大经典算法

当今世界,已经被发现或创造的经典算法数不胜数。如果,一定要投票选出你最看重的十大算法,你会作何选择列?有国外网友在StackExchange上发起过投票,让人们投票选出心目中最为经典的算法,最终产生了下面得票数最高的十大经典算法(投票数统计截止到2011年3月7日):第十名:Huffman coding(霍夫曼编码)    霍夫曼编码(Huffman Coding)是一种编码方式,是一种用

2014-05-22 09:50:06 918

空空如也

空空如也

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

TA关注的人

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