摘要: jiahao0109c@gmail.com 阅读全文
posted @ 2020-04-04 13:38 John-C 阅读(1) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <string> #include <queue> using namespace std; int n, m; string maze[110]; bool vis[110][110]; int dir[4][2] = { {-1, 0}, 阅读全文
posted @ 2020-04-04 11:41 John-C 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 什么时候用DFS,什么时候用BFS?(DFS和BFS的特点和异同) 二维数组的题目,N小于20的,适用DFS。而一般 N<= 200,N<=1000这种,一定不可能用DFS去做。而且并不只是整个题目不能用DFS,其中的每一步也不能使用DFS。 BFS的基本步骤 1.将初始点(一个或多个)加入一个集合 阅读全文
posted @ 2020-04-04 11:38 John-C 阅读(1647) 评论(0) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2020-04-02 20:29 John-C 阅读(157) 评论(0) 推荐(0) 编辑
摘要: C. First Last Sorting链接:https://nanti.jisuanke.com/t/44141 阅读全文
posted @ 2020-03-29 20:48 John-C 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Cupboard and Balloons CodeForces - 342C 找到不变的点 抓住不确定的点进行讨论 #include<iostream> #include<cmath> using namespace std; int main() { double r,h; cin>>r>>h; 阅读全文
posted @ 2020-03-25 16:44 John-C 阅读(208) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<map> using namespace std;map<int,int> x;map<int,int> y;map<pair<int,int>,int> xy;int main(){ int n; cin>>n; for(int i=0;i<n 阅读全文
posted @ 2020-03-22 22:38 John-C 阅读(150) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/qq_42957923/article/details/90107840 阅读全文
posted @ 2020-03-22 22:36 John-C 阅读(93) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/wuyudong/p/cpp-map.html 阅读全文
posted @ 2020-03-22 22:21 John-C 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-03-14 14:16 John-C 阅读(105) 评论(0) 推荐(0) 编辑