p2p1 complete
This commit is contained in:
parent
a5ce4e5803
commit
d1d69d08ad
2 changed files with 1 additions and 3 deletions
BIN
2/puzzle2
BIN
2/puzzle2
Binary file not shown.
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue