随笔分类 -  BFS/DFS搜索

摘要:Problem Description Benny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of samll squares. Water pipes 阅读全文
posted @ 2020-04-08 18:22 liyexin 阅读(196) 评论(0) 推荐(0)
摘要:基础知识: queue队列的相关用法:先进先出(FIFO) 入队push() //即插入元素 出队pop() //即删除元素 front() //读取队首元素 back() //读取队尾元素 empty() //判断队列是否为空 size() //读取队列当前元素的个数 —————————————— 阅读全文
posted @ 2020-03-19 16:26 liyexin 阅读(239) 评论(0) 推荐(0)
摘要:恢复内容开始 1.先上个基础的全排列 #include<iostream> #include<cstring> using namespace std; const int maxn=1e3; int vis[maxn]; int p[maxn]; int n; int t=0; void dfs( 阅读全文
posted @ 2019-11-12 23:38 liyexin 阅读(145) 评论(0) 推荐(0)