摘要: 一本通 树堆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=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=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) 编辑
摘要: Educational Codeforces Round 117 (Rated for Div. 2) A. Distance https://codeforces.com/contest/1612/problem/A 题目给出的条件是 距离为曼哈顿距离,而曼哈顿距离等价于步长。 由题目的一半条件, 阅读全文
posted @ 2021-12-06 22:11 mofan552 阅读(38) 评论(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) 编辑