diff --git a/2/input.txt b/2/input.txt index b5fb48c..a74ca87 100644 --- a/2/input.txt +++ b/2/input.txt @@ -1,3 +1,5 @@ +64 63 64 66 66 +51 49 50 53 59 86 87 88 90 92 93 93 90 3 5 8 8 10 14 20 23 25 25 25 @@ -25,9 +27,7 @@ 13 16 17 24 26 28 34 16 14 17 20 21 23 26 28 30 28 30 32 34 36 33 -64 63 64 66 66 27 25 27 29 31 34 38 -51 49 50 53 59 20 18 19 22 20 22 25 28 25 23 24 26 28 25 22 11 10 11 8 9 10 10 diff --git a/2/puzzle2p2.cpp b/2/puzzle2p2.cpp index 68e3208..1568633 100644 --- a/2/puzzle2p2.cpp +++ b/2/puzzle2p2.cpp @@ -76,13 +76,19 @@ int main(){ dir = DOWN; } + if(dir==UP&&changeFromPrevLevel.front()<0){ + currentLevels.erase(currentLevels.begin()); + levelGoDown.pop_front(); + listDirty=true; + } + if (dir==UP&&levelGoDown.size()>1){ //if the overall direction goes up and more then 1 level go down the list is bad currentLevels.clear(); } else if (dir==DOWN&&levelGoesUp.size()>1){ //same as above but opiosite dirrection currentLevels.clear(); } - if (levelStaysSame.size()>1){ //cant have more then 1 number the same or the list is bad + if (levelStaysSame.size()>1||(listDirty&&levelStaysSame.size()==0)){ //cant have more then 1 number the same or the list is bad currentLevels.clear(); } diff --git a/2/puzzle2p2.exe b/2/puzzle2p2.exe index 0ade387..82769a5 100644 Binary files a/2/puzzle2p2.exe and b/2/puzzle2p2.exe differ diff --git a/2/puzzle2p2.ilk b/2/puzzle2p2.ilk index 19a13ac..3673b97 100644 Binary files a/2/puzzle2p2.ilk and b/2/puzzle2p2.ilk differ diff --git a/2/puzzle2p2.obj b/2/puzzle2p2.obj index 925fb65..874948a 100644 Binary files a/2/puzzle2p2.obj and b/2/puzzle2p2.obj differ diff --git a/2/puzzle2p2.pdb b/2/puzzle2p2.pdb index 5609a63..d0bf326 100644 Binary files a/2/puzzle2p2.pdb and b/2/puzzle2p2.pdb differ diff --git a/2/vc140.pdb b/2/vc140.pdb index ef02d81..4daf61a 100644 Binary files a/2/vc140.pdb and b/2/vc140.pdb differ