随笔分类 -  [kuangbin带你飞]专题一 简单搜索

摘要:1 //枚举+BFS 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 #define INF 0xfffffff 11 12 int T,N,M,len; 13 char grid[15][15]; 14 ... 阅读全文
posted @ 2018-05-08 16:49 ouyang_wsgwz 阅读(200) 评论(0) 推荐(0) 编辑
摘要:1 //两遍bfs 2 #include 3 4 using namespace std; 5 6 const int MAXN = 1010; 7 8 int n,m; 9 char G[MAXN][MAXN]; 10 int fire[MAXN][MAXN]; 11 int Time[MAXN][MAXN]; 12 int dir[4][2] ... 阅读全文
posted @ 2018-05-07 21:52 ouyang_wsgwz 阅读(268) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 const int maxn = 105; 9 10 char f[10][10] ={ "FILL(1)","FILL(2)","DROP(1)","DROP(2)","POUR(1,2)","POU... 阅读全文
posted @ 2018-05-07 20:25 ouyang_wsgwz 阅读(132) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 mapq; 8 9 int main(){ 10 int t; 11 cin >> t; 12 int cnt = 0; 13 while(t--){ 14 cnt++; 15 ... 阅读全文
posted @ 2018-05-05 21:13 ouyang_wsgwz 阅读(129) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 const int INF = 0xfffffff; 10 int g[17][17]; 11 int f[17][17] = {}; 12 int ans[17][17] = {... 阅读全文
posted @ 2018-04-29 21:53 ouyang_wsgwz 阅读(141) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 6 int s,n,m; 7 int vis[105][105][105]; 8 9 struct node 10 { 11 int s,n,m,step; 12 }; 13 int check(int x,int y,... 阅读全文
posted @ 2018-04-29 17:30 ouyang_wsgwz 阅读(187) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int mark[205][205]; 7 char map[205][205]; 8 int fx[4][2]={{1,0},{-1,0},{0,1},{0,-1}}; 9 int num[205][205],num1[205][205],... 阅读全文
posted @ 2018-04-29 15:14 ouyang_wsgwz 阅读(130) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 struct node{ 8 int cur, step; 9 }now, Next; 10 int vis[10001], star, finish, prime[10001] = { 0, 0, 1 }; 11 1... 阅读全文
posted @ 2018-04-29 15:08 ouyang_wsgwz 阅读(136) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 using namespace std; 4 5 int n; 6 bool ok; 7 8 void dfs(unsigned long long x, int y, int k){ 9 if(ok == true) return ; 10 if(x % y == 0){ 11 cout ... 阅读全文
posted @ 2018-04-29 14:31 ouyang_wsgwz 阅读(118) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 6 int n, m; 7 const int maxn = 105; 8 string s[maxn]; 9 int f[8][2] = { {0, 1},{1, 0},{-1, 0},{0, -1},{1, 1},{-1, -1},{1, -1},{-... 阅读全文
posted @ 2018-04-29 13:51 ouyang_wsgwz 阅读(139) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 int Map[6][6],vis[6][6],pre[110]; 8 //pre[]记录每个状态的前一个状态 9 struct Cam 10 { 11 int x,y; 12 }List[110]; 13 14 int Di... 阅读全文
posted @ 2018-04-28 16:11 ouyang_wsgwz 阅读(188) 评论(0) 推荐(0) 编辑
摘要:1 //标准bfs 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 10 int dir[3] = { 1, -1 }; 11 12 struct node 13 { 14 int x, step; 15 } s, ss; 16 17 i... 阅读全文
posted @ 2018-04-04 20:08 ouyang_wsgwz 阅读(175) 评论(0) 推荐(0) 编辑
摘要:1 //纯bfs 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 const int maxn = 33; 10 char g[maxn][maxn][maxn]; 11 bool vis[maxn][maxn][maxn]; 12 int f[6][... 阅读全文
posted @ 2018-04-04 19:40 ouyang_wsgwz 阅读(203) 评论(0) 推荐(0) 编辑
摘要:1 //纯dfs() 2 3 #include 4 #include 5 #include 6 #include 7 #include 8 9 using namespace std; 10 const int maxn = 10; 11 char g[maxn][maxn]; 12 bool vis[maxn]; //列标记 13 int n, k... 阅读全文
posted @ 2018-04-03 20:51 ouyang_wsgwz 阅读(143) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示
深色
回顶
展开