没加当前弧优化 56ms
#include<bits/stdc++.h>
#define inf 1000000000
using namespace std;
const int xx[4]={-1,1,0,0},yy[4]={0,0,-1,1};
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[100001];
int n,m,cnt=1,T,ans,a[101][101],id[101][101],head[10001],h[10001],q[10001];
inline void ins(int u,int v,in......
阅读全文