摘要:
点击查看代码 #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)

浙公网安备 33010602011771号