摘要: E. Another Sith Tournament 题目连接: http://www.codeforces.com/contest/678/problem/E Description The rules of Sith Tournament are well known to everyone. 阅读全文
posted @ 2016-06-14 09:27 qscqesze 阅读(537) 评论(6) 推荐(1) 编辑
摘要: D. Iterated Linear Function 题目连接: http://www.codeforces.com/contest/678/problem/D Description Consider a linear function f(x) = Ax + B. Let's define g 阅读全文
posted @ 2016-06-14 08:40 qscqesze 阅读(427) 评论(0) 推荐(0) 编辑
摘要: C. Joty and Chocolate 题目连接: http://www.codeforces.com/contest/678/problem/C Description Little Joty has got a task to do. She has a line of n tiles in 阅读全文
posted @ 2016-06-14 08:17 qscqesze 阅读(446) 评论(0) 推荐(0) 编辑
摘要: B. The Same Calendar 题目连接: http://www.codeforces.com/contest/678/problem/B Description The girl Taylor has a beautiful calendar for the year y. In the 阅读全文
posted @ 2016-06-14 08:06 qscqesze 阅读(575) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2016-06-14 07:50 qscqesze 阅读(485) 评论(0) 推荐(0) 编辑
摘要: 傻逼树模板 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 阅读全文
posted @ 2016-06-14 07:47 qscqesze 阅读(380) 评论(1) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2016-06-14 07:47 qscqesze 阅读(445) 评论(0) 推荐(1) 编辑
摘要: 快速询问两个数的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 阅读全文
posted @ 2016-06-14 07:46 qscqesze 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2016-06-14 07:44 qscqesze 阅读(434) 评论(0) 推荐(0) 编辑