#include #include #include #include using namespace std; struct node { int v1,v2; int w; } s[100005],t[100005]; int n,m,k,cnts,cntt; int father[100005],sum; int cmp(const node a,const node b) { if(a.w=k) return 1; else return 0; } int main() { int text=0; while(scanf("%d%d%d",&n,&m,&k)>0) { cnts=0,cntt=0; for(int i=0; i