p2p1 complete
This commit is contained in:
@@ -19,10 +19,8 @@ int main(){
|
|||||||
stringstream wholeDoc;
|
stringstream wholeDoc;
|
||||||
|
|
||||||
ifstream puzzle("input.txt", ifstream::in);
|
ifstream puzzle("input.txt", ifstream::in);
|
||||||
wholeDoc << puzzle.rdbuf();
|
|
||||||
|
|
||||||
while (getline(puzzle, line)) {
|
while (getline(puzzle, line)) {
|
||||||
cout << line<<"\n";
|
|
||||||
istringstream lineStream(line);
|
istringstream lineStream(line);
|
||||||
string numberString;
|
string numberString;
|
||||||
list<int> currentLevels;
|
list<int> currentLevels;
|
||||||
@@ -44,7 +42,7 @@ int main(){
|
|||||||
} else if (prevlevel > currentLevels.front()){
|
} else if (prevlevel > currentLevels.front()){
|
||||||
dir = UP;
|
dir = UP;
|
||||||
} else {
|
} else {
|
||||||
break;
|
currentLevels.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user