- 博客(29)
- 收藏
- 关注
原创 HDU 2017 多校联合训练赛8 1008 6140 Hybrid Crystals
Hybrid CrystalsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem Description> Kyber crystals, also called the living crystal or simply the kyber, and
2017-08-18 20:04:55
432
原创 HDU 2017 多校联合训练赛8 1011 6143 Killer Names 排列组合
Killer NamesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem Description> Galen Marek, codenamed Starkiller, was a male Human apprentice of the Sith
2017-08-18 15:40:18
324
原创 HDU 2017 多校联合训练赛7 1010 6129 Just do it 杨辉三角 组合数的奇偶判断
Just do itTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Problem DescriptionThere is a nonnegative integer sequence a1...n of length n. HazelFan w
2017-08-17 11:02:41
410
原创 HDU 2017 多校联合训练赛7 1008 6127 Hard challenge (重载运算符)
Hard challengeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Problem DescriptionThere are n points on the plane, and the ith points has a value vali
2017-08-16 15:49:23
312
原创 HDU 2017 多校联合训练赛6 1008 6103 Kirinriki 优美的暴力
KirinrikiTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionWe define the distance of two strings A and B with same length n isdisA,B=∑i=
2017-08-15 19:25:47
307
原创 HDU 6108 2017 百度之星 初赛A 1001 小C的倍数问题
小C的倍数问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description根据小学数学的知识,我们知道一个正整数x是3的倍数的条件是x每一位加起来的和是3的倍数。反之,如果一个数每一位加起来是3的倍数,则这个数肯定是3的倍数。现
2017-08-14 16:29:54
338
原创 HDU 2017 多校联合训练赛6 1002 6097 Mindis 反演变换 计算几何
MindisTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Special JudgeProblem DescriptionThe center coordinate of the circle C is O, the coordinate of O is
2017-08-14 11:14:33
637
原创 HDU 2017 多校联合训练赛6 1010 6105 Gameia
GameiaTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 798 Accepted Submission(s): 341Problem DescriptionAlice and Bob are playing
2017-08-11 16:14:03
633
原创 HDU 2017 多校联合训练赛5 5008 6092 Rikka with sebset
Rikka with SubsetTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1388 Accepted Submission(s): 692Problem DescriptionAs we know, R
2017-08-10 09:36:13
421
原创 HDU 2017 多校联合训练赛3 3003 6058 Kanade's sum 枚举 模拟链表
Kanade's sumTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionGive you an array A[1..n]of length n.Let f(l,r,k) be the k-th la
2017-08-05 10:26:01
511
原创 HDU 2017 多校联合训练赛4 4003 6069 Counting Divisors 素数筛和素因数分解
Counting DivisorsTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Problem DescriptionIn mathematics, the function d(n) denotes the number of diviso
2017-08-04 19:48:27
360
原创 HDU 2017 多校联合训练赛2 1009 6053 TrickGCD 莫比乌斯函数
TrickGCDTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Problem DescriptionYou are given an array A , and Zhu wants to know there are how many differ
2017-07-31 19:53:43
510
原创 HDU 2017 多校联合训练赛2 1011 6055 Regular polygon map&pair
Regular polygonTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionOn a two-dimensional plane, give you n integer points. Your task is to
2017-07-28 14:34:16
331
原创 HDU 2017 多校联合训练赛1 1002 6034 Balala Power 排序
Balala Power!Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Problem DescriptionTalented Mr.Tang has n strings consisting of only lower case
2017-07-27 20:59:05
516
原创 SDUT 3893 (山东省第八届ACM省赛A题) Return of the Nim 博弈nim+威佐夫
Return of the NimTime Limit: 1000MS Memory Limit: 65536KBProblem DescriptionSherlock and Watson are playing the following modified version of Nim game:There are n piles of stones denot
2017-07-24 20:24:32
394
原创 SDUT 3895 (山东省第八届ACM省赛C题) fireworks 杨辉三角+乘法逆元
fireworksTime Limit: 1000MS Memory Limit: 65536KBProblem DescriptionHmz likes to play fireworks, especially when they are put regularly.Now he puts some fireworks in a line. This time he
2017-07-24 16:31:05
494
原创 最短路 SPFA 判断负环 静态邻接表(链式前向星) HDU 2544 最短路 POJ 3259 Wormholes
HDU 2544 最短路Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在
2017-03-21 20:35:05
400
原创 拓展欧几里得 HDU 1576 A/B
A/BTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。 Input数据的
2017-03-19 21:02:47
246
原创 贪心 逆向思维 HDU 3348 coins
coinsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description"Yakexi, this is the best age!" Dong MW works hard and get high pay, he has many 1
2017-03-12 19:43:45
286
原创 最短路 Dijkstra Floyd HDU 1874 畅通工程续
畅通工程续Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距
2017-03-11 22:35:34
321
原创 并查集变式 POJ 1703 Find them,Catch them
Find them,Catch themTime limit 1000 msMemory limit 10000 kBThe police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city,
2017-03-10 20:36:00
235
原创 多重背包 二进制优化 POJ 1276 Cash Machine
多重背包的要求,是分别给出不同物品的最大数量。 其实多重背包最简单的做法就是将一种数量为n的的物品看作n件不同的物品,从而使用01背包,也就是在01背包的基础上,再加一个for循环,但是其算法复杂度较高,因此我们会运用二进制分解优化算法。 首先,要知道一句话,把一个数c分解成若干个小于等于c的数的集合,这个集合中的数任意相加可以得到所有小于等于c的数。这句话是我
2017-03-09 20:45:33
269
原创 最小生成树 Kruscal与Prime HDU 1233 还是畅通工程 HDU 1301 Jungle Roads
最小生成树的两种算法,Kruscal的思路是将所有的边由小到大排序,然后依次选出符合条件的最短边,最终让整个图联通,其中用结构体数组储存测试数据,用并查集检查图中 点是否连接;Prime则是对点的研究,任意选取一个点,然后选择与之连接的最短边,在此,使用二维数组存储测试数据,并且用book数组避免形成回路。 两种算法都能达到相同的目的,对于一般的最小生成树问题,Kruscal算法
2017-03-07 20:27:10
248
原创 快速幂取模 素数测试 HDU 1905 Pseudoprime numbers
Pseudoprime numbersTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionFermat's theorem states that for any prime number p and for any integ
2017-03-07 18:33:12
262
原创 KMP 字符串匹配 POJ 3461 Oulipo
OulipoTime limit 1000 msMemory limit 65536 kBDescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter'e'. He was a mem
2017-03-02 21:19:24
222
原创 KMP 字符串匹配 SDNU 1100 字符串查找 HDU 2087 剪花布条
两道KMP经典模板题,第一题求子串在主串中第一次出现的位置,第二题求子串在主串中出现的次数。具体算法详解推荐一篇博客 http://blog.youkuaiyun.com/yutianzuijin/article/details/11954939/ ,讲解非常详细,只是代码是Java版。1100.字符串查找Time Limit: 1000 MS Memory
2017-03-02 20:11:49
350
原创 动态规划 最长上升(下降)子序列 SDNUOJ 1040 导弹拦截和最少拦截系统
1040.导弹拦截Time Limit: 1000 MS Memory Limit: 32768 KBDescription某国为了防御敌国的导弹袭击,研发出一种导弹拦截系统。但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能高于前一发的高度。某天,雷达捕捉到敌国的导弹来袭。由于该系统还在试验阶段,所以只有一
2017-02-28 20:26:06
579
原创 动态规划 HDU 1176 免费馅饼
免费馅饼Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米
2017-02-09 10:56:18
239
原创 拓展欧几里得算法 poj 1061 青蛙的约会
青蛙的约会Time Limit: 1000MS Memory Limit: 10000KDescription两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都
2017-01-22 21:17:49
586
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人