![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
bfs
123~mutouren
这个作者很懒,什么都没留下…
展开
-
hdu 1242 Rescue
#include<bits/stdc++.h>using namespace std;const int M = 205;int dx[] = {1,0,0,-1};int dy[] = {0,1,-1,0};int n,m;int vis[M][M];char mp[M][M];struct dot{ int x,y,time;};bool in(dot gx){ if(gx.x>=0&&gx.x<n&&gx.y>=0&a原创 2021-07-23 20:19:51 · 74 阅读 · 0 评论 -
hdu 1372 Knight Moves
#include<bits/stdc++.h>using namespace std;int d[8][2]={-1,-2,-2,-1,1,-2,2,-1,-2,1,-1,2,1,2,2,1};struct node{ char x; int y,t;}a,b;int vis[200][10];int vj(char x,int y){ if(x>='a'&&x<='h'&&y>=1&&y<=8&&原创 2021-07-23 16:46:28 · 78 阅读 · 0 评论 -
hdu 1495 非常可乐
#include<bits/stdc++.h>using namespace std;const int M = 105;int s,n,m;struct cup{ int v[5]; int step;}temp;int vis[M][M][M],v[5];void pour(int a,int b){ int sum = temp.v[a]+temp.v[b]; if(sum>=v[b]) temp.v[b] = v[b]; else temp.v[b] = s原创 2021-07-23 14:18:45 · 48 阅读 · 0 评论