Help with Max Flow Problem

Revision en1, by ZeyadKhattab, 2018-10-07 14:15:01

Can someone help me solve this problem ? 101755D - Transfer Window My approach was to build a graph with the players as the nodes and there is an edge between player a and player b if I can exchange a with b then I created 2 nodes; Source and Sink. Then I added edges from from the Source to players I have and edges from players I want to the Sink, and applied max flow on this graph. All edges have capacity one. But then, I cannot construct the solution. My code (which gets WA at test 8) https://ideone.com/U4EjyO

Tags maxflow

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ZeyadKhattab 2018-10-07 14:15:01 541 Initial revision (published)