2025年3月16日
摘要: σ(n!) = ∏(pᵢ^(eᵢ+1) - 1)/(pᵢ - 1) pi是质因子 ei是pi出现的次数!! 阅读全文
posted @ 2025-03-16 13:03 下头小美 阅读(8) 评论(0) 推荐(0)
  2025年3月15日
摘要: string s; transform(s.begin(),s.end(),s.begin(),::tolower/::toupper); 阅读全文
posted @ 2025-03-15 09:38 下头小美 阅读(7) 评论(0) 推荐(0)
  2025年3月13日
摘要: 7-13 天梯地图 分数 30 作者 陈越 单位 浙江大学 本题要求你实现一个天梯赛专属在线地图,队员输入自己学校所在地和赛场地点后,该地图应该推荐两条路线:一条是最快到达路线;一条是最短距离的路线。题目保证对任意的查询请求,地图上都至少存在一条可达路线。 输入格式: 输入在第一行给出两个正整数N( 阅读全文
posted @ 2025-03-13 14:48 下头小美 阅读(17) 评论(0) 推荐(0)
  2025年3月12日
摘要: queue q; st[1] = true; // 表示1号点已经被遍历过 q.push(1); while (q.size()) { int t = q.front(); q.pop(); for (int i = h[t]; i != -1; i = ne[i]) { int j = e[i]; 阅读全文
posted @ 2025-03-12 19:37 下头小美 阅读(5) 评论(0) 推荐(0)
  2025年3月11日
摘要: include<bits/stdc++.h> using namespace std; define ios ios::sync_with_stdio(false), cin.tie(0), cout.tie(0) int n, q; map<string, vector > mp; string 阅读全文
posted @ 2025-03-11 14:40 下头小美 阅读(19) 评论(0) 推荐(0)
  2025年3月10日
摘要: include<bits/stdc++.h> using namespace std; const int N = 100; int n; // 定义二叉树结构体 struct Tree { int x; // 节点的值 Tree* left; // 左子树 Tree* right; // 右子树 阅读全文
posted @ 2025-03-10 19:59 下头小美 阅读(7) 评论(0) 推荐(0)
  2025年3月7日
摘要: include<bits/stdc++.h> using namespace std; const int N=1010; int n,m,g[N][N],ans,t,ti[N][N],f[N][N]; bool st[N][N]; int np[2][2]={{1,0},{0,1}}; int d 阅读全文
posted @ 2025-03-07 20:59 下头小美 阅读(15) 评论(0) 推荐(0)
  2025年3月5日
摘要: const int N=100000000; int n,q,cnt,prime[N]; bool st[N]; void getp(int x){ for(int i=2;i<=n;i++){ if(!st[i]) prime[cnt++]=i; for(int j=0;prime[j]<=n/i 阅读全文
posted @ 2025-03-05 19:17 下头小美 阅读(11) 评论(0) 推荐(0)
  2025年3月1日
摘要: struct Node { ll cost; // 单词训练的花费 ll sum; // 训练次数 }; bool cmp(const Node &a, const Node &b) { return a.sum < b.sum; // 按训练次数排序 } int main() { int n; l 阅读全文
posted @ 2025-03-01 16:23 下头小美 阅读(98) 评论(0) 推荐(0)
  2025年2月26日
摘要: include<bits/stdc++.h> using namespace std; const int N=100100; typedef pair<int,int> pii; int n,r,l,q,id,a[N]; set s; int main(){ ios::sync_with_stdi 阅读全文
posted @ 2025-02-26 15:03 下头小美 阅读(9) 评论(0) 推荐(0)