diff --git a/2/puzzle2 b/2/puzzle2 index 168e002..3685633 100755 Binary files a/2/puzzle2 and b/2/puzzle2 differ diff --git a/2/puzzle2.cpp b/2/puzzle2.cpp index ff29cb5..be872a4 100644 --- a/2/puzzle2.cpp +++ b/2/puzzle2.cpp @@ -19,10 +19,8 @@ int main(){ stringstream wholeDoc; ifstream puzzle("input.txt", ifstream::in); - wholeDoc << puzzle.rdbuf(); while (getline(puzzle, line)) { - cout << line<<"\n"; istringstream lineStream(line); string numberString; list currentLevels; @@ -44,7 +42,7 @@ int main(){ } else if (prevlevel > currentLevels.front()){ dir = UP; } else { - break; + currentLevels.clear(); }