#include<cctype>#include<cstdio>#include<cstring>#include<algorithm>#define N 1005#define F inline
using namespace std;
const int t1[8]={
1,0,-1,0,1,1,-1,-1};
const int t2[8]={
0,1,0,-
BFSBZOJ题目传送门 洛谷题目传送门划水对每个联通块BFS一遍,然后就没了。。。代码:#include&lt;cctype&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;algorithm&gt;#define N 1005#define F inlineusing namespace ...