
HDU OJ
Viscu
勤能补拙。
展开
-
威威猫系列故事——打地鼠
Problem Description 威威猫最近不务正业,每天沉迷于游戏“打地鼠”。 每当朋友们劝他别太着迷游戏,应该好好工作的时候,他总是说,我是威威猫,猫打老鼠就是我的工作! 无话可说... 我们知道,打地鼠是一款经典小游戏,规则很简单:每隔一个时间段就会从地下冒出一只或多只地鼠,玩游戏的人要做的就是打地鼠。 假设: 1、每一个时刻我们只能打一原创 2016-07-24 19:53:40 · 625 阅读 · 0 评论 -
HDU5512 Pagodas(GCD)
Problem Descriptionn pagodas were standing erect in Hong Jue Si between the Niushou Mountain and the Yuntai Mountain, labelled from 1 to n. However, only two of them (labelled a and b, where 1≤a≠b≤n)原创 2017-03-09 00:08:38 · 373 阅读 · 0 评论 -
hdu 5573Binary Tree(二进制)
Binary TreeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1034 Accepted Submission(s): 609Special JudgeProblem DescriptionThe Old Frog Kin原创 2017-03-02 23:29:35 · 363 阅读 · 0 评论 -
HDU1075 What Are You Talking About(trie树)
What Are You Talking AboutTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/204800 K (Java/Others)Total Submission(s): 21684 Accepted Submission(s): 7241Problem DescriptionIgnatius原创 2017-02-22 00:30:04 · 403 阅读 · 0 评论 -
HDU1251 统计难题(trie树[重做])
统计难题Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 37919 Accepted Submission(s): 13951Problem DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字原创 2017-02-21 22:44:01 · 434 阅读 · 0 评论 -
HDU5889 Barricade
BarricadeTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1486 Accepted Submission(s): 437Problem DescriptionThe empire is under attack agai原创 2017-03-01 00:58:48 · 354 阅读 · 0 评论 -
HDU3652 B-number(数位dp 深搜版本)
B-numberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5467 Accepted Submission(s): 3147Problem DescriptionA wqb-number, or B-number for s原创 2016-12-16 00:48:00 · 429 阅读 · 0 评论 -
HDU 不要62(数位dp 深搜版本)
不要62Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 37571 Accepted Submission(s): 13615Problem Description杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。杭州交通管原创 2016-12-15 21:56:26 · 519 阅读 · 0 评论 -
HDU 3555 Bomb(数位dp 深搜版)
BombTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 15793 Accepted Submission(s): 5754Problem DescriptionThe counter-terrorists found a ti原创 2016-12-15 19:20:28 · 376 阅读 · 0 评论 -
HDU5521 Meeting(dijkstra+优先队列优化)
MeetingTime Limit: 12000/6000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2602 Accepted Submission(s): 825Problem DescriptionBessie and her friend Elsie de原创 2017-03-09 00:14:30 · 343 阅读 · 0 评论 -
HDU1285 确定比赛名次(拓扑排序+队列优化+链式前向星)
确定比赛名次Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4148 Accepted Submission(s): 1547Problem Description有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,原创 2017-03-20 23:33:53 · 366 阅读 · 0 评论 -
HDU2586How far away ?(LCA-在线ST+ tarjan离线)
How far away ?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14859 Accepted Submission(s): 5647Problem DescriptionThere are n houses in th原创 2017-04-12 12:04:39 · 855 阅读 · 0 评论 -
HDU5536 Chip Factory(trie树)
John is a manager of a CPU chip factory, the factory produces lots of chips everyday. To manage large amounts of products, every processor has a serial number. More specifically, the factory produces n原创 2017-04-10 20:46:43 · 379 阅读 · 0 评论 -
HDU 病毒侵袭持续中(AC自动机)
病毒侵袭持续中Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12967 Accepted Submission(s): 4458Problem Description小t非常感谢大家帮忙解决了他的上一个问题。然而病毒侵袭持续中。原创 2017-03-15 00:44:28 · 290 阅读 · 0 评论 -
hdu1878 欧拉回路(无向图+并查集)
欧拉回路是指不令笔离开纸面,可画过图中每条边仅一次,且可以回到起点的一条回路。现给定一个图,问是否存在欧拉回路?Input测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是节点数N ( 1 < N < 1000 )和边数M;随后的M行对应M条边,每行给出一对正整数,分别是该条边直接连通的两个节点的编号(节点从1到N编号)。当N为0时输入结束。Output每个测试用例的输出原创 2017-03-24 12:20:15 · 400 阅读 · 0 评论 -
HDU2896 病毒侵袭(ac自动机)
Problem Description当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋——我们能在有生之年看到500年一遇的世界奇观,那是多么幸福的事儿啊~~但网路上总有那么些网站,开始借着民众的好奇心,打着介绍日食的旗号,大肆传播病毒。小t不幸成为受害者之一。小t如此生气,他决定要把世界上所有带病毒的网站都找出来。当然,谁都知道这是不可能的。原创 2017-03-14 23:37:39 · 390 阅读 · 0 评论 -
hdu2222 Keywords Search(ac自动机)
Keywords SearchTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 60380 Accepted Submission(s): 19897Problem DescriptionIn the modern time,原创 2017-03-14 15:47:01 · 296 阅读 · 0 评论 -
hdu3461 Code Lock(并查集+快速幂)
Code LockTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 2029 Accepted Submission(s): 783Problem DescriptionA lock you use has a code syst原创 2017-03-22 13:15:14 · 354 阅读 · 0 评论 -
HDU5533 Dancing Stars on Me(计算几何)
Problem DescriptionThe sky was brushed clean by the wind and the stars were cold in a black sky. What a wonderful night. You observed that, sometimes the stars can form a regular polygon in the sky if原创 2017-04-06 23:31:59 · 368 阅读 · 0 评论 -
HDU3667 Transportation(spfa费用流+拆边)
TransportationTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2871 Accepted Submission(s): 1225Problem DescriptionThere are N cities, and M原创 2016-12-08 17:53:07 · 394 阅读 · 0 评论 -
POJ1679 The Unique MST(次小生成树[Kruskal]+链式前向星or普通版本)
The Unique MSTTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 28825 Accepted: 10293DescriptionGiven a connected undirected graph, tell if its minimum spanning tree is unique. D原创 2016-11-24 19:25:49 · 538 阅读 · 0 评论 -
HDU2795 Billboard(线段树)
BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 20022 Accepted Submission(s): 8362Problem DescriptionAt the entrance to the unive原创 2016-10-22 20:22:59 · 269 阅读 · 0 评论 -
HDU1789 doing homework again(贪心)
Doing Homework againTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11806 Accepted Submission(s): 6948Problem DescriptionIgnatius has just原创 2016-09-26 22:07:51 · 479 阅读 · 0 评论 -
HDU Ignatius and the Princess I
Problem DescriptionThe 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 labyrinth.原创 2016-08-17 22:52:53 · 3575 阅读 · 0 评论 -
HDU Arc of Dream
An Arc of Dream is a curve defined by following function:wherea0 = A0ai = ai-1*AX+AYb0 = B0bi = bi-1*BX+BYWhat is the value of AoD(N) modulo 1,000,000,007?InputThere are multip原创 2016-08-04 14:59:04 · 575 阅读 · 0 评论 -
HDU Robberies
The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. He has decided to work in the lucrative原创 2016-07-28 19:23:01 · 484 阅读 · 0 评论 -
hdu 1005 Number Sequence
Number SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 152679 Accepted Submission(s): 37175Problem DescriptionA numbe原创 2016-07-27 14:15:35 · 405 阅读 · 0 评论 -
HDU 2563 统计问题
统计问题Time Limit : 3000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 16 Accepted Submission(s) : 15Problem Description在一无限大的二维平面中,我们做如下假设:1、 每原创 2016-07-22 09:26:01 · 2983 阅读 · 0 评论 -
FatMouse's Speed
FatMouse's SpeedTime Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 20 Accepted Submission(s) : 11Special JudgeProblem DescriptionFatMouse b原创 2016-07-24 15:32:39 · 423 阅读 · 0 评论 -
NYOJ 290动物统计加强版(Trie树)
动物统计加强版时间限制:3000 ms | 内存限制:150000 KB难度:4描述在美丽大兴安岭原始森林中存在数量繁多的物种,在勘察员带来的各种动物资料中有未统计数量的原始动物的名单。科学家想判断这片森林中哪种动物的数量最多,但是由于数据太过庞大,科学家终于忍受不了,想请聪明如你的ACMer来帮忙。输入第一行输入动物名字的数量N(1<= N <= 4000000),接下来的N行输入原创 2016-11-07 00:56:49 · 481 阅读 · 0 评论 -
HDU 5818 Joint Stacks(左偏树)
Joint StacksTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1380 Accepted Submission(s): 659Problem DescriptionA stack is a data structure原创 2016-11-07 19:33:53 · 537 阅读 · 0 评论 -
HDU 1301 Jungle Roads(Kruskal算法)
Jungle RoadsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7005 Accepted Submission(s): 5114Problem DescriptionThe Head Elder of the tropi原创 2016-11-14 14:54:50 · 382 阅读 · 0 评论 -
HDU1003 Max Sum(DP)
Max SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 228524 Accepted Submission(s): 53767Problem DescriptionGiven a sequence a[1],a[2],a[原创 2016-12-12 16:08:52 · 339 阅读 · 0 评论 -
HDU3549 Flow Problem(ford-fulkerson算法)
Flow ProblemTime Limit: 5000/5000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 13984 Accepted Submission(s): 6683Problem DescriptionNetwork flow is a well-kno原创 2016-12-01 18:34:01 · 388 阅读 · 0 评论 -
HDU 1217 Arbitrage(spfa算法+链式前向星)
Problem DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US Dol原创 2016-11-18 18:56:44 · 430 阅读 · 0 评论 -
HDU1864畅通工程续 (Floyd算法)
Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。Input本题目包含多组数据,请处理到文件结束。每组数据第一行包含两个正整数N和M(0<N<原创 2016-11-16 13:34:31 · 364 阅读 · 0 评论 -
HDU2066 一个人的旅行(dijkstra算法)
一个人的旅行Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 33769 Accepted Submission(s): 11589Problem Description虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的原创 2016-11-15 22:44:13 · 635 阅读 · 0 评论 -
最小生成树专题
关于图论实在是太薄弱了,有时间加强这方面的练习,虽然对于其他知识也是很薄弱。还是畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 41332 Accepted Submission(s): 18859Problem Descr原创 2016-11-12 18:37:06 · 359 阅读 · 2 评论 -
HDU1102 Constructing Roads(最小生成树Prim算法)
Constructing RoadsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 21317 Accepted Submission(s): 8197Problem DescriptionThere are N villages原创 2016-11-10 19:14:43 · 384 阅读 · 2 评论 -
HDU5992 Finding Hotels(Kd-tree)
Finding HotelsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 344 Accepted Submission(s): 81Problem DescriptionThere are N hotels all ove原创 2016-12-04 15:20:53 · 1793 阅读 · 2 评论