IOI2009 Mecho Time Limit: 10000ms Memory Limit: 262144KB This problem will be judged on SPOJ. Original ID: CTOI09_164-bit integer IO format: %lld Java
分类:
其他好文 时间:
2016-02-25 19:52:04
阅读次数:
240
LCS - Longest Common Substring no tags A string is finite sequence of characters over a non-empty finite set Σ. In this problem, Σ is the set of lower
分类:
其他好文 时间:
2016-02-25 00:04:38
阅读次数:
183
Longest Common Substring II Time Limit: 236MS Memory Limit: 1572864KB 64bit IO Format: %lld & %llu Description A string is finite sequence of characte
分类:
其他好文 时间:
2016-02-18 16:22:33
阅读次数:
310
全部串起来做SA, 在按字典序排序的后缀中, 包含每个询问串必定是1段连续的区间, 对每个询问串s二分+RMQ求出包含s的区间. 然后就是求区间的不同的数的个数(经典问题), sort queries + BIT 就行了.时间复杂度O(N log N). 速度垫底了QAQ 你们都会SAM。。。。--
分类:
编程语言 时间:
2016-02-14 00:25:20
阅读次数:
350
BZOJ 1002 高精度 + 递推 f[1] = 1; f[2] = 5; f[i] = f[i - 1] * 3 - f[i - 2] + 2; SPOJ 104 裸 + 不用Mod 1 #include <cstdio> 2 #include <cstring> 3 #include <cst
分类:
其他好文 时间:
2016-02-12 22:12:25
阅读次数:
323
题目链接: http://www.spoj.com/problems/AEROLITE/en/ -------------------------------------------------------------------------------------- 虽然没有明确的区间,但做法还是
分类:
其他好文 时间:
2016-02-03 11:50:20
阅读次数:
212
题目一 : SPOJ 375 Query On a Tree http://www.spoj.com/problems/QTREE/ 给一个树,求a,b路径上最大边权,或者修改a,b边权为t。 1 #include <cstdio> 2 #include <iostream> 3 #include
分类:
其他好文 时间:
2016-02-01 22:31:39
阅读次数:
412
题目大意:有n1头公牛和n2头母牛,给出公母之间的m对配对关系,求最大匹配数。数据范围: 1 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 struct Hopcroft_Carp{ 9 ...
分类:
编程语言 时间:
2016-01-10 18:36:09
阅读次数:
707
题目大意:无向图,求最大流。算法讨论:Dinic可过。终于我的常数还是太大。以后要注意下了。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 typede...
分类:
其他好文 时间:
2016-01-10 18:31:08
阅读次数:
183
题目链接求一个字符串中不相同的子串的个数。子串的总数是(n+1)*n/2, 减去height[i]就可以。#include #include #include #include #include #include #include #include #include #include #includ...
分类:
编程语言 时间:
2016-01-04 11:40:17
阅读次数:
219