码迷,mamicode.com
首页 >  
搜索关键字:spoj    ( 889个结果
BZOJ 2225 [Spoj 2371]Another Longest Increasing(CDQ分治)
【题目链接】 http://www.lydsy.com/JudgeOnline/problem.php?id=2225 【题目大意】 给定N个数对(xi,yi),求最长上升子序列的长度。 上升序列定义为{(xi,yi)}满足对i<j有xi<xj且yi<yj。 【题解】 CDQ分治,将每个区间按照a排 ...
分类:其他好文   时间:2017-04-25 23:29:14    阅读次数:229
AC日记——Count on a tree II spoj
Count on a tree II 思路: 树上莫队; 先分块,然后,就好办了; 来,上代码: ...
分类:其他好文   时间:2017-04-25 18:37:01    阅读次数:218
SPOJ 74. Divisor Summation 分解数字的因子
本题有两个难点: 1 大量的数据输入。没处理好就超时 - 这里使用buffer解决 2 因子分解的算法 a)暴力法超时 b)使用sieve(筛子),只是当中的算法逻辑也挺不easy搞对的。 数值N因子分解逻辑: 1 保存全部能够sqrt(N)范围内的质素 2 找到能够被N除尽的质素d, 然后用d去除 ...
分类:其他好文   时间:2017-04-24 21:10:08    阅读次数:269
SPOJ 8222 NSUBSTR(SAM)
这几天看了N多论文研究了下后缀自己主动机。刚開始蛋疼的看着极短的代码和clj的论文硬是看不懂,后来结合其它几篇论文研究了下。总算是明确了一些 推荐文章http://blog.sina.com.cn/s/blog_70811e1a01014dkz.html 看了几篇文章认为还是这篇写的清晰明了,建议看 ...
分类:其他好文   时间:2017-04-24 19:00:12    阅读次数:153
BZOJ 1363 最小公倍数之和
Description 求\(\sum_{i=1}^n[i,n],n\leqslant 10^9,T\leqslant 5\times 10^4\) Solution 数论+欧拉函数... 破题有毒... 推导和BZOJ 2226: [Spoj 5971] LCMSum一样... 但是需要枚举所有约 ...
分类:其他好文   时间:2017-04-24 12:36:03    阅读次数:145
SPOJ CIRU SPOJ VCIRCLE 圆的面积并问题
SPOJ VCIRCLE SPOJ CIRU 两道题都是给出若干圆 就面积并,数据规模和精度要求不同。 求圆面积并有两种常见的方法,一种是Simpson积分,另一种是几何法。 在这里给出几何方法。 PS.以下算法基于正方向为逆时针 考虑上图中的蓝色圆,绿色的圆和蓝色的圆交于 A,B 2个交点 ,我们 ...
分类:其他好文   时间:2017-04-20 20:47:28    阅读次数:295
spoj IITWPC4F - Gopu and the Grid Problem 线段树
IITWPC4F - Gopu and the Grid Problem no tags no tags Gopu is interested in the integer co-ordinates of the X-Y plane (0<=x,y<=100000). Each integer co ...
分类:其他好文   时间:2017-04-18 18:44:19    阅读次数:243
BZOJ 2226: [Spoj 5971] LCMSum
Description 求\(\sum_{i=1}^n[i,n],n\leqslant 10^6,T\leqslant 3\times 10^5\) Solution 数论.. \(\sum_{i=1}^n[i,n]\) \(=n\sum_{i=1}^n\frac{i}{(i,n)}\) \(=n\ ...
分类:其他好文   时间:2017-04-18 09:32:17    阅读次数:146
(STL之set与multiset)SPOJ - Ada and Field(易)
ADAFIELD - Ada and Field #binary-search #datastructures #binary-search #datastructures Ada the Ladybug owns a beautiful field where she grows vegetabl ...
分类:其他好文   时间:2017-04-07 00:42:49    阅读次数:156
(STL之vector)spoj-Ada and List(易)
Ada the Ladybug has a TODO-list (containing only numbers - for simplicity). She is still doing something, so she sometimes erases kth number, sometime ...
分类:其他好文   时间:2017-04-07 00:40:04    阅读次数:191
889条   上一页 1 ... 35 36 37 38 39 ... 89 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!