随笔分类 - what?
摘要:斐波那契数列相信不用多说了吧 就是f[1]=f[2]=1,f[n]=f[n-1]+f[n-2](n>=3)
阅读全文
摘要:/*并查集 */ #include #include #include #define N 100010 #define INF 0x3f3f3f3f int father[N],a[N]; int find(int x) { return x==father[x]?x:(father[x]=find(father[x])); } int main() { ...
阅读全文
摘要:传送: http://poj.org/problem?id=2406 题意:给定一个字符串,让你求出他最多由几个相同的连续子串连接而成。 KMP的一些小知识点: 如果对于next数组中的 i, 符合 i % ( i - next[i] ) == 0 && next[i] != 0 , 则说明字符串循
阅读全文
摘要:Hat’s Words Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1247 Hat’s Words Submit Status Practice HD
阅读全文

浙公网安备 33010602011771号