From f6e658150fa5aad528fb357ff23f273828c41c25 Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Fri, 16 Dec 2022 19:34:03 +0000 Subject: [PATCH] Finish walkthrough Co-authored-by: sigonasr2 --- main.cpp | 89 +++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 66 insertions(+), 23 deletions(-) diff --git a/main.cpp b/main.cpp index e4541fd..744599e 100644 --- a/main.cpp +++ b/main.cpp @@ -5,28 +5,6 @@ #include #include -void printArr(std::vector a, int n){ - for (int i=0;i a,int size, int n){ - if (size==1){ - printArr(a,n); - return; - } - for (int i=0;iconnections; std::mappaths; @@ -51,6 +29,71 @@ int maxFlow=0; int iterations=0; int branchesRemaining=0; +void printArr(std::vector a, int n){ + int minutesRemaining1=26; + int minutesRemaining2=26; + std::string currentPos="AA"; + std::string currentPos2="AA"; + std::vector movePlan1; + std::vector movePlan2; + int moveAmt1=0; //How many steps left to move. + int moveAmt2=0; //How many steps left to move. + int currentMarker1=0; + int currentMarker2=0; + int flowRate=0; + int flowTotal=0; + + for (int i=0;imaxFlow){ + maxFlow=flowTotal; + std::cout<<"New max flow is "< a,int size, int n){ + if (size==1){ + printArr(a,n); + return; + } + for (int i=0;ivisited,int dist){ visited[start]=true; int distance=INFINITY; @@ -157,7 +200,7 @@ int main() } permutation(targetRooms,targetRooms.size(),targetRooms.size()); - + return 0;