摘要:
AC自动机模板 include using namespace std; const int maxn = 1e6 + 500; const int inf = 1e9; int minv[maxn] , n ; char base[maxn] , str[maxn]; struct AC_Auto 阅读全文
摘要:
傻逼树模板 struct SBT{ const static int maxn = 1e5 + 15; int lft[maxn] , rht[maxn] , key[maxn] , s[maxn] , tot , root ; void init(){ tot = root = 0 ; } voi 阅读全文
摘要:
Splay 模板 struct SplayTree{ const static int maxn = 1e5 + 15; int ch[maxn][2] , key[maxn] , s[maxn] , tot , root , fa[maxn]; void init( int x , int val 阅读全文
摘要:
快速询问两个数的GCD 我觉得只有智障会卡这个玩意儿…… const int maxn = 1e6; const int Sqrt_N = 1e3; int pre[maxn + 1] , decomp[maxn + 1][3] , dp[Sqrt_N + 1][Sqrt_N + 1]; int A 阅读全文
摘要:
A. Johny Likes Numbers 题目连接: http://www.codeforces.com/contest/678/problem/A Description Johny likes numbers n and k very much. Now Johny wants to fin 阅读全文