bfs
liuliu2333
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
走迷宫(bfs)
白书。。。#include<bits/stdc++.h> using namespace std; char maze[12][12]; int n,m; int sx,sy,ex,ey,d[12][12]; int dx[4]={-1,1,0,0},dy[4]={0,0,-1,1}; typedef pair<int,int> P; int bfs() { queue&...转载 2018-02-08 20:21:58 · 383 阅读 · 0 评论 -
走迷宫+钥匙和门(bfs)
就是走迷宫但会加上门,钥匙(不一定必须拿钥匙)#include<bits/stdc++.h> using namespace std; char mapp[506][506]; int b[506][506][2]; int d[4][2]={0,1,0,-1,1,0,-1,0}; int n,m,x,y; struct nomd { int x,y,s,f; }; void bfs...原创 2018-02-16 15:37:47 · 1115 阅读 · 0 评论 -
Flip Game (bfs+位运算)
Flip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is lying either it's bl...原创 2018-05-18 16:29:05 · 234 阅读 · 0 评论 -
P1032 字串变换(bfs)
题目描述已知有两个字串 A, B 及一组字串变换的规则(至多6个规则):A1 -> B1A2 -> B2规则的含义为:在 A$中的子串 A1 可以变换为 B1、A2 可以变换为 B2 …。例如:A='abcd'B='xyz'变换规则为:‘abc’->‘xu’‘ud’->‘y’‘y’->‘yz’则此时,A 可以经过一系列的变换变为 B,其变换的过程为:‘abcd’-&g...原创 2018-04-28 20:17:45 · 366 阅读 · 0 评论 -
C - Battle City POJ - 2312 (bfs+优先队列)坦克大战。。。
Many of us had played the game "Battle city" in our childhood, and some people (like me) even often play it on computer now. What we are discussing is a simple edition of this game. Given a map that c...原创 2018-06-14 22:53:44 · 204 阅读 · 0 评论 -
Dungeon Master POJ - 2251 (bfs)
You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south...原创 2018-07-18 19:40:26 · 132 阅读 · 0 评论 -
Pots POJ - 3414 (bfs+记录路径)
You are given two pots, having the volume of A and B liters respectively. The following operations can be performed: FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap; DROP(i) empty the po...原创 2018-08-05 10:48:47 · 164 阅读 · 0 评论 -
ACM-ICPC Jiaozuo Onsite 2018 Honeycomb【bfs】
题意:其实就是迷宫直接跑就行了,原本还想把迷宫转换一下想麻烦了。。 #include<bits/stdc++.h> using namespace std; const int INF =100000000; char mp[10000][10000]; int d[10][2]={4,0,-4,0,-2,-6,-2,6,2,-6,2,6}; int n,m; typedef pa...原创 2018-12-11 20:45:40 · 375 阅读 · 0 评论
分享