Get your own website
Python
C
Java
 
Python result:
C result:
Java result:
Path: s -> v1 -> v3 -> v4 -> t , Flow: 3
Path: s -> v2 -> v1 -> v4 -> v3 -> t , Flow: 2
Path: s -> v2 -> v1 -> v4 -> t , Flow: 2
Path: s -> v2 -> v4 -> t , Flow: 1
The maximum possible flow is 8
Path: v1 -> v3 -> v4 -> t, Flow: 3
Path: v2 -> v1 -> v4 -> v3 -> t, Flow: 2
Path: v2 -> v1 -> v4 -> t, Flow: 2
Path: v2 -> v4 -> t, Flow: 1
The maximum possible flow is 8
Path: s -> v1 -> v3 -> v4 -> t, Flow: 3
Path: s -> v2 -> v1 -> v4 -> v3 -> t, Flow: 2
Path: s -> v2 -> v1 -> v4 -> t, Flow: 2
Path: s -> v2 -> v4 -> t, Flow: 1
The maximum possible flow is 8