会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
青林
我们永远在一起
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2022年4月6日
区间最大公约数(线段树模板)
摘要: 链接 1 #include <bits/stdc++.h> 2 #define go continue 3 #define int long long 4 #define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); 5 #defin
阅读全文
posted @ 2022-04-06 17:34 std&ice
阅读(150)
评论(0)
推荐(0)
2022年4月4日
欧拉函数
摘要: 1、分解质因数 1 /* 2 f(n) : 1 - n 中与n互质的个数(gcd(a, b) = 1) 3 n = p1^a1.p2^a2...pn^an 4 f(n) = n * (1 - 1/p1)(1 - 1/p2)...(1 - 1/pn) 5 */ 6 #include <bits/std
阅读全文
posted @ 2022-04-04 14:33 std&ice
阅读(121)
评论(0)
推荐(0)
高斯消元(yxc模板)
摘要: 模板题链接 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 const int N = 110; 5 const double eps = 1e-6; 6 int n; 7 double a[N][N]; 8 9 int solve() 1
阅读全文
posted @ 2022-04-04 11:18 std&ice
阅读(96)
评论(0)
推荐(0)
2022年4月3日
质数 & 约数
摘要: 1、判断质数 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 bool is_prime(int n){ 5 if(n < 2) return false; 6 for(int i = 2; i <= n / i; ++i){ 7 if(n
阅读全文
posted @ 2022-04-03 16:13 std&ice
阅读(114)
评论(0)
推荐(0)
逆元
摘要: 模板题链接 1、mod为质数下的普通逆元求法 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 int fp(int a, int b, int c){ 5 int res = 1; 6 while(b){ 7 if(b & 1) res =
阅读全文
posted @ 2022-04-03 11:00 std&ice
阅读(77)
评论(0)
推荐(0)
2022年3月30日
multiset 用法
摘要: multiset初始化 点击查看代码 multiset<int> set1; //默认升序 multiset<int, less<int> > set2; //等价于上一种方式 multiset<int, greater<int> > set3; //降序 2. multiset常用函数 点击查看代
阅读全文
posted @ 2022-03-30 23:26 std&ice
阅读(244)
评论(0)
推荐(0)
2022年3月29日
江西省赛题解 A B H J K L
摘要: 链接 A、Mio visits ACGN Exhibition 1 /* 2 f[i][j][k] : 从(1, 1) -> (i, j)的经过k个0的方案数: 3 { 4 a[i][j] = 0 : f[i][j - 1][k - 1] + f[i - 1][j][k - 1] 5 a[i][j]
阅读全文
posted @ 2022-03-29 09:31 std&ice
阅读(198)
评论(0)
推荐(0)
2022年3月22日
Lost Numbers(交互 + dfs)
摘要: 1 /**\ 2 https://codeforces.com/contest/1167/problem/B 3 每日询问相邻的,能知道5个,最后一个也可以推出来 4 直接dfs暴力匹配就行, 5 询问的时候把结果存下来 6 \**/ 7 #include <bits/stdc++.h> 8 usi
阅读全文
posted @ 2022-03-22 14:40 std&ice
阅读(147)
评论(0)
推荐(0)
Searching Local Minimum(交互 + 二分 1700)
摘要: 1 /**\ 2 https://codeforces.com/contest/1480/problem/C 3 二分不断维护一个区间 4 使得a[l - 1] > a[l], a[r] < a[r + 1] 5 \**/ 6 #include <bits/stdc++.h> 7 using nam
阅读全文
posted @ 2022-03-22 14:08 std&ice
阅读(126)
评论(0)
推荐(0)
2022年3月21日
迷宫2(bfs + 堆优化)
摘要: 1 /**\ 2 https://ac.nowcoder.com/acm/contest/26077/1005 3 从第i列第n行, 第1行m列添加起点, 然后bfs寻找能够分割两个点的墙 4 5 注意: 6 1、方向只能上下左右,因为对角线仍然可以穿过 7 2、处理图的数据的时候可以将-1的墙标记
阅读全文
posted @ 2022-03-21 19:51 std&ice
阅读(110)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告