07 2022 档案

test
摘要:[NOI2001] 炮兵阵地 题目描述 司令部的将军们打算在 N×M 的网格地图上部署他们的炮兵部队。 一个 N×M 的地图由 NM 列组成,地图的每一格可能是山地(用 H 表示),也可能是平原(用 P 表示) 阅读全文
posted @ 2022-07-31 12:20 OopsOops 阅读(42) 评论(0) 推荐(0) 编辑
P2704 [NOI2001] 炮兵阵地 -状态压缩dp -省选
摘要:#include <bits/stdc++.h> #define debug(x) std::cerr << "Line: " << __LINE__ << \ "," << #x << "=" << x << "\n" using ll = long long; constexpr int N = 阅读全文
posted @ 2022-07-31 11:54 OopsOops 阅读(20) 评论(0) 推荐(0) 编辑
[template]二元一次方程组整数解 -math
摘要:#include <bits/stdc++.h> #define dbg(x) std::cerr << #x << "=" << x << "\n" using i64 = long long; #define int i64 void exgcd(int &gcd, int a, int b, 阅读全文
posted @ 2022-07-23 14:40 OopsOops 阅读(96) 评论(0) 推荐(0) 编辑
高斯消元法 -math
摘要:#include <bits/stdc++.h> #define dbg(x) std::cerr << #x << "=" << x << "\n" using i64 = long long; const int N = 105; std::vector<double> f[N]; void o 阅读全文
posted @ 2022-07-23 12:02 OopsOops 阅读(41) 评论(0) 推荐(0) 编辑
蓝桥杯2022省赛I题 -数的拆分 -math
摘要:#include <bits/stdc++.h> #define dbg(x) std::cerr << #x << "=" << x << "\n" using i64 = long long; int tot; int prime[100005], vis[100005]; const doub 阅读全文
posted @ 2022-07-19 16:11 OopsOops 阅读(481) 评论(0) 推荐(0) 编辑
蓝桥杯2022省赛J题 - 推导部分和 -带权并查集datastructure
摘要:#include <bits/stdc++.h> #define dbg(x) std::cerr << #x << "=" << x << "\n" using i64 = long long; const int N = 1e5 + 9; i64 val[N]; int fa[N]; int f 阅读全文
posted @ 2022-07-19 13:58 OopsOops 阅读(177) 评论(0) 推荐(0) 编辑
蓝桥杯2022省赛H题 - 扫描游戏 math
摘要:-51 33 2 #include <bits/stdc++.h> #define dbg(x) std::cerr << #x << "=" << x << "\n" using i64 = long long; struct node { i64 x, y, w; int id, circle, 阅读全文
posted @ 2022-07-19 12:44 OopsOops 阅读(336) 评论(0) 推荐(0) 编辑
P3959 [NOIP2017 提高组] 宝藏 --状态压缩dp,dfs
摘要:#include <bits/stdc++.h> #define dbg(x) std::cerr << #x << "=" << x << "\n" using i64 = long long; constexpr int N = 15; int n, m, lim, ans = 2e9, G[N 阅读全文
posted @ 2022-07-15 23:17 OopsOops 阅读(58) 评论(0) 推荐(0) 编辑
P2024食物链 - 种类并查集datastructure
摘要:#include <bits/stdc++.h> #define dbg(x) std::cerr << #x << "=" << x << "\n" using i64 = long long; constexpr int N = 100005; int fa[N * 3]; int find(i 阅读全文
posted @ 2022-07-15 12:15 OopsOops 阅读(21) 评论(0) 推荐(0) 编辑
City - 并查集路径压缩与按秩合并 datastructure
摘要:#include <bits/stdc++.h> using i64 = long long; #define dbg(x) std::cerr << #x << "=" << x << "\n" struct node{ int u,v,w; }; int fa[100005], rank[100 阅读全文
posted @ 2022-07-15 11:34 OopsOops 阅读(19) 评论(0) 推荐(0) 编辑
P1892团伙 -- 并查集datastructure
摘要:#include <bits/stdc++.h> using i64 = long long; int fa[1000005],b[1000005]; int find(int x){ return (fa[x] == x ? x : (fa[x] = find(fa[x]))); } void m 阅读全文
posted @ 2022-07-14 20:24 OopsOops 阅读(17) 评论(0) 推荐(0) 编辑
数独填充 -- dfs,bitmasks
摘要:#include <bits/stdc++.h> using i64 = long long; struct node { int x,y,row,col,grid,vis[3]; node():x(0),y(0),row(0),col(0),grid(0){ memset(vis,0,sizeof 阅读全文
posted @ 2022-07-13 18:31 OopsOops 阅读(31) 评论(0) 推荐(0) 编辑

 
点击右上角即可分享
微信分享提示