master
Benjamin Kraft 2 years ago
parent 16b77ae41b
commit 0c62846bbd
  1. 3
      src/days/05/Day05.cpp

@ -51,9 +51,12 @@ vector<Stack> Day05::parseStacks(){
for (int i = 0; i < stackCount; i++){
parsed.emplace_back();
int index = 1 + 4 * i;
for (size_t line = endIndex - 2; input[line].size() > index && input[line][index] != ' '; line--){
Crate crate = input[line][index];
parsed[i].push_back(crate);
if (line == 0)
break;
}
}

Loading…
Cancel
Save