
算法
luckcircle
不努力你只会走向平庸
展开
-
poj2352&hdu1541stars(树状数组)
poj2352stars题目描述:DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount原创 2016-10-23 13:45:08 · 494 阅读 · 0 评论 -
2017计蒜之道初赛第四场AB两题题解
A题:商汤科技致力于引领人工智能核心“深度学习”技术突破,构建人工智能、大数据分析行业解决方案。作为一家人工智能公司,用机器自动地解决各类实际问题自然不在话下。近日,商汤科技推出了一套安全令牌,令牌如下图所示:安全令牌上的小孔有 nnn 行 mmm 列,不过有些行和有些列已经用导线整体焊接了,共有 kkk 根导线。我们可以在安全令牌上 不重叠 地焊接若干个小芯片,每个芯片需原创 2017-06-02 19:35:25 · 426 阅读 · 0 评论 -
poj2255Tree Recovery(二叉树,递归)
点击打开原题链接Tree RecoveryTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14027 Accepted: 8760DescriptionLittle Valentine liked playing with binary tre原创 2016-11-24 23:43:53 · 563 阅读 · 0 评论 -
poj2739Sum of Consecutive Prime Numbers(打表)
原题链接Sum of Consecutive Prime NumbersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 23879 Accepted: 13017DescriptionSome positive integers can be原创 2016-11-20 23:48:51 · 417 阅读 · 0 评论 -
poj1083Moving Tables(区间覆盖)
题目链接Moving TablesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 30917 Accepted: 10302DescriptionThe famous ACM (Advanced Computer Maker) Company原创 2016-11-23 20:12:48 · 521 阅读 · 1 评论 -
HDU1106排序
题目链接排序Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 53677 Accepted Submission(s): 15655Problem Description输入一行数字,如果我们把这行数原创 2016-11-20 19:25:44 · 237 阅读 · 0 评论 -
acm小学妹
acm小学妹 Time Limit : 3000/1000ms (Java/Other) Memory Limit : 65535/32768K (Java/Other)原创 2016-11-20 18:43:33 · 586 阅读 · 0 评论 -
poj2506Tiling(dp)
题目链接TilingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9469 Accepted: 4500DescriptionIn how many ways can you tile a 2xn rectangle by 2x1 or 2x原创 2016-11-19 16:21:36 · 307 阅读 · 0 评论 -
快速幂
原文地址:http://blog.youkuaiyun.com/hkdgjqr/archive/2010/03/15/5381028.aspx快速求正整数次幂2007-05-05 12:21快速求正整数次幂,当然不能直接死乘。举个例子:3 ^ 999 = 3 * 3* 3 * … * 3直接乘要做998次乘法。但事实上可以这样做,先求出2^k次幂:3 ^ 2 = 3转载 2016-10-26 19:35:34 · 201 阅读 · 0 评论 -
poj2299 Ultra-QuickSort(离散化+树状数组求逆序数)
DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the seque原创 2016-10-20 22:22:50 · 284 阅读 · 0 评论 -
史上最详尽平衡树(splay树)讲解
版权声明:转载请注明出处:http://blog.youkuaiyun.com/clove_unique首先声明:万分感谢gty大哥的帮助!这年头能找到简单易懂的数组版平衡树模板只能靠学长了!变量声明:f[i]表示i的父结点,ch[i][0]表示i的左儿子,ch[i][1]表示i的右儿子,key[i]表示i的关键字(即结点i代表的那个数字),cnt[i]表示i结点的关键字出现的次数(相转载 2017-06-15 12:28:04 · 2570 阅读 · 0 评论