
hdu
文章平均质量分 78
小纪萱苏
这个作者很懒,什么都没留下…
展开
-
hdu 5213
问题描述wld有n个数(a1...an)保证对于任意$1 \leq i \leq n,1 \leq ai \leq n$wld有一个常数k保证2 \leq k\leq 2*n2≤k≤2∗n为了消除歧义保证k为奇数他有mm个询问每个询问有参数l1,r1,l2,r2l1,r1,l2,r2保证(1 \leq l1\leq r1 (1≤l1≤r1l2≤r2≤n)对于每个原创 2016-08-10 19:46:26 · 288 阅读 · 0 评论 -
hdu 1712 ACboy needs your help
Problem DescriptionACboy has N courses this term, and he plans to spend at most M days on study.Of course,the profit he will gain from different course depending on the days he spend on it.How to原创 2016-04-07 20:57:02 · 200 阅读 · 0 评论 -
hdu 2587 Mirror and Light
Problem DescriptionThe light travels in a straight line and always goes in the minimal path between two points, are the basic laws of optics.Now, our problem is that, if a branch of light goes原创 2016-04-07 16:59:00 · 288 阅读 · 0 评论 -
hdu 2112 HDU Today
Problem Description经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强。这时候,XHD夫妇也退居了二线,并在风景秀美的诸暨市浬浦镇陶姚村买了个房子,开始安度晚年了。这样住了一段时间,徐总对当地的交通还是不太了解。有时很郁闷,想去一个地方又不知道应该乘什么公交车,在什么地方转车,在什么原创 2016-03-14 20:42:25 · 216 阅读 · 0 评论 -
hdu 1158 Employment Planning
DescriptionA project manager wants to determine the number of the workers needed in every month. He does know the minimal number of the workers needed in each month. When he hires or fires a worker,原创 2016-02-27 17:38:55 · 235 阅读 · 0 评论 -
hdu 1247 Hat’s Words
Problem DescriptionA 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.原创 2016-04-05 19:13:37 · 277 阅读 · 0 评论 -
hdu 2586 how far away?
Problem DescriptionThere are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far is it if I want to go from house A to house B原创 2015-12-03 10:50:35 · 246 阅读 · 0 评论 -
hdu 1074 doing homework(状态压缩dp)
DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the home原创 2016-02-27 15:28:52 · 269 阅读 · 0 评论 -
hdu 4540 威威猫系列故事——打地鼠
Problem Description 威威猫最近不务正业,每天沉迷于游戏“打地鼠”。 每当朋友们劝他别太着迷游戏,应该好好工作的时候,他总是说,我是威威猫,猫打老鼠就是我的工作! 无话可说… 我们知道,打地鼠是一款经典小游戏,规则很简单:每隔一个时间段就会从地下冒出一只或多只地鼠,玩游戏的人要做的就是打地鼠。 假设: 1、每一个时刻我们只能打一只地鼠,并且打原创 2015-11-14 20:56:08 · 364 阅读 · 0 评论 -
hdu 1300 pearls
DescriptionIn Pearlania everybody is fond of pearls. One company, called The Royal Pearl, produces a lot of jewelry with pearls in it. The Royal Pearl has its name because it delivers to the royal f原创 2016-03-12 10:11:29 · 284 阅读 · 0 评论 -
hdu 3008 Warcraft
DescriptionHave you ever played the Warcraft?It doesn't matter whether you have played it !We will give you such an experience.There are so many Heroes in it,but you could only choose one of the原创 2016-03-12 10:03:23 · 403 阅读 · 0 评论 -
hdu 5667 sequence
Problem Description Holion August will eat every thing he has found. Now there are many foods,but he does not want to eat all of them at once,so he find a sequence.fn=⎧⎩⎨⎪⎪1,ab,a原创 2016-04-17 13:10:13 · 514 阅读 · 0 评论 -
hdu 3308 LCIS
DescriptionGiven n integers. You have two operations: U A B: replace the Ath number by B. (index counting from 0) Q A B: output the length of the longest consecutive increasing subsequence (LC原创 2016-01-21 20:18:54 · 293 阅读 · 0 评论 -
hdu 2243 考研路茫茫——单词情结(AC自动机+矩阵)
Problem Description背单词,始终是复习英语的重要环节。在荒废了3年大学生涯后,Lele也终于要开始背单词了。一天,Lele在某本单词书上看到了一个根据词根来背单词的方法。比如"ab",放在单词前一般表示"相反,变坏,离去"等。于是Lele想,如果背了N个词根,那这些词根到底会不会在单词里出现呢。更确切的描述是:长度不超过L,只由小写字母组成的,至少包含一个词根原创 2016-08-08 11:35:20 · 516 阅读 · 0 评论 -
hdu 2296 Ring(AC自动机+DP)
Problem DescriptionFor the hope of a forever love, Steven is planning to send a ring to Jane with a romantic string engraved on. The string's length should not exceed N. The careful Steven knows J原创 2016-08-06 16:31:33 · 261 阅读 · 0 评论 -
hdu 5724(博弈论+状态压缩)
ChessTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1044 Accepted Submission(s): 451Problem DescriptionAlice and Bob are pla原创 2016-07-21 16:40:07 · 384 阅读 · 0 评论 -
hdu 5723 Abandoned country
Abandoned countryTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2586 Accepted Submission(s): 643Problem DescriptionAn abando原创 2016-07-21 11:24:09 · 266 阅读 · 0 评论 -
hdu 1520
Anniversary partyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9235 Accepted Submission(s): 3965Problem DescriptionThere is原创 2016-08-15 20:29:39 · 288 阅读 · 0 评论 -
hdu 2196 Computer(树形DP)
Problem DescriptionA school bought the first computer some time ago(so this computer's id is 1). During the recent years the school bought N-1 new computers. Each new computer was connected to one原创 2016-08-15 14:59:54 · 271 阅读 · 0 评论 -
hdu 4277 USACO ORZ
迎参加2016多校联合训练的同学们~ USACO ORZTime Limit: 5000/1500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4499 Accepted Submission(s): 1486Problem原创 2016-07-19 12:15:27 · 251 阅读 · 0 评论 -
hdu 5726 GCD(线段树+预处理)
Problem DescriptionGive you a sequence of N(N≤100,000) integers : a1,...,an(0 InputThe first line of input contains a number T, which stands for the number of test cases you need to solve.原创 2016-07-24 20:20:53 · 328 阅读 · 0 评论 -
hdu 3833 YY's new problem
YY's new problemTime Limit: 12000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 5443 Accepted Submission(s): 1530Problem DescriptionGiven a原创 2016-05-07 20:51:32 · 384 阅读 · 0 评论 -
hdu 3397 Sequence operation(线段树区间覆盖,区间合并)
Problem Descriptionlxhgww got a sequence contains n characters which are all '0's or '1's.We have five operations here:Change operations:0 a b change all characters into '0's in [a , b]1 a原创 2016-05-28 16:10:45 · 353 阅读 · 0 评论 -
hdu 2830 Matrix Swapping II
DescriptionGiven an N * M matrix with each entry equal to 0 or 1. We can find some rectangles in the matrix whose entries are all 1, and we define the maximum area of such rectangle as this matrix’s原创 2016-02-26 16:37:29 · 319 阅读 · 0 评论 -
hdu 2639 Bone Collector II
Problem DescriptionThe title of this problem is familiar,isn't it?yeah,if you had took part in the "Rookie Cup" competition,you must have seem this title.If you haven't seen it before,it doesn't mat原创 2016-02-26 14:33:59 · 206 阅读 · 0 评论 -
hdu 1231 最大连续子序列
Description给定K个整数的序列{ N1, N2, ..., NK },其任意连续子序列可表示为{ Ni, Ni+1, ..., Nj },其中 1 <= i <= j <= K。最大连续子序列是所有连续子序列中元素和最大的一个,例如给定序列{ -2, 11, -4, 13, -5, -2 },其最大连续子序列为{ 11, -4, 13 },最大和 为20。 在今年的数据结构考卷中,要原创 2016-02-24 10:12:23 · 174 阅读 · 0 评论 -
hdu 3483 A Very Simple Problem
Problem DescriptionThis is a very simple problem. Given three integers N, x, and M, your task is to calculate out the following value: InputThere are several test cases. For原创 2016-03-31 20:46:17 · 397 阅读 · 0 评论 -
hdu 2874 Connections between cities
DescriptionAfter 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. So we need to t原创 2015-12-03 20:24:05 · 262 阅读 · 0 评论 -
hdu 3666 THE MATRIX PROBLEM
题意:给你一个n*m的矩阵,和一个区间上下界L,U,问你是否能找出n个数a1,a2,a3,......,an和m个数b1,b2,b3,......,bm,使得矩阵中的第i行的数乘以ai得到的值范围在[L,U]内,而且矩阵中第j列的数除以bj得到的值范围也在[L,U]内,能找到你就输出YES,否则NO。根据题意我们可以简单得到下面的关系:(1) L(2) L原创 2015-11-26 19:38:11 · 258 阅读 · 0 评论 -
hdu 1599 find the mincost route
Problem Description 杭州有N个景区,景区之间有一些双向的路来连接,现在8600想找一条旅游路线,这个路线从A点出发并且最后回到A点,假设经过的路线为V1,V2,….VK,V1,那么必须满足K>2,就是说至除了出发点以外至少要经过2个其他不同的景区,而且不能重复经过同一个景区。现在8600需要你帮他找一条这样的路线,并且花费越少越好。Input 第一行是2个整数N和M(N <=原创 2015-11-18 15:54:26 · 274 阅读 · 0 评论 -
hdu 1233 还是畅通工程
Problem Description某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( 当N为0时,输入结束,该用例原创 2015-11-18 16:01:20 · 242 阅读 · 0 评论 -
hdu 1102 Constructing Roads
Problem 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 connec原创 2015-11-18 21:45:25 · 225 阅读 · 0 评论 -
hdu 4786 Fibonacci Tree
Problem Description Coach Pang is interested in Fibonacci numbers while Uncle Yang wants him to do some research on Spanning Tree. So Coach Pang decides to solve the following problem: Conside原创 2015-11-22 17:21:18 · 234 阅读 · 0 评论 -
最短路
题目 Description 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? Input 输入包括多组数据。每组数据第一行是两个整数N、M(N<=100,M<=10000),N表示成都的大街上有几个路口,标号为1的路口是商店所在地,标原创 2015-11-09 11:14:51 · 255 阅读 · 0 评论 -
XYZZY
Problem Description It has recently been discovered how to run open-source software on the Y-Crate gaming device. A number of enterprising designers have developed Advent-style games for deployment on原创 2015-11-10 00:24:25 · 331 阅读 · 0 评论 -
hdu 2571 命运
Description穿过幽谷意味着离大魔王lemon已经无限接近了! 可谁能想到,yifenfei在斩杀了一些虾兵蟹将后,却再次面临命运大迷宫的考验,这是魔王lemon设下的又一个机关。要知道,不论何人,若在迷宫中被困1小时以上,则必死无疑!可怜的yifenfei为了去救MM,义无返顾地跳进了迷宫。让我们一起帮帮执着的他吧!命运大迷宫可以看成是一个两维的方格阵列,如下图所示:原创 2016-02-24 20:28:21 · 212 阅读 · 0 评论 -
hdu 1257 最少拦截系统
Description某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹. 怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一原创 2016-02-24 20:33:40 · 225 阅读 · 0 评论 -
hdu 2602 Bone Collector
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 …The原创 2016-02-26 10:16:35 · 200 阅读 · 0 评论 -
hdu 1864 最大报销额
Problem Description现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额。Input测试输入包含若干测试用例。每个测试用例的第1行包含两个正数 Q 和 N原创 2016-02-25 20:43:42 · 222 阅读 · 0 评论 -
hdu 1789 Doing Homework Again!
Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in原创 2016-02-25 20:38:43 · 569 阅读 · 0 评论