摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef unsigned long long ULL; const int N=3e5+10,P=131; ULL h[N],p[N]; char str[N]; //记录符合要求的字串的 阅读全文
posted @ 2025-12-04 16:20 AnoSky 阅读(8) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); int n; cin>>n; unordered_map<string,i 阅读全文
posted @ 2025-12-04 10:54 AnoSky 阅读(4) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=1e5+10,null=0x3f3f3f3f; int h[N]; int find(int x) { int t=(x%N+N)%N; while(h[t]!=null& 阅读全文
posted @ 2025-12-04 09:37 AnoSky 阅读(5) 评论(0) 推荐(0)
摘要: 点击查看代码 #include <bits/stdc++.h> using namespace std; priority_queue<int> q1; // 大根堆,存较小一半 priority_queue<int, vector<int>, greater<int>> q2; // 小根堆,存较 阅读全文
posted @ 2025-12-02 17:22 AnoSky 阅读(5) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; int n; priority_queue<string,vector<string>,greater<string>> hp,res; int main() { cin>>n; while(n- 阅读全文
posted @ 2025-12-02 16:43 AnoSky 阅读(2) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; int n,ans; priority_queue<int,vector<int>,greater<int>> pq; int main() { cin>>n; for(int i=0;i<n;i 阅读全文
posted @ 2025-12-02 16:40 AnoSky 阅读(4) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=1e5+10; int n,m; int p[N]; bool st[N]; int find(int x) { if(p[x]!=x) p[x]=find(p[x]); 阅读全文
posted @ 2025-12-02 11:01 AnoSky 阅读(3) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=1e5+10; int n,m,ans; int p[N]; bool st[N]; int find(int x) { if(p[x]!=x) p[x]=find(p[x 阅读全文
posted @ 2025-12-02 10:27 AnoSky 阅读(2) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=8e5+10; char str[N]; int ne[N]; int main() { int n; string s; cin>>n>>s; //构造反转拼接字符串 f 阅读全文
posted @ 2025-11-30 23:26 AnoSky 阅读(6) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=1e6; int n,m,idx; int cnt[N]; char str[N]; int son[N][26]; void insert(char* str) { in 阅读全文
posted @ 2025-11-30 17:05 AnoSky 阅读(5) 评论(0) 推荐(0)