![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
HDU
文章平均质量分 78
zzuspy
本人初学者~~
展开
-
HDU - 1239 - Calling Extraterrestrial Intelligence Again (素数相关~)
Calling Extraterrestrial Intelligence AgainTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4637 Accepted Submission(s): 2433Probl原创 2015-02-11 22:14:47 · 591 阅读 · 0 评论 -
HDU - 1098 - Ignatius's puzzle (数论 - 费马小定理)
Ignatius's puzzleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7012 Accepted Submission(s): 4847Problem DescriptionIgnatius原创 2015-03-13 23:21:44 · 795 阅读 · 0 评论 -
HDU - 1754 - I Hate It (线段树 - 区间最值)
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 43296 Accepted Submission(s): 17071Problem Description很多学校流行一种比较的习惯。原创 2015-03-18 20:05:41 · 781 阅读 · 0 评论 -
HDU - 1166 - 敌兵布阵 (树状数组 or 线段树)
敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 47559 Accepted Submission(s): 20136Problem DescriptionC国的死对头A国这段时间正在进行军事演原创 2014-12-28 12:46:51 · 787 阅读 · 0 评论 -
HDU - 5198 - Strange Class && 5199 - Gunner
Strange ClassTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 74 Accepted Submission(s): 60Problem DescriptionIn Vivid’s schoo原创 2015-04-04 21:47:18 · 827 阅读 · 0 评论 -
HDU - 5200 - Trees (upper_bound)
TreesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 205 Accepted Submission(s): 68Problem DescriptionToday CodeFamer is goin原创 2015-04-04 23:34:06 · 820 阅读 · 0 评论 -
HDU - 5202 - Rikka with string (DFS)
Rikka with stringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 214 Accepted Submission(s): 109Problem DescriptionAs we know原创 2015-04-11 23:45:19 · 1108 阅读 · 0 评论 -
HDU - 1532 - Drainage Ditches && 3549 - Flow Problem (网络流初步)
Drainage DitchesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10875 Accepted Submission(s): 5131Problem DescriptionEvery ti原创 2015-04-17 23:37:01 · 660 阅读 · 0 评论 -
HDU - 1394 - Minimum Inversion Number (线段树 - 单点更新,区间求和)
题目传送:Minimum Inversion Number思路:线段树,求最小逆序数,先可以通过n*logn的时间用线段树求出初始的逆序对数,然后递推求出其他的解,递推过程看代码AC代码:#include #include #include #include #include #include #include #include #include #i原创 2015-05-13 13:37:25 · 724 阅读 · 0 评论 -
HDU - 1846 - Brave Game (巴什博弈)
题目传送:Brave Game介绍:巴什博奕(Bash Game):首先我们来玩一个比较古老的报数游戏。A和B一起报数,每个人每次最少报一个,最多报4个。轮流报数,看谁先报到30.如果不知道巴什博弈的可能会觉得这个是个有运气成分的问题,但是如果知道的人一定知道怎样一定可以赢。比如A先报数的话,那么B一定可以赢(这里假定B知道怎么正确的报数)B可以这样报数,每次报5-原创 2015-05-02 00:50:17 · 672 阅读 · 0 评论 -
HDU - 1047 - Integer Inquiry (大数高精度)
Integer InquiryTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13969 Accepted Submission(s): 3523Problem DescriptionOne of th原创 2015-03-12 23:16:06 · 696 阅读 · 0 评论 -
HDU - 5190 - Go to movies && 5191 - Building Blocks (BC#34 A,B)
Go to moviesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 99 Accepted Submission(s): 67Problem DescriptionWinter holiday is原创 2015-03-21 23:10:35 · 951 阅读 · 0 评论 -
HDU - 2680 - Choose the best route (经典最短路问题dijkstra算法!!)
Choose the best routeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7671 Accepted Submission(s): 2524Problem DescriptionOne原创 2015-01-01 21:42:04 · 815 阅读 · 0 评论 -
HDU- 3279 - Nth Largest Value
Nth Largest ValueTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1140 Accepted Submission(s): 892Problem DescriptionFor this原创 2015-02-11 22:10:12 · 718 阅读 · 0 评论 -
HDU - 5186 - zhx's submissions (大数高精度)
zhx's submissionsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 540 Accepted Submission(s): 146Problem DescriptionAs one of原创 2015-03-15 00:06:22 · 1034 阅读 · 0 评论 -
HDU - 5187 - zhx's contest (快速幂+快速乘)
zhx's contestTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 448 Accepted Submission(s): 147Problem DescriptionAs one of the原创 2015-03-15 01:00:23 · 1760 阅读 · 0 评论 -
HDU - 1114 - Piggy-Bank (完全背包)
Piggy-BankTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13822 Accepted Submission(s): 7000Problem DescriptionBefore ACM can原创 2015-03-25 17:05:30 · 738 阅读 · 0 评论 -
HDU - 5178 - pairs
pairsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 349 Accepted Submission(s): 151Problem DescriptionJohn has n points on原创 2015-03-01 19:21:48 · 843 阅读 · 0 评论 -
HDU - 1248 - 寒冰王座 (完全背包 or 贪心)
寒冰王座Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12267 Accepted Submission(s): 6221Problem Description不死族的巫妖王发工资拉,死亡骑士拿到一张原创 2015-03-15 22:50:50 · 810 阅读 · 0 评论 -
HDU-2602-Bone Collector (最基础DP!!)
Bone CollectorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 31922 Accepted Submission(s): 13138Problem DescriptionMany year原创 2014-11-22 15:19:53 · 1196 阅读 · 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): 32633 Accepted Submission(s): 11672Problem Descriptionlcy gives原创 2015-03-13 22:44:32 · 668 阅读 · 0 评论 -
HDU - 2149 - Public Sale (巴什博弈)
题目传送:Public Sale思路:巴什博弈AC代码:#include #include #include #include #include #include #include #include #include #include #include #include #define LL long long#define INF 0x7ff原创 2015-05-02 01:06:23 · 692 阅读 · 0 评论 -
HDU - 2795 - Billboard (线段树)
题目传送:Billboard思路:有一个h*w的木板(可以看成h行,每行最多放w的空间),每次放1*L大小的物品,返回最上面可以容纳L长度的位置,没有则输出-1;AC代码:#include #include #include #include #include #include #include #include #include #include原创 2015-05-13 19:57:21 · 561 阅读 · 0 评论 -
HDU - 1358 - Period (KMP)
PeriodTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4325 Accepted Submission(s): 2087Problem DescriptionFor each prefix of原创 2015-07-28 09:11:31 · 782 阅读 · 0 评论 -
莫比乌斯反演简单题
莫比乌斯函数这里简述一下莫比乌斯函数: 若d=1 那么μ(d)=1 若d=p1p2…pr (r个不同质数,且次数都为一)μ(d)=(-1)^r 其余 μ(d)=0莫比乌斯反演的性质性质一:(莫比乌斯反演公式)f(n)=∑(d|n)μ(d)F(n/d)f(n) = \sum(d|n) {\mu(d)F(n/d)} 性质二:μ(n)是积性函数性质三:设f是算术函数,它的和函数F(n)=原创 2015-08-10 21:11:24 · 3451 阅读 · 3 评论 -
2015 Multi-University Training Contest 4
1001、Olympiad题目传送:HDU - 5327 - Olympiad维护前缀和即可AC代码:#include <map>#include <set>#include <cmath>#include <deque>#include <queue>#include <stack>#include <cstdio>#include <cctype>#include <string原创 2015-07-30 23:58:49 · 696 阅读 · 0 评论 -
BestCoder Round #39 (HDU5210,5211,5212)
题目传送:HDU - 5210HDU - 5210 - Delete思路:简单题AC代码:#include #include #include #include #include #include #include #include #include #include #include #include #define LL long原创 2015-04-26 23:12:08 · 645 阅读 · 0 评论 -
拓扑排序简单题
确定比赛名次题目传送:HDU - 1285 - 确定比赛名次思路:拓扑排序AC代码①(遍历找最小字典序):#include <map>#include <set>#include <cmath>#include <deque>#include <queue>#include <stack>#include <cstdio>#include <cctype>#include <stri原创 2015-08-02 11:31:09 · 1945 阅读 · 0 评论 -
HDU - 1429 - 胜利大逃亡(续)
胜利大逃亡(续)题目传送:HDU - 1429 - 胜利大逃亡(续)基础广搜题,注意是用位运算来判断的是否有钥匙的。少写一个字母找了好久的bug。。好久的bug。。的bug。。bug。。gAC代码:#include <map>#include <set>#include <cmath>#include <deque>#include <queue>#include <stack>#inc原创 2015-08-03 22:30:13 · 1064 阅读 · 0 评论 -
BestCoder Round #53
现在博客更新比较少了,就当我还活着吧Rikka with Graph题目传送:HDU - 5422 - Rikka with GraphAC代码:#include <map>#include <set>#include <list>#include <cmath>#include <deque>#include <queue>#include <stack>#include <bits原创 2015-08-29 22:13:07 · 588 阅读 · 0 评论 -
HDU - 1269 - 迷宫城堡 (tarjan求强连通分量)
题目传送:迷宫城堡思路:就是tarjan啦,不过korasaju肯定也行啦,这里注意可能本身就不是连通图AC代码:#include <map>#include <set>#include <cmath>#include <deque>#include <queue>#include <stack>#include <cstdio>#include <cctype>#include <原创 2015-08-04 10:47:14 · 795 阅读 · 0 评论 -
HDU - 2612 - Find a way (BFS)
Find a wayTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6157 Accepted Submission(s): 2052Problem DescriptionPass a year lea原创 2015-07-24 13:01:37 · 731 阅读 · 0 评论 -
BestCoder Round #50 (div.2)
题目传送:BestCoder Round #50 (div.2)BC感觉越做越无语了1001、Distribution moneyAC代码:#include <map>#include <set>#include <list>#include <cmath>#include <deque>#include <queue>#include <stack>#include <bitset>原创 2015-08-08 23:16:10 · 622 阅读 · 0 评论 -
2015 Multi-University Training Contest 3
好吧,脑残的孩子只能慢慢来。。1002、RGCDQ题目传送:RGCDQ人脑残到写了个线段树。。。然后跪啦好久。。。然后就滚去睡觉了其实这个题不需要用到线段树,只需要维护前缀和就ok了,因为f的值很小,所以可以暴力筛出来,然后用一个s[i][j]数组存储,s[i][j]代表前i个f值中有多少个等于j的线段树只有要更新的时候才拿出来!不更新的时候要先想到前缀和!AC代码(前缀和):#include <m原创 2015-07-28 18:50:45 · 558 阅读 · 0 评论 -
HDU - 3074 - Multiply game (线段树-单点更新,区间求积)
题目传送:Multiply game思路:简单线段树,单点更新,区间求积,这是上次选拔赛选的题,一看题就是线段树,不过当时线段树不太熟,没敢敲,现在看来居然如此轻松,不过注意这里有大量输出,用printf,居然在这里TLE了一次。。。AC代码:#include #include #include #include #include #include #inc原创 2015-05-13 22:33:54 · 966 阅读 · 0 评论 -
HDU - 3308 - LCIS (线段树 - 区间合并)
题目传送:LCIS线段树,区间合并,一次过啦,没有纠结,这几天过的最愉快的一个题思路:求最长连续上升子序列,外带单点更新,经典的线段树题目。具体看代码注释AC代码:#include #include #include #include #include #include #include #include #include #include原创 2015-05-15 20:31:59 · 1067 阅读 · 1 评论 -
BestCoder Round #41 -- (A,B)
题目传送:BestCoder Round #41A、ZCC loves straight flush思路:简单题,不过刚开始没看清题,wa了好几次,然后才发现输入不连续也可以,就是说每个同一花色的牌都可以放在一块,不用在意输入顺序,感觉这里题目应该说清楚点好些AC代码(略挫,比赛时写的都比较乱):#include #include #includ原创 2015-05-16 23:20:10 · 624 阅读 · 0 评论 -
HDU - 1973 - Prime Path (BFS)
题目传送:Prime Path思路:上次选拔赛的题,简单BFS,当时没有做出来,突然发现自己当时是多么的弱。。一个简单搜索都不会。。这里只要先筛出1000到10000的素数,然后再用队列模拟一下其过程即可,用结构体存下当前素数以及当前所在的层次,即本题所求的最小步数,当时好像就是这里没想通怎么实现最小步数跪的AC代码:#include #include #inclu原创 2015-05-22 21:38:11 · 632 阅读 · 0 评论 -
BestCoder Round #42
题目传送:BestCoder Round #421、Shaking hands思路:简单题,ans = n * 2 + 矩阵上的1的个数AC代码:#include #include #include #include #include #include #include #include #include #include #in原创 2015-05-23 22:36:49 · 593 阅读 · 0 评论 -
BestCoder 1st Anniversary
题目传送:BestCoder 1st Anniversary1001AC代码:#include #include #include #include #include #include #include #include #include #include #include #include #include #include原创 2015-07-26 10:21:31 · 613 阅读 · 0 评论