#include #define cls(a) memset(a,0,sizeof a) using namespace std; typedef unsigned u32; typedef long long i64; const u32 offset=1<<31; const u32 M=405; const u32 INF=0x7F7F7F7F; inline void chkmax(u32&a,const u32&b){ a=ab?b:a; } struct ano{ operator u32(){ signed x=0,y=0,c=getchar(); while(c<48) y=c==45,c=getchar(); while(c>47) x=x*10+c-48,c=getchar(); return y?-x:x; } }buf; u32 nl,nr,n,m,D[M][M]; u32 A[M],L[M]; u32 To[M],Slack[M]; bool Vis[M]; u32 Q[M],Pre[M]; void Updata(){ u32 d=INF; for(u32 i=1;iSlack[B]) continue; Pre[B]=A; if(!d){ Vis[B]=1; if(!To[B]) return B; else Vis[Q[r++]=To[B]]=1; } else Slack[B]=d; } } Updata(); for(u32 B=1;B