Flow Optimality
457E3000· legendary gm2s256 MB⌨ stdin/stdout
Examples
Sample 1of 4
Input
4 51 2 1 21 3 4 12 3 2 12 4 4 13 4 1 2
Output
6
Sample 2of 4
Input
5 52 3 1 13 4 1 14 2 1 11 5 1 11 5 100 100
Output
BAD 3
Sample 3of 4
Input
6 41 3 31 411 5 59 262 6 53 584 6 97 93
Output
UNKNOWN
Sample 4of 4
Input
7 51 7 2 12 3 1 14 5 1 06 1 10 01 3 1 1
Output
BAD 4
58%
457E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…