int EK(int s,int t)
{
queue<int> q;
int ans = 0;
while(true)
{
memset(a,0,sizeof(a));
a[s] = INF;
q.push(s);
while(!q.empty())
{
int u = q.front();
q.pop();
for(int v=0;v<=t;v++)
{
if(!a[v] && c[u][v] > f[u][v])
{
a[v] = min(a[u],c[u][v]-f[u][v]);
pre[v] = u;
q.push(v);
}
}
}
if(a[t] == 0)
break;
for(int u=t;u!=s;u=pre[u])
{
f[pre[u]][u] += a[t];
f[u][pre[u]] -= a[t];
}
ans += a[t];
}
return ans;
}