04 2018 档案
摘要:转自 https://blog.csdn.net/jijijix/article/details/52319601
阅读全文
摘要:如果输入数据重复,可以加入vis记录字典树的单词结点是否被经历过,防止同一个data统计出现次数时重复count
阅读全文
摘要:#include #include #include using namespace std; //*********************************************************************************************** const int maxnode = 4000 * 100 + 10; c...
阅读全文
摘要:https://www.cnblogs.com/gaochundong/p/suffix_tree.html Thanks this author
阅读全文
摘要:1 // 2 // main.cpp 3 // demo 4 // 5 // Created by Yanbin GONG on 14/4/2018. 6 // Copyright © 2018 Yanbin GONG. All rights reserved. 7 // 8 9 //向量的基本运算
阅读全文
摘要:1 #include <algorithm> 2 #include <iostream> 3 #include <cstring> 4 #include <cstdio> 5 #include <cmath> 6 using namespace std; 7 #define N 50005 8 9
阅读全文
摘要:转载自: 计算几何模板(仿照刘汝佳大白书风格) 想想自己一个学期连紫皮都没看完就想自杀
阅读全文
摘要:string BigNumMultipy( string str1, string str2 ) { int len1 = str1.length(); int len2 = str2.length(); vector res( len1 + len2, 0 ); reverse( str1.begin(), str1.end() ); ...
阅读全文
摘要:核心代码: 意思:当i是某个素数的整数倍时,i*prime[j+1]肯定被筛选过了,跳出循环。 关键:保证每个合数只会被它的最小质因数筛去 因为i当i%prime[j]==0时,i可以看作prime[j]*某个数,所以对于下个loop的j(我们用的j+1),可以写成$pr
阅读全文