Skip to content

Commit 0f9c8d1

Browse files
committed
Add challenge case for #87
1 parent 819a1fd commit 0f9c8d1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/maxflow.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,4 +320,15 @@ mod test {
320320

321321
assert_eq!(graph.flow(s, t), 2);
322322
}
323+
324+
#[test]
325+
fn test_dont_repeat_same_phase() {
326+
let n = 100_000;
327+
let mut graph = MfGraph::new(3);
328+
graph.add_edge(0, 1, n);
329+
for _ in 0..n {
330+
graph.add_edge(1, 2, 1);
331+
}
332+
assert_eq!(graph.flow(0, 2), n);
333+
}
323334
}

0 commit comments

Comments
 (0)