#include #include #include #include #include #include #include #include #include #include #include #include #define N 305 #define M 8000005 #define ls (t<<1) #define rs ((t<<1)|1) #define mid ((l+r)>>1) #define mk make_pair #define pb push_back #define fi first #define se second using namespace std; int i,j,m,n,p,k,fa[N],vis[N],dis[N],mp[N][N]; int Min(int n) { int ans=(int)1e9,i,j,k; for (i=1;i<=n;++i) fa[i]=i; for (;n>1;) { int k=0,last=1; memset(vis,0,sizeof(vis)); memset(dis,0,sizeof(dis)); vis[fa[1]]=1; for (i=2;i<=n;++i) { k=-1; for (j=2;j<=n;++j) if (!vis[fa[j]]) { dis[fa[j]]+=mp[fa[last]][fa[j]]; if (k==-1||dis[fa[k]]=k) puts("Yes"); else puts("No"); } }