随笔分类 -  模板

摘要:CSP-S 常用模板合集Kruskal Kruskal #include <iostream> #include <cstdio> #include <algorithm> using namespace std; //Mystery_Sky // #define INF 0x3f3f3f3f #define M 2000 阅读全文
posted @ 2019-11-15 07:18 Mystery_Sky 阅读(670) 评论(1) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2019-11-13 12:27 Mystery_Sky 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-09-13 17:01 Mystery_Sky 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-09-11 21:46 Mystery_Sky 阅读(144) 评论(0) 推荐(0) 编辑
摘要:```c++ inline int read() { int x = 0, flag = 1; char c = getchar(); while(c '9') {if(c == ' ') flag = 1, c = getchar();} while(c = '0' && c 阅读全文
posted @ 2019-07-14 21:57 Mystery_Sky 阅读(352) 评论(0) 推荐(1) 编辑
摘要:"【模板】线性筛素数" 线性筛素数(欧拉筛法)模板。 Code: c++ include include include using namespace std; //Mystery_Sky // define M 100001000 define INF 0x3f3f3f3f int prime[ 阅读全文
posted @ 2019-07-05 19:51 Mystery_Sky 阅读(186) 评论(0) 推荐(0) 编辑
摘要:"分组背包" 分组背包模板题 Code: 阅读全文
posted @ 2019-06-09 20:01 Mystery_Sky 阅读(776) 评论(0) 推荐(0) 编辑
摘要:~~别问我为什么是指针~~ 单点修改+区间查询 阅读全文
posted @ 2019-05-24 20:51 Mystery_Sky 阅读(140) 评论(0) 推荐(0) 编辑
摘要:"愤怒的牛" 二分答案模板题 cpp include include include using namespace std; //Mystery_Sky //二分查找(模板) define M 1000010 define ll long long define Mid (l+r+1)/2 int 阅读全文
posted @ 2019-05-16 19:55 Mystery_Sky 阅读(228) 评论(0) 推荐(0) 编辑
摘要:```cpp include include include include using namespace std; //Mystery_Sky // define maxn 1000010 struct Edge{ int to, next; }edge[maxn]; int vis[maxn] 阅读全文
posted @ 2019-05-11 21:04 Mystery_Sky 阅读(119) 评论(0) 推荐(0) 编辑
摘要:"混合背包" 混合背包模板题。 阅读全文
posted @ 2019-05-10 20:44 Mystery_Sky 阅读(625) 评论(0) 推荐(0) 编辑
摘要:"庆功会" 多重背包模板 比01背包多了一个将某种物品拆分的过程。 阅读全文
posted @ 2019-05-10 20:22 Mystery_Sky 阅读(914) 评论(0) 推荐(0) 编辑
摘要:"完全背包问题" 完全背包模板题 cpp include include using namespace std; //Mystery_Sky //完全背包模板 define M 1010 int f[M], c[M], w[M]; int v, m, ans; int main() { scanf 阅读全文
posted @ 2019-05-09 20:57 Mystery_Sky 阅读(750) 评论(0) 推荐(1) 编辑
摘要:"01背包问题" 经典的01背包问题模板 这里提供两种做法: 阅读全文
posted @ 2019-05-09 20:53 Mystery_Sky 阅读(1105) 评论(0) 推荐(0) 编辑

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