![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
HDU
文章平均质量分 70
L-75
这个作者很懒,什么都没留下…
展开
-
第一周---最短路(Dijkstra、SPFA)
训练链接:https://vjudge.net/contest/157742Poj 2387题意:给出N个谷仓,T条路径,求出从1谷仓到N号谷仓的最短距离。分析:Dijkstra模板题目,只是需要注意判断重边的情况。AC代码:用邻接矩阵存储#include <stdio.h>#include <string.h>#define INF 1<<30int map[1005][1005原创 2017-04-17 16:37:15 · 363 阅读 · 0 评论 -
HDU 1301 Jungle Roads(最小生成树Kruskal)
Jungle RoadsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6073 Accepted Submission(s): 4402Problem DescriptionThe Head原创 2016-03-30 21:13:37 · 384 阅读 · 0 评论 -
JAVA BigInteger(大数类)HDU 1002 1042
总结一下用到的大数类的基本方法:1.大数加法:add ( BigInteger val )2.大数乘法:multiply ( BigInteger val )3.大数除法:divide ( BigInteger val )4.大数取余:mod ( BigInteger val )5.取相反数:negate ( )6.求幂pow( int numbe原创 2016-03-10 16:28:36 · 699 阅读 · 0 评论 -
HDU 2504 又见GCD
又见GCDTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14796 Accepted Submission(s): 6190Problem Description有三个正整数a,b,c(0原创 2016-03-08 15:57:34 · 347 阅读 · 0 评论 -
HDU 2502 月之数
月之数Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8786 Accepted Submission(s): 5152Problem Description当寒月还在读大一的时候,他在一本武林秘籍中(原创 2016-03-08 15:12:27 · 323 阅读 · 0 评论 -
HDU 2503 a/b + c/d
a/b + c/dTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11885 Accepted Submission(s): 6326Problem Description给你2个分数,求他们的和,并要原创 2016-03-08 15:05:50 · 625 阅读 · 0 评论 -
HDU 1232 畅通工程
畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 42460 Accepted Submission(s): 22511Problem Description某省调查城镇交通状况,得到现有城镇道路原创 2016-03-19 20:45:03 · 303 阅读 · 0 评论 -
HDU 2203 亲和串
亲和串Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11014 Accepted Submission(s): 4999Problem Description人随着岁数的增长是越大越聪明还是越大越原创 2016-03-18 19:33:00 · 325 阅读 · 0 评论 -
HDU 2544 最短路
最短路Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 48091 Accepted Submission(s): 21187Problem Description在每年的校赛里,所有进入决赛的同学都会获原创 2016-03-06 09:13:10 · 336 阅读 · 0 评论 -
HDU 1260 Tickets (简单DP)
TicketsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2364 Accepted Submission(s): 1152Problem DescriptionJesus, what a grea原创 2016-03-06 09:00:11 · 358 阅读 · 0 评论 -
HDU 2571 命运(简单经典DP)
命运Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14387 Accepted Submission(s): 5074Problem Description穿过幽谷意味着离大魔王lemon已经无限接近了!原创 2016-03-04 09:04:17 · 390 阅读 · 0 评论 -
HDU 2570 迷瘴(贪心)
迷瘴Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5472 Accepted Submission(s): 1853Problem Description通过悬崖的yifenfei,又面临着幽谷的考验——原创 2016-03-03 19:58:39 · 486 阅读 · 0 评论 -
HDU 2562 奇偶位互换
奇偶位互换Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6514 Accepted Submission(s): 4944Problem Description给定一个长度为偶数位的0,1字符串,请编程实原创 2016-03-03 09:47:35 · 451 阅读 · 0 评论 -
HDU 2817 A sequence of numbers(快速幂)
A sequence of numbersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4490 Accepted Submission(s): 1418Problem DescriptionXinlv原创 2016-03-03 09:40:54 · 561 阅读 · 0 评论 -
HDU 2157 How many ways??(矩阵的快速幂)
How many ways??Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2284 Accepted Submission(s): 857Problem Description春天到了, HDU校园里开原创 2016-03-02 20:49:20 · 320 阅读 · 0 评论 -
HDU 1575 Tr A(矩阵快速幂)
Tr ATime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4016 Accepted Submission(s): 2994Problem DescriptionA为一个方阵,则Tr A表示A的迹(就是主对角原创 2016-03-02 20:32:24 · 1190 阅读 · 0 评论 -
HDU 1097 A hard puzzle(找规律,快速幂)
A hard puzzleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 35063 Accepted Submission(s): 12599Problem Descriptionlcy gives a ha原创 2015-09-14 19:26:22 · 519 阅读 · 0 评论 -
HDU 1061 Rightmost Digit(快速幂入门)
Rightmost DigitTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 44116 Accepted Submission(s): 16603Problem DescriptionGiven a po原创 2016-03-02 19:12:02 · 383 阅读 · 0 评论 -
HDU 1571 下沙小面的(1)
下沙小面的(1)Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1201 Accepted Submission(s): 464Problem DescriptionLele 在下沙高校中有很多同学,所原创 2016-04-21 18:41:40 · 525 阅读 · 0 评论 -
HDU 5646 DZY Loves Partition(BC)
DZY Loves PartitionTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1414 Accepted Submission(s): 536Problem DescriptionDZY l原创 2016-07-18 14:49:20 · 350 阅读 · 0 评论 -
第二周---最小生成树(Kruskal,Prim)、拓扑排序
训练链接:https://vjudge.net/contest/159297#rankpoj 2403题意:给出职位名称,该职位的工资,然后给出一个工作的描述,要求出能给出多少工资。分析:字符串模拟,判断一段话中有没有该职位名称,有的话就把工资加上。AC代码:#include <stdio.h>#include <map>#include <iostream>using namespace s原创 2017-04-24 20:37:14 · 361 阅读 · 0 评论 -
HDU 2660 Accepted Necklace (01背包,dfs)
Accepted NecklaceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3696 Accepted Submission(s): 1465Problem DescriptionI have N precious stone原创 2017-03-16 20:49:29 · 372 阅读 · 0 评论 -
HDU 2545 树上战争(求树的高度)
树上战争Time Limit: 10000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1051 Accepted Submission(s): 594Problem Description给一棵树,如果树上的某个节点被某个人占据,则它的所有儿子都被占据,lxh原创 2017-03-16 19:53:27 · 448 阅读 · 0 评论 -
HDU 1087 Super Jumping! Jumping! Jumping!(DP)
Super Jumping! Jumping! Jumping!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 36136 Accepted Submission(s): 16478Problem Descri原创 2017-03-01 17:09:21 · 285 阅读 · 0 评论 -
HDU 1518 Square(DFS+剪枝)
SquareTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13846 Accepted Submission(s): 4386Problem DescriptionGiven a set of st原创 2016-12-27 13:12:47 · 400 阅读 · 0 评论 -
HDU 2095 find your present (2) (set STL)
find your present (2)Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 22110 Accepted Submission(s): 8746Problem DescriptionIn原创 2016-12-03 11:04:41 · 469 阅读 · 0 评论 -
HDU 2717 Catch That Cow(bfs)
Catch That CowTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12933 Accepted Submission(s): 3991Problem DescriptionFarmer Joh原创 2016-11-19 17:13:15 · 349 阅读 · 0 评论 -
HDU 1253 胜利大逃亡(bfs)
胜利大逃亡Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 34916 Accepted Submission(s): 12497Problem DescriptionIgnatius被魔王抓走了,有一天原创 2016-11-19 16:57:08 · 422 阅读 · 0 评论 -
HDU 2082 找单词(母函数)
找单词Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6496 Accepted Submission(s): 4542Problem Description假设有x1个字母A, x2个字母B,....原创 2016-11-11 15:22:47 · 660 阅读 · 0 评论 -
HDU 2068 RPG的错排(组合数学--错排)
RPG的错排Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11580 Accepted Submission(s): 4756Problem Description今年暑假杭电ACM集训队第一次组成女原创 2016-11-11 13:37:38 · 433 阅读 · 0 评论 -
HDU 5879 Cure (2016 ACM/ICPC Asia Regional Qingdao Online 1002)
CureTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 484 Accepted Submission(s): 170Problem DescriptionGiven an integer n, w原创 2016-09-17 21:00:20 · 473 阅读 · 0 评论 -
HDU 5878 I Count Two Three (2016 ACM/ICPC Asia Regional Qingdao Online 1001)
I Count Two ThreeTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 253 Accepted Submission(s): 131Problem DescriptionI will sho原创 2016-09-17 20:53:52 · 675 阅读 · 0 评论 -
HDU 5805 NanoApe Loves Sequence (BC #86)
NanoApe Loves SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others)Total Submission(s): 1089 Accepted Submission(s): 449Problem DescriptionNa原创 2016-08-29 18:21:45 · 524 阅读 · 0 评论 -
HDU 5804 Price List (BC#86)
Price ListTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others)Total Submission(s): 737 Accepted Submission(s): 420Problem DescriptionThere are n sho原创 2016-08-28 19:15:53 · 438 阅读 · 0 评论 -
HDU 5776 sum ( BC #85 1001)
sumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 840 Accepted Submission(s): 393Problem DescriptionGiven a sequence, you'原创 2016-08-01 00:24:33 · 733 阅读 · 0 评论 -
HDU 5631 Rikka with Graph(BC)
Rikka with GraphTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 976 Accepted Submission(s): 451Problem DescriptionAs we know,原创 2016-07-18 15:46:24 · 344 阅读 · 0 评论 -
HDU 1272 小希的迷宫
小希的迷宫Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 5 Accepted Submission(s) : 1Font: Times New Roman | Verdana | GeorgiaFont S原创 2016-03-29 20:06:52 · 371 阅读 · 0 评论 -
HDU 1020 Encoding
EncodingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 36115 Accepted Submission(s): 16002Problem DescriptionGiven a string co原创 2016-01-14 16:21:24 · 394 阅读 · 0 评论 -
HDU 1108 Elevator
ElevatorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 58340 Accepted Submission(s): 31975Problem DescriptionThe highest build原创 2016-01-14 15:37:21 · 287 阅读 · 0 评论 -
HDU 2108 Shape of HDU
Shape of HDUTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7061 Accepted Submission(s): 3200Problem Description话说上回讲到海东集团推选老总的原创 2016-03-01 18:52:39 · 560 阅读 · 0 评论