文章
2
粉丝
330
获赞
2
访问
1.3k
//abc+bcc=532
#include<bits/stdc++.h>
using namespace std;
#define st first
#define se second
#define int long long
typedef pair<int,pair<int,int>> piii;
int n,m,res;
const int N =1e3+100;
int dx[2] ={-1,1};
int dy[2]={-1,1};
int v[N][N];
int v1,v2;
queue<piii> q;
signed main(){
cin>>n>>m;
for(int i=1;i<=n;i++)
for(int j =1;j<=m;j++){
cin>>v[i][j];
if(v[i][j] == 2) {
v1=i,v2=j;
q.push(make_pair(0,make_pair(i,j)));
}
}
int maxn =0;
while(q.size()){
piii tmp =q.front();
int t =tmp.st;
 ...
登录后发布评论
暂无评论,来抢沙发