上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N=1e6+10; int n; LL a[N],s[N]; int main() { cin>>n; LL sum=0; for( 阅读全文
posted @ 2025-12-08 16:41 AnoSky 阅读(4) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N=1e5+10; int n,k; LL a[N],b[N],s[N]; bool check(LL x) { //预处理前缀和数 阅读全文
posted @ 2025-12-08 10:30 AnoSky 阅读(8) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=110; const char null='*'; vector<char> str(N,'*'); int n; //使用erase函数 int main() { cin 阅读全文
posted @ 2025-12-08 09:15 AnoSky 阅读(7) 评论(0) 推荐(0)
摘要: 点击查看代码 #include <iostream> using namespace std; const int MOD = 1e9+7; int main() { int n; cin >> n; long long sum_mod = 0; for (int i = 0; i < n; i++ 阅读全文
posted @ 2025-12-08 08:39 AnoSky 阅读(6) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N = 15; char g[N][N]; int n; int cnt; // 是一个二进制数,表示第i行的哪些位置可以放皇后,1表示可放,0表示不可以放 int row_m 阅读全文
posted @ 2025-12-05 10:57 AnoSky 阅读(14) 评论(1) 推荐(0)
摘要: 点击查看代码 #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 阅读(12) 评论(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 阅读(5) 评论(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 阅读(7) 评论(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 阅读(7) 评论(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 阅读(4) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页