摘要: A题 构造 #include<bits/stdc++.h> using namespace std; #define int long long #define IOS std::ios::sync_with_stdio(false),cin.tie(0),cout.tie(0); #define 阅读全文
posted @ 2025-04-23 20:38 涤生yang 阅读(20) 评论(0) 推荐(0)
摘要: E题 二分答案 #include<bits/stdc++.h> using namespace std; #define int long long #define IOS std::ios::sync_with_stdio(false),cin.tie(0),cout.tie(0); #defin 阅读全文
posted @ 2025-04-22 21:58 涤生yang 阅读(7) 评论(0) 推荐(0)
摘要: 存储子串的出现次数 怎么把这个子串打印出来呢? #include<cstdio> #include<cstring> #include<string> #include<cmath> #include<algorithm> #include<iostream> using namespace std 阅读全文
posted @ 2024-04-23 09:58 涤生yang 阅读(10) 评论(0) 推荐(0)
摘要: 作用 把一个大字符串分成好多个小字符串 这些小字符串的最小后缀,就是其本身 求出这些小字符串的右端点下标 #include<bits/stdc++.h> using namespace std; char s[5000005]; int n,ans; vector<int> a; int main( 阅读全文
posted @ 2024-04-22 22:40 涤生yang 阅读(16) 评论(0) 推荐(0)
摘要: #include <iostream> #include <cstring> using namespace std; const int N = 2000010; int n; char a[N], b[N]; int get_min(char s[]) { int i = 0, j = 1; w 阅读全文
posted @ 2024-04-22 21:22 涤生yang 阅读(22) 评论(0) 推荐(0)
摘要: 求以每个节点结尾的,回文子串的个数,最大回文子串的长度 求回文串的总个数(必须连续) 不连续的是动态规划 #include<bits/stdc++.h> using namespace std; const int maxn = 500005; char str[maxn]; struct PAM 阅读全文
posted @ 2024-04-22 17:45 涤生yang 阅读(13) 评论(0) 推荐(0)
摘要: 1、字符串哈希 1) 2、马拉车 1) 阅读全文
posted @ 2024-04-22 12:17 涤生yang 阅读(10) 评论(0) 推荐(0)
摘要: 二次加强版那个题 距离最大内存,就差了一个ss数组了....96分 #include<bits/stdc++.h> #define maxn 2000001 using namespace std; string ss[100000]; char s[maxn],T[maxn]; int n,cnt 阅读全文
posted @ 2024-04-22 12:09 涤生yang 阅读(17) 评论(0) 推荐(0)
摘要: 实在是看不懂了.... 下面这个代码是求最大异或对,的值 至于那个异或区间....实在看不懂了...还是贴一下吧 #include<iostream> #include<algorithm> using namespace std; int const N=100010,M=31*N; int n; 阅读全文
posted @ 2024-04-21 20:22 涤生yang 阅读(18) 评论(0) 推荐(0)
摘要: 字典树所有功能 1、查整体单词(查前缀) 2、字符串排序(结合词频,可输出重复字符串) (放外头可以实现输出前缀) 3、统计词频(前缀频) 字符串词频(cnt数组就是频,放里头是整体词频,放外头就是前缀词频) 1、查整体单词(查前缀) //放外面就是查整体 //放里头就是查前缀 #include<b 阅读全文
posted @ 2024-04-21 15:09 涤生yang 阅读(28) 评论(0) 推荐(0)