queue<longlong>q;voidin(longlong&x){longlongy=1;charc=getchar();x=0;while(c<'0'||c>'9'){if(c=='-')y=-1;c=getchar();}while(c<='9'&&c>='0'){ x=(x<<1)+(x<<3)+c-'0';c=getchar();} x*=y; }voido(longlongx){if(x<0){p('-');x=-x;}if(x>9)o(x/...
var n,m,k,l,i,j,tot,num,c:integer; link:array[1..300] of integer;//link[i]=0,顶点i为未盖点,link[i]=j,边j,i为匹配边 first:array[1..300] of integer;//first[i]表示与i相连的第一条边在g中的下标 g:array[1..60000] of node;//存二分图的边,g[i].next表示与g[i].x相连...
Consider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is possible to form a committee of exactly P students that satisfies simultaneously the conditions: every student in the committee represents a different ...