mirror of
https://github.com/szymon-jozef/advent_of_code_2025.git
synced 2026-09-07 12:10:41 +02:00
some more minor adjustments
This commit is contained in:
@@ -52,7 +52,7 @@ vector<vector<string>> process_input(const vector<string> &input) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (new_column != "") {
|
if (new_column != "") {
|
||||||
group.push_back(new_column);
|
group.push_back(std::move(new_column));
|
||||||
new_column.clear();
|
new_column.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ long long process_operation(vector<string> &input) {
|
|||||||
case '+':
|
case '+':
|
||||||
sum = 0;
|
sum = 0;
|
||||||
cout << "Now we are adding numbers: ";
|
cout << "Now we are adding numbers: ";
|
||||||
for (string value : input) {
|
for (const string &value : input) {
|
||||||
cout << value << " ";
|
cout << value << " ";
|
||||||
sum += stoll(value);
|
sum += stoll(value);
|
||||||
}
|
}
|
||||||
@@ -83,7 +83,7 @@ long long process_operation(vector<string> &input) {
|
|||||||
case '*':
|
case '*':
|
||||||
sum = 1;
|
sum = 1;
|
||||||
cout << "Now we are multiplying numbers: ";
|
cout << "Now we are multiplying numbers: ";
|
||||||
for (string value : input) {
|
for (const string &value : input) {
|
||||||
cout << value << " ";
|
cout << value << " ";
|
||||||
sum *= stoll(value);
|
sum *= stoll(value);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user