自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ww的博客

既然总有人会成功,那为什么不能是我哪?

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

原创 HDU 3313 Key Vertex (网络流)

问题描述: Problem Description You need walking from vertex S to vertex T in a graph. If you remove one vertex which stops you from walking from S to T, that vertex we call as key vertex. Now you are give

2016-10-25 17:36:16 237

原创 HDU 1532 Drainage Ditches (最大流)

问题描述:Problem Description Every time it rains on Farmer John’s fields, a pond forms over Bessie’s favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long

2016-10-18 21:14:06 293

原创 HDU 1575 Tr A (矩阵乘法)

问题描述: Problem Description A为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973。Input 数据的第一行是一个T,表示有T组数据。 每组数据的第一行有n(2 <= n <= 10)和k(2 <= k < 10^9)两个数据。接下来有n行,每行有n个数据,每个数据的范围是[0,9],表示方阵A的内容。Output

2016-10-14 23:41:14 2978

原创 HDU 1907 John (Nim博弈)

问题描述: Problem Description Little John is playing very funny game with his younger brother. There is one big box filled with M&Ms of different colors. At first John has to eat several M&Ms of the same

2016-10-14 23:38:43 205

原创 hdu 2188 悼念512汶川大地震遇难同胞——选拔志愿者

问题描述: Problem Description 对于四川同胞遭受的灾难,全国人民纷纷伸出援助之手,几乎每个省市都派出了大量的救援人员,这其中包括抢险救灾的武警部队,治疗和防疫的医护人员,以及进行心理疏导的心理学专家。根据要求,我校也有一个奔赴灾区救灾的名额,由于广大师生报名踊跃,学校不得不进行选拔来决定最后的人选。经过多轮的考核,形势逐渐明朗,最后的名额将在“林队”和“徐队”之间产生。但是很

2016-10-14 23:35:12 187

原创 HDU2149:Public Sale(巴什博弈)

问题描述: Problem Description 虽然不想,但是现实总归是现实,Lele始终没有逃过退学的命运,因为他没有拿到奖学金。现在等待他的,就是像FarmJohn一样的农田生涯。要种田得有田才行,Lele听说街上正在举行一场别开生面的拍卖会,拍卖的物品正好就是一块20亩的田地。于是,Lele带上他的全部积蓄,冲往拍卖会。后来发现,整个拍卖会只有Lele和他的死对头Yueyue。通过打听

2016-10-14 23:33:54 194

原创 HDU_1848 Fibonacci again and again(SG)

问题描述: Problem Description 任何一个大学生对菲波那契数列(Fibonacci numbers)应该都不会陌生,它是这样定义的: F(1)=1; F(2)=2; F(n)=F(n-1)+F(n-2)(n>=3); 所以,1,2,3,5,8,13……就是菲波那契数列。 在HDOJ上有不少相关的题目,比如1005 Fibonacci again就是曾经的浙江省赛题。

2016-10-14 23:31:56 220

原创 HDU 1847 Good Luck in CET-4 Everybody!(博弈)

问题描述: Problem Description 大学英语四级考试就要来临了,你是不是在紧张的复习?也许紧张得连短学期的ACM都没工夫练习了,反正我知道的Kiki和Cici都是如此。当然,作为在考场浸润了十几载的当代大学生,Kiki和Cici更懂得考前的放松,所谓“张弛有道”就是这个意思。这不,Kiki和Cici在每天晚上休息之前都要玩一会儿扑克牌以放松神经。 “升级”?“双扣”?“红五”?

2016-10-14 23:28:31 235

原创 HDU1846:Brave Game(巴什博弈)

问题描述: Problem Description 十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫《勇敢者的游戏》(英文名称:Zathura),一直到现在,我依然对于电影中的部分电脑特技印象深刻。 今天,大家选择上机考试,就是一种勇敢(brave)的选择;这个短学期,我们讲的是博弈(game)专题;所以,大家现在玩的也是“勇敢者的游戏”,这也是我命名这个题目的原因。

2016-10-14 23:25:16 160

原创 HDU1026:Ignatius and the Princess I(BFS)

问题描述: Problem Description The Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he gets into feng5166’s castle. The castle is a large laby

2016-10-14 23:22:40 210

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

问题描述: Problem Description 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

2016-10-11 21:29:53 207

原创 HDU 1162 Eddy's picture (最小生成树)

问题描述: Problem Description 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

2016-10-11 21:26:58 304

原创 hdu1281 棋盘游戏(最大匹配)

棋盘游戏Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 112 Accepted Submission(s): 89 Problem Description小希和Gard

2016-10-11 21:22:29 296

原创 HDU 1068 Girls and Boys 最大独立集

问题描述: Problem Description the second year of the university somebody started a study on the romantic relations between the students. The relation “romantically involved” is defined between one girl a

2016-10-11 13:28:03 230

原创 HDU 1054 Strategic Game 最小顶点覆盖

问题描述: Problem Description Bob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is very sad. Now he has the following proble

2016-10-11 13:25:50 181

原创 HDU 2962 Trucking 最短路

Trucking Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 135 Accepted Submission(s): 56Problem Description A certain local trucking company wo

2016-10-11 10:20:05 218

原创 HDU 2680 Choose the best route 最短路

Choose the best route Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 144 Accepted Submission(s): 57Problem Description One day , Kiki wants to

2016-10-11 10:18:14 179

原创 hdu 2874 Connections between cities (并查集+LCA)hash优化

问题描述: Problem Description After World War X, a lot of cities have been seriously damaged, and we need to rebuild those cities. However, some materials needed can only be produced in certain places. S

2016-10-10 23:19:02 449

原创 hdu 3486 Interviewe (二分+RMQ)

问题描述: Problem Description YaoYao has a company and he wants to employ m people recently. Since his company is so famous, there are n people coming for the interview. However, YaoYao is so busy that

2016-10-10 00:25:29 386

原创 HDU 3584 Cube(三维树状数组)

问题描述: Problem Description Given an N*N*N cube A, whose elements are either 0 or 1. A[i, j, k] means the number in the i-th row , j-th column and k-th layer. Initially we have A[i, j, k] = 0 (1 <= i,

2016-10-10 00:13:04 276

原创 HDU 2492 PingPong (树状数组)

问题描述: Problem Description N(3<=N<=20000) ping pong players live along a west-east street(consider the street as a line segment). Each player has a unique skill rank. To improve their skill rank, they

2016-10-09 17:42:07 273

原创 hdu 2094 产生冠军

Problem Description 有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。 球赛的规则如下: 如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。 如果A打败了B,B又打败了C,而且,C又打败了A,那么A、B、C三者都不可能成为冠军。 根据这个规则,无需循环较量,或许就能确定冠军。你的任务就是面对一群比赛选手,在经过了若干场

2016-10-09 15:13:59 213

原创 hdu 1285 确定比赛名次(拓扑排序)

问题描述: Problem Description 有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在请你编程序确定排名。Input 输入有若干组,每组中的第一行为二个数N(1<=N<

2016-10-09 15:10:46 274

原创 HDU 1251 统计难题 (字典树)

问题描述: Problem Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input 输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分是一连串的提

2016-10-09 15:09:06 194

原创 HDU 1671 Phone List(字典树)

问题描述: Problem Description Given 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 numbers: 1. Em

2016-10-09 15:07:37 166

原创 hdu 1247 Hat’s Words (字典树)

问题描述: Problem Description A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary. You are to find all the hat’s words in a dictionary.Input

2016-10-09 15:06:06 161

原创 HDU 3635 Dragon Balls(并查集)

问题描述:Problem 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 drago

2016-10-09 14:58:54 200

原创 hdu1598 find the most comfortable road(并查集)

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

2016-10-09 14:50:57 218

原创 二分求幂

对于a^b,普通的求法是用一个循环一直乘b个a,这样的方法对于某些题目来说可能显得比较慢。 二分快速幂是一种利用b的二进制特征来快速求a^b的算法。 例如: a = 2, b = 35 则b的二进制表示形式为100011 则 a^b = (2^32) * (2^2) * (2^1) 有了这样的思路之后,就不用循环b次了。 假设b的二进制表示有n位,从后往前依次为第1-n位,初始结果为1

2016-10-08 12:02:48 324

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

问题描述: Problem Description 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 requirement

2016-10-07 23:27:51 174

原创 HDU 1811 Rank of Tetris(拓扑排序+并查集)

问题描述: Problem Description 自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球。为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名堂要比福布斯富豪榜还响。关于如何排名,这个不用说都知道是根据Rating从高到低来排,如果两个人具有相同的Rating,那就按这几个人的

2016-10-07 23:22:03 251

原创 hdu 1325 Is It A Tree?(并查集)

Problem DescriptionA 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 follow

2016-10-07 23:14:37 161

原创 HDU 1829 A Bug's Life(并查集)

问题描述: Problem Description Background 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 interact wi

2016-10-07 23:08:55 173

原创 HDU 2579 Dating with girls(2) (bfs)

问题描述: Problem Description If you have solved the problem Dating with girls(1).I think you can solve this problem too.This problem is also about dating with girls. Now you are in a maze and the girl y

2016-10-07 00:00:54 208

原创 HDU 2416 Treasure of the Chimp Island (BFS)

问题描述: Problem Description Bob Bennett, the young adventurer, has found the map to the treasure of the Chimp Island, where the ghost zombie pirate LeChimp, the infamous evil pirate of the Caribbeans h

2016-10-06 23:53:28 214

原创 hdu 1195 Open the Lock(BFS)

问题描述: Problem Description Now 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

2016-10-06 23:43:05 343

原创 hdu3496 Watch The Movie(二维01背包)

问题描述: Problem Description New semester is coming, and DuoDuo has to go to school tomorrow. She decides to have fun tonight and will be very busy after tonight. She like watch cartoon very much. So sh

2016-10-06 23:35:51 287

原创 hdu 2546 饭卡 dp

问题描述: Problem Description 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。 某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。Input

2016-10-06 23:22:40 182

空空如也

空空如也

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

TA关注的人

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