LXNHB
LXNHB
全部文章
题解
c++基础(2)
三分法(1)
二分法(2)
操作系统(7)
算法(2)
归档
标签
去牛客网
登录
/
注册
LXNHB的博客
蒟蒻一枚
全部文章
/ 题解
(共4篇)
Manacher 算法
来自专栏
模板算法题 #include<bits/stdc++.h> using namespace std; const int M=5e5+5; char s[M<<1]; int p[M<<1]; int main(){ cin>>(s+1); i...
C++
字符串
manacher
2023-12-13
0
275
题解|#F. Reverse# codeforces round 760
来自专栏
字符串经过一次操作以后,首尾字符一定只能是1,根据这一点,就可以写判断语句: 当目标字符串的最后一个字符的值为0的话,那么一定不可能,输出NO,然后结束即可 然后不论是使用dfs还是bfs搜索的方式,都需要限制字符串长度,10^18是60个二进制位,所以长度限制在70就可以了。 其他的也没什么要注意...
C++
字符串
广度优先搜索
深度优先搜索
2023-12-13
0
272
题解|#lanqiao 斤斤计较的小z# 字符串Hash模板
来自专栏
字符串Hash模板 #include<bits/stdc++.h> using namespace std; const int M=1e6+5; typedef unsigned long long ull; char s1[M],s2[M]; ull hs[M]; ull b[M];...
C++
字符串
字符串Hash
2023-12-12
0
290
题解 | #拼数#
来自专栏
这道题不可以直接的用字典序比较 #include<bits/stdc++.h> using namespace std; int n; const int M=25; string a[M]; bool cmp(string a,string b){ return a+b>...
C++
字符串
2023-11-27
0
220