码迷,mamicode.com
首页 >  
搜索关键字:spoj    ( 889个结果
SPOJ - PHRASES Relevant Phrases of Annihilation (后缀数组)
You are the King of Byteland. Your agents have just intercepted a batch of encrypted enemy messages concerning the date of the planned attack on your ...
分类:编程语言   时间:2019-07-13 20:06:45    阅读次数:139
SPOJ - REPEATS Repeats (后缀数组)
A string s is called an (k,l)-repeat if s is obtained by concatenating k>=1 times some seed string t with length l>=1. For example, the string s = aba ...
分类:编程语言   时间:2019-07-12 15:36:22    阅读次数:101
51Nod 最大公约数之和V1,V2,V3;最小公倍数之和V1,V2,V3
1040 最大公约数之和 给出一个n,求1 n这n个数,同n的最大公约数的和。比如:n = 6 1,2,3,4,5,6 同6的最大公约数分别为1,2,3,2,1,6,加在一起 = 15 输入 1个数N(N 这题跟 "SPOJ LCMsum" 是一样的,只不过数据范围不一样,所以推到后面的操作不一样。 ...
分类:其他好文   时间:2019-06-28 22:50:22    阅读次数:159
[SPOJ1825]FTOUR2
我们知道,树上两个点的LCA要么是当前根节点,要么不是。。所以两个点间的最短路径要么经过当前根节点,要么在一棵当前根节点的子树中。。 考虑点分治,于是在原来同一子树中的两个点必然在一次分治中变为路径经过当前根节点的两个点。 ~~点分治标准开头(雾~~ 对于路径经过当前根节点的点。从当前根到点$i$的 ...
分类:其他好文   时间:2019-06-09 00:19:10    阅读次数:110
SPOJ Free TourII(点分治+启发式合并)
After the success of 2nd anniversary (take a look at problem FTOUR for more details), this 3rd year, Travel Agent SPOJ goes on with another discount t ...
分类:其他好文   时间:2019-05-26 17:48:20    阅读次数:82
Lexicographical Substring Search SPOJ - SUBLEX (后缀自动机)
Lexicographical Substrings Search $$ Time Limit: 149 ms \quad Memory Limit: 1572864 kB $$ 题意 给出一个字符串,求出这个字符串上字典序第 $k$ 小的子串。 思路 先对给出的字符串构建后缀自动机,因为后缀自动机 ...
分类:其他好文   时间:2019-05-22 19:13:27    阅读次数:77
Lexicographical Substring Search SPOJ - SUBLEX (后缀数组)
Lexicographical Substrings Search $$ Time Limit: 149 ms \quad Memory Limit: 1572864 kB $$ 题意 给出一个字符串,求出这个字符串上字典序第 $k$ 小的子串。 思路 对于给出的字符串,求出后缀数组,根据后缀数组的 ...
分类:编程语言   时间:2019-05-22 19:09:47    阅读次数:98
SPOJ9534 JZPLIT - Turn on the lights(高斯消元)
SPOJ卡常也太可怕了吧……$O((\frac{n+m}{32})^3)$卡100ms,这都什么人啊.jpg 关于这题,设格子$(x,y)$上原来的数为$a[x][y]$,对格子操作为$f[x][y]$ 则有 $\oplus_{i=1}^n f[i][y]\; xor \;\oplus_{i=1}^ ...
分类:其他好文   时间:2019-05-08 14:36:49    阅读次数:128
[SPOJ-COT]Count on a tree
[SPOJ COT]Count on a tree 题面 You are given a tree with N nodes. The tree nodes are numbered from 1 to N . Each node has an integer weight. We will ask ...
分类:其他好文   时间:2019-05-07 16:59:52    阅读次数:205
[SPOJ-DQUERY]D-query
[SPOJ DQUERY]D query 题面 Given a sequence of n numbers a1, a2, ..., an and a number of d queries. A d query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each ...
分类:其他好文   时间:2019-05-06 16:09:53    阅读次数:143
889条   上一页 1 ... 3 4 5 6 7 ... 89 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!