随笔分类 -  一本通

摘要:一本通 图论part 1 http://ybt.ssoier.cn:8088/problem_show.php?pid=1346 并查集,初始化,路径压缩,合并 点击查看代码 #include<bits/stdc++.h> #define rep(i,l,r) for(int i=int(l);i< 阅读全文
posted @ 2022-01-21 12:46 mofan552 阅读(37) 评论(0) 推荐(0) 编辑
摘要:一本通 树堆part 1 http://ybt.ssoier.cn:8088/problem_show.php?pid=1336 树的遍历 点击查看代码 #include<bits/stdc++.h> #define rep(i,l,r) for(int i=int(l);i<int(r);i++) 阅读全文
posted @ 2022-01-21 12:46 mofan552 阅读(78) 评论(0) 推荐(0) 编辑
摘要:一本通 队列part 1 http://ybt.ssoier.cn:8088/problem_show.php?pid=1332 队列先进先出 点击查看代码 #include<bits/stdc++.h> #define rep(i,l,r) for(int i=int(l);i<int(r);i+ 阅读全文
posted @ 2022-01-19 21:32 mofan552 阅读(93) 评论(0) 推荐(0) 编辑
摘要:一本通 栈part 1 http://ybt.ssoier.cn:8088/problem_show.php?pid=1331 it's a very strange prob.I dont know why i cant pass the test in this website while i 阅读全文
posted @ 2022-01-17 15:43 mofan552 阅读(39) 评论(0) 推荐(0) 编辑
摘要:一本通 分治part 1 http://ybt.ssoier.cn:8088/problem_show.php?pid=1241 点击查看代码 #include<bits/stdc++.h> #define rep(i,l,r) for(int i=int(l);i<int(r);i++) #def 阅读全文
posted @ 2022-01-16 18:31 mofan552 阅读(50) 评论(0) 推荐(0) 编辑
摘要:一本通 BFS part 1 http://ybt.ssoier.cn:8088/problem_show.php?pid=1329 一道基础的求连通块的题目 点击查看代码 #include<bits/stdc++.h> #define rep(i,l,r) for(int i=int(l);i<i 阅读全文
posted @ 2022-01-14 19:25 mofan552 阅读(53) 评论(0) 推荐(0) 编辑
摘要:一本通 dp part 1 http://ybt.ssoier.cn:8088/problem_show.php?pid=1293 点击查看代码 #include<bits/stdc++.h> #define rep(i,l,r) for(int i=int(l);i<int(r);i++) #de 阅读全文
posted @ 2022-01-14 00:03 mofan552 阅读(47) 评论(0) 推荐(0) 编辑
摘要:贪心part 1 http://ybt.ssoier.cn:8088/problem_show.php?pid=1223 点击查看代码 #include<bits/stdc++.h> #define rep(i,l,r) for(int i=int(l);i<int(r);i++) #define 阅读全文
posted @ 2022-01-09 21:58 mofan552 阅读(103) 评论(0) 推荐(0) 编辑
摘要:https://www.acwing.com/problem/content/description/1017/ 二维地图的dp,对于某一个而言,只能向右,或者向下,除了边界,每一个都继承最优的选项即可。 1 #include<bits/stdc++.h> 2 using namespace std 阅读全文
posted @ 2021-08-04 02:33 mofan552 阅读(30) 评论(0) 推荐(0) 编辑
摘要:http://poj.org/problem?id=1700贪心问题 对于一个安排,怎么样是最小的?首先关于花费,对于每次运输,以最节约的方式运输。两种情况,一种最轻的作为往返,另外 一种是每次带一个,每次带一个。 就要进行选择。到最后特殊判断即可。 #include<iostream> #incl 阅读全文
posted @ 2021-08-02 19:42 mofan552 阅读(25) 评论(0) 推荐(0) 编辑
摘要:http://ybt.ssoier.cn:8088/problem_show.php?pid=1260 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const ll N=1e3+520,INF= 阅读全文
posted @ 2021-08-02 11:03 mofan552 阅读(187) 评论(0) 推荐(0) 编辑
摘要:http://ybt.ssoier.cn:8088/problem_show.php?pid=1259 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const ll N=1e5+520; 5 l 阅读全文
posted @ 2021-08-02 04:42 mofan552 阅读(668) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstdio> using namespace std; typedef long long ll; const int maxn = 63; ll multi(ll a,ll b,ll mod_val)//实现a * b % mod_val的 阅读全文
posted @ 2021-07-30 23:15 mofan552 阅读(28) 评论(0) 推荐(0) 编辑