anyone interested to discuss about the last question in ACM this year? (more...)
这样可以么?
for each node v
perform a maximal flow between v and 0 to obtain the minimal cut (=mc);
set the key of v to mc and insert it into a Fibonacci heap h;
end
while(true)
v = h.extract_min(); (based on the key)
remove v and all edges incident on v;
if(node 1 is disconnected from node 0)
return v.key;
end
end
perform a maximal flow between v and 0 to obtain the minimal cut (=mc);
set the key of v to mc and insert it into a Fibonacci heap h;
end
while(true)
v = h.extract_min(); (based on the key)
remove v and all edges incident on v;
if(node 1 is disconnected from node 0)
return v.key;
end
end