自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 HDU 2473 并查集

Junk-Mail Filter Problem DescriptionRecognizing junk mails is a tough task. The method used here consists of two steps:1) Extract the common characteristics from the incoming email.2) Use a

2013-08-24 15:46:16 459

原创 HDU 1025 子序列

Constructing Roads In JGShining's Kingdom Problem DescriptionJGShining's kingdom consists of 2n(n is no more than 500,000) small cities which are located in two parallel lines.Half of thes

2013-08-22 16:08:48 480

原创 HDU 2594 子序列

Simpsons’ Hidden Talents Problem DescriptionHomer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had.Marge: Yeah, what is it?Homer: Take me for example.

2013-08-22 16:06:36 470

原创 HDU 1686 子序列

Oulipo Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book:

2013-08-22 16:02:13 458

原创 HDU 2087 子序列

剪花布条Problem Description一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢?  Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不

2013-08-22 15:58:44 443

原创 HDU 1711 子序列

Number SequenceTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8436    Accepted Submission(s): 3854Problem DescriptionGiven two s

2013-08-22 15:55:15 423

原创 HDU 1159 子序列

Common SubsequenceProblem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = is a subsequ

2013-08-22 15:47:50 438

原创 HDU 1116 并查集

Play on Words Problem DescriptionSome 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

2013-08-22 15:31:03 473

原创 HDU 1423 子序列

Greatest Common Increasing SubsequenceProblem DescriptionThis is a problem from ZOJ 2432.To make it easyer,you just need output the length of the subsequence. InputEach sequence is descr

2013-08-22 09:56:46 463

原创 HDU 1257 子序列

最少拦截系统Problem Description某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊

2013-08-21 19:49:08 402

原创 HDU 1548 BFS

A strange liftProblem DescriptionThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: u

2013-08-21 17:05:46 478

原创 POJ 2001 字典树

Shortest Prefixes DescriptionA prefix of a string is a substring starting at the beginning of the given string. The prefixes of "carbon" are: "c", "ca", "car", "carb", "carbo", and "carbon". Not

2013-08-21 16:56:48 495

原创 POJ 3264 线段树

Balanced Lineup DescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee wit

2013-08-21 16:45:48 425

原创 约瑟环夫问题

n个人   从1至N开始顺序循环数数,每数到M时,将该数字退出,继续从下个人开始数,最后一个推出的为胜利者把问题变成0-n-1(编号变了而已),第一个人出列之后,(第一个人编号一定是m%n-1)剩下的是n-1个人,编号从0-(n-2)组成一个新的约瑟环夫问题接下去就是从编号m%n开始计数k  k+1  k+2  ... n-2, n-1, 0, 1, 2, ... k-2并

2013-08-21 16:35:22 965

原创 POJ 2524 并查集

Ubiquitous Religions DescriptionThere are so many different religions in the world today that it is difficult to keep track of them all. You are interested in finding out how many different reli

2013-08-21 15:49:00 445

原创 HDU 1983 DFS+BFS

Kaitou Kid - The Phantom Thief (2)Problem Description破解字迷之后,你得知Kid将会在展览开始后T分钟内盗取至少一颗宝石,并离开展馆。整个展馆呈矩形分布,划分为N*M个区域,有唯一的入口和出口(不能从出口进入,同样不能从入口出去)。由某个区域可直接移动至相邻四个区域中的一个,且最快需要一分钟。假设Kid进入放有宝石的区域即可盗取宝

2013-08-21 15:43:57 650

原创 HDU 1240 BFS

Asteroids!Problem DescriptionYou're in space.You want to get home.There are asteroids.You don't want to hit them. InputInput to this problem will consist of a (non-empty) series

2013-08-19 16:35:50 378

原创 HDU 2112 最短路径

HDU TodayProblem Description经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强。这时候,XHD夫妇也退居了二线,并在风景秀美的诸暨市浬浦镇陶姚村买了个房子,开始安度晚年了。这样住了一段时间,徐总对当地的交通还是不太了解。有时很郁闷,想去一个地方又不知道应该乘

2013-08-16 15:38:28 396

原创 HDU 3047 并查集

Zjnu Stadium Problem Description In 12th Zhejiang College Students Games 2007, there was a new stadium built in Zhejiang Normal University. It was a modern stadium which could hold thous

2013-08-13 20:38:02 487

原创 HDU 3172 并查集

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 social netw

2013-08-13 20:22:31 450

原创 HDU 1829 并查集

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

2013-08-13 20:14:19 401

原创 HDU 1198 并查集

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 squares. D

2013-08-13 19:52:59 408

原创 HDU 1272 并查集

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

2013-08-13 19:31:33 422

原创 HDU 1856 并查集

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 certa

2013-08-13 19:12:21 446

原创 HDU 1213 并查集

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 notice

2013-08-13 19:07:17 447

原创 HDU 1232 并查集

畅通工程Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?  Input测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目

2013-08-13 19:02:27 407

原创 HDU 1281 二分图

棋盘游戏Problem Description小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相攻击。 所以现在Gardon想让小希来解决一个更难的问题,在保证尽量多的“车”的前提下,棋

2013-08-10 19:51:19 474

原创 HDU 1151 二分图

Air RaidProblem DescriptionConsider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from an intersection and wal

2013-08-10 19:45:11 455

原创 HDU 1150 二分图

Machine Schedule Problem Description As we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history. Scheduling problems differ

2013-08-10 19:43:12 434

原创 HDU 1083 二分图

CoursesProblem DescriptionConsider 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 committ

2013-08-10 19:39:53 473

原创 poj 3020 二分图

Antenna PlacementDescriptionThe Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets in Sweden. The most striking reason why they got th

2013-08-09 16:18:39 376

原创 HDU 1394 线段树

Minimum Inversion NumberProblem DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj.For a given sequence of numbers a1

2013-08-08 14:57:13 408

原创 HDU 3704 线段树

Multiply gameProblem DescriptionTired of playing computer games, alpc23 is planning to play a game on numbers. Because plus and subtraction is too easy for this gay, he wants to do some multip

2013-08-08 14:46:53 460

原创 HDU 1556 线段树

Color the ballProblem DescriptionN个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a Input每个测试实例第一行为一个整数N,(N 当N = 0,输入结束。Output每个测试实例输出一行,包括N个整数,第I个数代表第I个气球总共被涂色的次数。Sample Input31 1

2013-08-08 11:14:59 386

原创 HDU 1754 线段树

I Hate ItProblem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。在每个测试的第一行,有两个正整数

2013-08-08 11:07:58 391

原创 POJ 3468 线段树

A Simple Problem with Integers DescriptionYou have N integers, A1, A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each numbe

2013-08-08 10:58:34 381

原创 HDU 1298 字典树+DFS

T9Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 2   Accepted Submission(s) : 2Font: Times New Roman | Verdana | GeorgiaFont Size: ← →P

2013-08-06 23:35:39 468

原创 HDU 1698 线段树

Just a HookProblem Description In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks w

2013-08-06 23:30:04 462

原创 HDU 1166 线段树

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

2013-08-06 23:24:45 382

原创 HDU 1671 字典树

Phone ListProblem DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the phone catalogue listed these num

2013-08-06 01:28:08 577

codeblocks

比较好用的C/C++编译器。有助于编写程序。挺好的编程工具

2013-09-09

空空如也

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

TA关注的人

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