2022年4月24日
posted @ 2022-04-24 21:52
Hamine
阅读(164)
推荐(0)
摘要:
#include <bits/stdc++.h> using namespace std; int n; int main(){ ios::sync_with_stdio(false);cin.tie(0); cin >> n; vector <int> a(n), f(n); for (int i
阅读全文
posted @ 2022-04-24 11:35
Hamine
阅读(20)
推荐(0)
摘要:
luogu 模板: https://www.luogu.com.cn/problem/P3865 静态区间最大值查询 #include <bits/stdc++.h> using namespace std; using LL = long long; //mx[i][j] 表示从第 i 个位置开始
阅读全文
posted @ 2022-04-24 11:24
Hamine
阅读(39)
推荐(0)
2022年4月23日
posted @ 2022-04-23 18:57
Hamine
阅读(126)
推荐(0)
2022年4月22日
posted @ 2022-04-22 11:23
Hamine
阅读(51)
推荐(0)
2022年4月21日
摘要:
二分图:将图中所有点分成两个集合,所有边只会出现在集合之间。 二分图一定不含奇数环 染色法判断二分图 #include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10; int n, m, color[N]; vector <i
阅读全文
posted @ 2022-04-21 17:18
Hamine
阅读(295)
推荐(0)
2022年4月19日
摘要:
#include <bits/stdc++.h> using namespace std; const int N = 210, INF = 0x3f3f3f3f; int d[N][N], n, m, q; void Floyd(){ for (int k = 1; k <= n; k ++ )
阅读全文
posted @ 2022-04-19 00:21
Hamine
阅读(88)
推荐(0)
2022年4月18日
摘要:
求最短路 #include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10, INF = 0x3f3f3f3f; int n, m, d[N]; bool st[N]; vector < pair<int, int> > g[N
阅读全文
posted @ 2022-04-18 21:18
Hamine
阅读(42)
推荐(0)
摘要:
题目链接: https://www.luogu.com.cn/problem/P2602 https://www.acwing.com/problem/content/340/ 题目大意: 计算 $a$ 到 $b$ 区间中每一个数码出现的次数。 思路: 记忆化搜索 #include <bits/st
阅读全文
posted @ 2022-04-18 15:54
Hamine
阅读(49)
推荐(0)
2022年4月17日
摘要:
Acwing模板:https://www.acwing.com/problem/content/855/ 请你求出从 1 号点到 $n$ 号点的最多经过 $k$ 条边的最短距离,如果无法从 1 号点走到 $n$ 号点,输出 impossible。 #include <bits/stdc++.h> u
阅读全文
posted @ 2022-04-17 20:07
Hamine
阅读(51)
推荐(0)