【题解】洛谷P1162填涂颜色 bfs

题目链接 从边界bfs,标记所有圈外的0,最后找未标记的0 #include<cstdio> #include<queue> using namespace std; int n,a[35][35],vis[35][35]; int dx[4]={1,-1,0,0},dy[4]={0,0,1,-1}; struct node{ int x,y; node(){} node(int _x,in
相关文章
相关标签/搜索