上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要: 牛客 周赛67 20250525 https://ac.nowcoder.com/acm/contest/95016 A: 题目大意:对给定的字符串排序,需要满足小写字母在前,数字在中间,大写字母最后的顺序,且对于相同类型的字符不要改变他们之间的相对位置 void solve(){ int n; c 阅读全文
posted @ 2025-06-04 18:27 才瓯 阅读(10) 评论(0) 推荐(0)
摘要: Splay平衡树 基于 Splay 伸展操作维持平衡的二叉树,不断将某个节点旋转到根节点,可以在均摊 \(O(\log n)\) 的时间内完成插入查找和删除操作 节点的定义: struct node{ int s[2];//左儿子0,右儿子1 int v;//节点的权值 int cnt;//权值的次 阅读全文
posted @ 2025-06-01 13:18 才瓯 阅读(48) 评论(0) 推荐(0)
摘要: 牛客 周赛94 20250531 https://ac.nowcoder.com/acm/contest/110696 A: 题目大意: void solve(){ int n; cin>>n; cout<<(n+1)/2<<endl; } 签到 B: 题目大意: int a[4],b[4],n; 阅读全文
posted @ 2025-05-31 15:31 才瓯 阅读(20) 评论(0) 推荐(0)
摘要: 牛客 周赛93 20250524 https://ac.nowcoder.com/acm/contest/109904 A: 题目大意: void solve(){ int n; cin>>n; if (pow(2,n)>pow(n,3)) cout<<"B"; else cout<<"A"; } 阅读全文
posted @ 2025-05-25 16:54 才瓯 阅读(24) 评论(0) 推荐(0)
摘要: 数位DP问题 用来解决一类对数位进行某种计数的问题,通常有以下特点: 统计满足某种条件或约束的数量,且需要统计的区间跨度极大 某些条件或约束可以利用数位拆分的方式去满足 通常给定的区间 \([l,r]\) 可以拆分为 \([1,l],[1,r]\) 然后利用前置和做差计算 因为需要满足的约束以及边界 阅读全文
posted @ 2025-05-24 17:13 才瓯 阅读(38) 评论(0) 推荐(0)
摘要: 求强连通分量 相关概念 强连通:在有向图 \(D\) 中,\(D\) 的任意两个节点连通 强连通分量:一张平凡图上的极大强连通子图 DFS 生成树:以图上某节点通过 DFS 访问的方式,与可达节点形成的树结构,依据树结构图上的边主要分为四类 树边:在 DFS 生成树上连接两个节点的边,在图上为每次搜 阅读全文
posted @ 2025-05-21 19:23 才瓯 阅读(20) 评论(0) 推荐(0)
摘要: 数论基础F 约数 定义:\(a|b\) 表示 \(a\) 整除于 \(b\) (\(b\) 能被 \(a\) 整除),\(b\) 为 \(a\) 的倍数,\(a\) 为 \(b\) 的约数 规定 \(0\) 是所有非 \(0\) 整数的倍数,且对于非 \(0\) 整数 \(b\) ,\(b\) 的约 阅读全文
posted @ 2025-05-21 19:23 才瓯 阅读(30) 评论(0) 推荐(0)
摘要: 第十三届重庆市程序设计大赛 https://codeforces.com/gym/105887 F: 题目大意: void solve(){ int a,b,c; cin>>a>>b>>c; if (a>b) cout<<"Win"<<endl; else if (c>b) cout<<"WIN"< 阅读全文
posted @ 2025-05-18 17:19 才瓯 阅读(93) 评论(0) 推荐(0)
摘要: 牛客 周赛92 20250515 https://ac.nowcoder.com/acm/contest/108589 A: 题目大意: void solve(){ int n; cin>>n; cout<<"a_"; for (int i=3;i<=n;i++) cout<<'a'; } 签到,随 阅读全文
posted @ 2025-05-13 21:30 才瓯 阅读(11) 评论(0) 推荐(0)
摘要: 第二十一届西南科技大学同步赛 https://ac.nowcoder.com/acm/contest/109520/A A: 题目大意: map<char,char> mp; void solve(){ int n,m; cin>>n>>m; string s; cin>>s; for (int i 阅读全文
posted @ 2025-05-12 19:55 才瓯 阅读(20) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页