}
--counts[dist[i]];
dist[i]=minlable+1;
++counts[dist[i]];
if(i!=s)
{
--path_n;
i=path[path_n]->a;
}
else if(dist[i]>n)
{
return ret;
}
}
}
return ret;
}
int main()
{
int maxroute,endr;
while(cin>>maxroute>>endr)
{
init(endr);
int st,ed,p;
for(int i=0;i
cin>>st>>ed>>p;
addedge(st,ed,p);
}
int res=maxflow(endr,1,endr);
cout<
}
return 0;
}