摘要:Codeforces Beta Round #59 (Div. 2) http://codeforces.com/contest/63 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #d
阅读全文
摘要:Codeforces Beta Round #57 (Div. 2) http://codeforces.com/contest/61 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #d
阅读全文
摘要:Codeforces Beta Round #55 (Div. 2) http://codeforces.com/contest/59 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #d
阅读全文
摘要:Codeforces Beta Round #54 (Div. 2) http://codeforces.com/contest/58 A 找子序列 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1
阅读全文
摘要:Codeforces Round #541 (Div. 2) http://codeforces.com/contest/1131 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #def
阅读全文
摘要:[APIO2014]回文串 https://www.luogu.org/problemnew/show/P3649 题目描述 给你一个由小写拉丁字母组成的字符串 s。我们定义 s 的一个子串的存在值为这个子串在 s 中出现的次数乘以这个子串的长度。 对于给你的这个字符串 s,求所有回文子串中的最大存
阅读全文
摘要:Codeforces Beta Round #52 (Div. 2) http://codeforces.com/contest/56 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #d
阅读全文
摘要:Codeforces Beta Round #49 (Div. 2) http://codeforces.com/contest/53 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #d
阅读全文
摘要:Codeforces Beta Round #46 (Div. 2) http://codeforces.com/contest/49 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #d
阅读全文
摘要:Codeforces Beta Round #44 (Div. 2) http://codeforces.com/contest/47 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #d
阅读全文
摘要:Codeforces Beta Round #42 (Div. 2) http://codeforces.com/contest/43 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #d
阅读全文
摘要:后缀数组三·重复旋律3 http://hihocoder.com/problemset/problem/1415 时间限制:5000ms 单点时限:1000ms 内存限制:256MB 时间限制:5000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi平时的一大兴趣爱好就是演奏钢琴。我
阅读全文
摘要:后缀数组一·重复旋律 http://hihocoder.com/problemset/problem/1403 时间限制:5000ms 单点时限:1000ms 内存限制:256MB 时间限制:5000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi平时的一大兴趣爱好就是演奏钢琴。我们
阅读全文
摘要:后缀数组二·重复旋律2 http://hihocoder.com/problemset/problem/1407 时间限制:5000ms 单点时限:1000ms 内存限制:256MB 时间限制:5000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi平时的一大兴趣爱好就是演奏钢琴。我
阅读全文
摘要:Codeforces Beta Round #40 (Div. 2) http://codeforces.com/contest/41 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 #defi
阅读全文
摘要:P3809 【模板】后缀排序 https://www.luogu.org/problemnew/show/P3809 题目背景 这是一道模板题。 题目描述 读入一个长度为 nn 的由大小写英文字母或数字组成的字符串,请把这个字符串的所有非空后缀按字典序从小到大排序,然后按顺序输出后缀的第一个字符在原
阅读全文
摘要:Codeforces Beta Round #35 (Div. 2) http://codeforces.com/contest/35 A 这场的输入输出是到文件中的,不是标准的输入输出。。。没注意看,RE了好久。。。 1 #include<bits/stdc++.h> 2 using namesp
阅读全文
摘要:Codeforces Beta Round #32 (Div. 2, Codeforces format) http://codeforces.com/contest/32 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define ls
阅读全文
摘要:Codeforces Beta Round #31 (Div. 2, Codeforces format) http://codeforces.com/contest/31 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define ls
阅读全文
摘要:Codeforces Beta Round #29 (Div. 2, Codeforces format) http://codeforces.com/contest/29 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define ls
阅读全文
摘要:Codeforces Round #538 (Div. 2) http://codeforces.com/contest/1114 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #def
阅读全文
摘要:Codeforces Beta Round #27 (Codeforces format, Div. 2) http://codeforces.com/contest/27 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define ls
阅读全文
摘要:P3796 【模板】AC自动机(加强版) P3796 【模板】AC自动机(加强版) P3796 【模板】AC自动机(加强版) https://www.luogu.org/problemnew/show/P3796 题目描述 有NN个由小写字母组成的模式串以及一个文本串TT。每个模式串可能会在文本串中
阅读全文
摘要:模板】AC自动机(简单版) https://www.luogu.org/problemnew/show/P3808 这是一道简单的AC自动机模板题。 用于检测正确性以及算法常数。 为了防止卡OJ,在保证正确的基础上只有两组数据,请不要恶意提交。 管理员提示:本题数据内有重复的单词,且重复单词应该计算
阅读全文
摘要:P3375 【模板】KMP字符串匹配 https://www.luogu.org/problemnew/show/P3375 题目描述 如题,给出两个字符串s1和s2,其中s2为s1的子串,求出s2在s1中所有出现的位置。 为了减少骗分的情况,接下来还要输出子串的前缀数组next。 (如果你不知道这
阅读全文
摘要:Codeforces Beta Round #25 (Div. 2 Only) http://codeforces.com/contest/25 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1
阅读全文
摘要:Codeforces Beta Round #18 (Div. 2 Only) http://codeforces.com/contest/18 A 暴力 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt
阅读全文
摘要:Codeforces Beta Round #34 (Div. 2) http://codeforces.com/contest/34 A 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #d
阅读全文
摘要:Codeforces Beta Round #22 (Div. 2 Only) http://codeforces.com/contest/22 A 水题 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt
阅读全文
摘要:Codeforces Beta Round #16 (Div. 2 Only) http://codeforces.com/contest/16 A 水题 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt
阅读全文
摘要:Codeforces Beta Round #14 (Div. 2) http://codeforces.com/contest/14 A 找最大最小的行列值即可 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mi
阅读全文
摘要:Codeforces Beta Round #12 (Div 2 Only) http://codeforces.com/contest/12 A 水题 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<
阅读全文
摘要:Codeforces Beta Round #9 (Div. 2 Only) http://codeforces.com/contest/9 A gcd水题 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,r
阅读全文
摘要:Codeforces Beta Round #7 http://codeforces.com/contest/7 A 水题 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #define rs
阅读全文
摘要:Codeforces Beta Round #6 (Div. 2 Only) A 水题 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #define rson mid+1,r,rt<<1|1
阅读全文
摘要:Codeforces Beta Round #5 http://codeforces.com/contest/5 A 模拟题 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #define r
阅读全文