摘要: #前言 均使用unsigned long long溢出自动取模; 非unsigned long long版本:OI-wiki 字符串hash #详解 #模板 ##预处理进制B的次方 void init_bp(){ bp[0][0] = bp[1][0] = 1; for(int i=1;i<=hs; 阅读全文
posted @ 2021-03-16 15:46 棉被sunlie 阅读(110) 评论(0) 推荐(0)
摘要: 题链 题意求区间最长连续子序列最大和 当数据存在负数时,不能单纯取三个地方的max,如: p[rt].maxn = max(p[ls].rmax+p[rs].lmax,max(p[rt].lmax,p[rt].rmax)); #include <bits/stdc++.h> #include <io 阅读全文
posted @ 2021-03-16 13:34 棉被sunlie 阅读(49) 评论(0) 推荐(0)
摘要: 题链 该题洛谷题解区讲的都很好; 当询问时, l == r时,答案有可能不是true... (奇怪的坑) #include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <stdio.h> #include <st 阅读全文
posted @ 2021-03-16 11:02 棉被sunlie 阅读(62) 评论(0) 推荐(0)