#include<iostream>
#include<cstring>
#include<cstdio>
#define inf 0x7fffffff
using namespace std;
inline int read(){
int x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return x*f;
}
struct edge{
int to,next,v;
}e[50001];
int r,c,d,cnt=1,ans,T=801,mp[21][21],mark[21][21],head[50001],h[50001];
bool judge(int x1,int y1,int x2,int y2){
if((......
阅读全文