【題解】洛谷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
相關文章
相關標籤/搜索