Loading

摘要: 描述 传送门:我是传送门 有一家公司有NN个员工(从1到N)(从1到N),公司里每个员工都有一个直接的老板(除了整个公司的领导)。如果你是某人的直接老板,那个人就是你的下属,他的所有下属也都是你的下属。如果你是没有人的老板,那么你就没有下属,没有直接老板的员工就是整个公司的领导,也就是说NN个员工构 阅读全文
posted @ 2021-01-20 21:01 Yiduuannng 阅读(59) 评论(0) 推荐(0)
摘要: 描述 传送门:我是传送门 During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally 阅读全文
posted @ 2021-01-20 20:59 Yiduuannng 阅读(72) 评论(0) 推荐(0)
摘要: 应用场景 静态: 查询区间第K大 动态: 带修改的查询区间第K大 静态 P3834【模板】可持久化线段树 1(主席树) 1 #include <bits/stdc++.h> 2 using namespace std; 3 #define clr(a, x) memset(a, x, sizeof( 阅读全文
posted @ 2021-01-20 20:55 Yiduuannng 阅读(107) 评论(0) 推荐(0)
摘要: 描述 传送门:我是传送门 Alice, a student of grade 66, is thinking about an Olympian Math problem, but she feels so despair that she cries. And her classmate, Bob 阅读全文
posted @ 2021-01-20 20:53 Yiduuannng 阅读(81) 评论(0) 推荐(0)
摘要: 描述 传送门:我是传送门 Given a sequence of integers a1,a2,…,ana1,a2,…,an and qq pairs of integers (l1,r1),(l2,r2),…,(lq,rq)(l1,r1),(l2,r2),…,(lq,rq), find count 阅读全文
posted @ 2021-01-20 20:49 Yiduuannng 阅读(137) 评论(0) 推荐(0)
摘要: 描述 参考资料:我是传送门 一维树状数组的差分写法 二维树状数组 注意要差分处理 一维树状数组 (1). 单点修改+区间查询 (2). 区间修改+单点查询 // 给位置p增加x<br /> void add(int p,int x) { while(p &lt;= n) sum[p] += x,p 阅读全文
posted @ 2021-01-20 20:47 Yiduuannng 阅读(77) 评论(0) 推荐(0)
摘要: 描述 传送门:我是传送门 CA loves strings, especially loves the palindrome strings. One day he gets a string, he wants to know how many palindromic substrings in 阅读全文
posted @ 2021-01-20 20:43 Yiduuannng 阅读(66) 评论(0) 推荐(0)
摘要: 应用场景 1.求串S前缀font>0~i内本质不同回文串的个数(两个串长度不同或者长度相同且至少有一个字符不同便是本质不同) 2.求串S内每一个本质不同回文串出现的次数 3.求串S内回文串的个数(其实就是1和2结合起来) 4.求以下标i结尾的回文串的个数 参考资料: Palindromic Tree 阅读全文
posted @ 2021-01-20 20:40 Yiduuannng 阅读(67) 评论(0) 推荐(0)
摘要: 描述 传送门:我是传送门 当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋——我们能在有生之年看到500年一遇的世界奇观,那是多么幸福的事儿啊~~但网路上总有那么些网站,开始借着民众的好奇心,打着介绍日食的旗号,大肆传播病毒。小t不幸成为受害者之一 阅读全文
posted @ 2021-01-20 20:35 Yiduuannng 阅读(91) 评论(0) 推荐(0)
摘要: 应用场景 多模式匹配问题 多串匹配一个串 预定义 1 const int N = 1e6+100; 2 char s[N],m[N]; 3 struct node 4 { 5 int son[26]; 6 int fail; 7 int count; 8 }ac[N]; 9 int tot = 0; 阅读全文
posted @ 2021-01-20 20:34 Yiduuannng 阅读(71) 评论(0) 推荐(0)
摘要: 描述 传送门:我是传送门 During tea-drinking, princess, amongst other things, asked why has such a good-natured and cute Dragon imprisoned Lpl in the Castle? Drag 阅读全文
posted @ 2021-01-20 20:32 Yiduuannng 阅读(128) 评论(0) 推荐(0)
摘要: 描述 传送门:我是传送门 A prefix of a string is a substring starting at the beginning of the given string. The prefixes of “carbon” are: “c”, “ca”, “car”, “carb” 阅读全文
posted @ 2021-01-20 20:30 Yiduuannng 阅读(121) 评论(0) 推荐(0)
摘要: 描述 传送门:我是传送门 Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). 输入 输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Igna 阅读全文
posted @ 2021-01-20 18:20 Yiduuannng 阅读(70) 评论(0) 推荐(0)
摘要: 字典树 预定义 1 const int N = 1e6+10; 2 int tot = 1; 3 struct node 4 { 5 int son[26]; 6 int cnt; // 特殊标记 7 bool have; 8 node() 9 { 10 memset(son,0,sizeof so 阅读全文
posted @ 2021-01-20 18:16 Yiduuannng 阅读(95) 评论(0) 推荐(0)
摘要: 描述 传送门:我是传送门 John is a manager of a CPU chip factory, the factory produces lots of chips everyday. To manage large amounts of products, every processo 阅读全文
posted @ 2021-01-20 18:14 Yiduuannng 阅读(64) 评论(0) 推荐(0)