Created
November 8, 2014 21:16
DailyProgrammer challenge 187 - Log Runner - OUTPUT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*********************************** | |
Sending 16 logs down the river | |
*********************************** | |
Total single-pair paths from A to I for 13 edges: 7 | |
Updated path capacities: {A->B, 6} {B->E, 3} {E->I, 2} | |
Log No. 1 a-floatin' down path A -> B -> E -> I --> path of 4 | |
Log No. 2 a-floatin' down path A -> B -> E -> I --> path of 4 | |
14 logs remaining | |
Updated path capacities: {A->C, 2} {C->G, 5} {G->I, 2} | |
Log No. 3 a-floatin' down path A -> C -> G -> I --> path of 4 | |
Log No. 4 a-floatin' down path A -> C -> G -> I --> path of 4 | |
12 logs remaining | |
Updated path capacities: {A->B, 4} {B->E, 1} {E->H, 1} {H->I, 4} | |
Log No. 5 a-floatin' down path A -> B -> E -> H -> I --> path of 5 | |
11 logs remaining | |
Updated path capacities: {A->B, 3} {B->D, 3} {D->F, 1} {F->H, 1} {H->I, 3} | |
Log No. 6 a-floatin' down path A -> B -> D -> F -> H -> I --> path of 6 | |
10 logs remaining | |
Updated path capacities: {A->B, 2} {B->D, 2} {D->C, 2} {C->G, 3} {G->H, 2} {H->I, 2} | |
Log No. 7 a-floatin' down path A -> B -> D -> C -> G -> H -> I --> path of 7 | |
Log No. 8 a-floatin' down path A -> B -> D -> C -> G -> H -> I --> path of 7 | |
8 logs remaining | |
River is over capacity! | |
8 logs transported successfully | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*********************************** | |
Sending 7 logs down the river | |
*********************************** | |
Total single-pair paths from A to I for 13 edges: 7 | |
Updated path capacities: {A->B, 6} {B->E, 3} {E->I, 2} | |
Log No. 1 a-floatin' down path A -> B -> E -> I --> path of 4 | |
Log No. 2 a-floatin' down path A -> B -> E -> I --> path of 4 | |
5 logs remaining | |
Updated path capacities: {A->C, 2} {C->G, 5} {G->I, 2} | |
Log No. 3 a-floatin' down path A -> C -> G -> I --> path of 4 | |
Log No. 4 a-floatin' down path A -> C -> G -> I --> path of 4 | |
3 logs remaining | |
Updated path capacities: {A->B, 4} {B->E, 1} {E->H, 1} {H->I, 4} | |
Log No. 5 a-floatin' down path A -> B -> E -> H -> I --> path of 5 | |
2 logs remaining | |
Updated path capacities: {A->B, 3} {B->D, 3} {D->F, 1} {F->H, 1} {H->I, 3} | |
Log No. 6 a-floatin' down path A -> B -> D -> F -> H -> I --> path of 6 | |
1 logs remaining | |
Updated path capacities: {A->B, 2} {B->D, 2} {D->C, 2} {C->G, 3} {G->H, 2} {H->I, 2} | |
Log No. 7 a-floatin' down path A -> B -> D -> C -> G -> H -> I --> path of 7 | |
0 logs remaining | |
7 logs transported successfully |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment