CT071

Captain Kunal and the Tikki Tunnel Network

HardL8 · Quantum CoderAcceptance: 0.0%XP: 250

Captain Kunal wants to send the greatest number of supply crates from source 1 to destination n through capacity-limited tunnels. Input: n m; m directed edges u v capacity. Output maximum flow from 1 to n.

Example 1:

Input: 4 5 1 2 3 1 3 2 2 3 1 2 4 2 3 4 4
Output: 5

Example 2:

Input: 2 1 1 2 7
Output: 7

Example 3:

Input: 3 1 1 2 5
Output: 0

Constraints:

2≤n≤200; 1≤m≤20000; capacities≤10^9.

Tags:

graphs max-flow dinic
Loading...
Test Cases:No test cases
No test cases available.
Captain Kunal and the Tikki Tunnel Network - HARD Coding Problem | CodeTikki