P2936 [USACO09JAN] Total Flow S

Description

Farmer John always wants his cows to have enough water and thus has made a map of the N (1

Input Format

\* Line 1: A single integer: N \* Lines 2..N + 1: Line i+1 describes pipe i with two letters and an integer, all space-separated: a\_i, b\_i, and F\_i

Output Format

\* Line 1: A single integer that the maximum flow from the well ('A') to the barn ('Z')