2024: C++ cleanup

This commit is contained in:
eriedaberrie 2024-12-07 21:59:13 -08:00
parent ce3dc4f81a
commit 8ef4c66148
4 changed files with 1 additions and 14 deletions

View file

@ -14,10 +14,6 @@ int main() {
l >> a; l >> a;
l.ignore(); l.ignore();
l >> b; l >> b;
if (!order.contains(a)) {
set<int> x;
order[a] = x;
}
order[a].insert(b); order[a].insert(b);
} }

View file

@ -30,10 +30,6 @@ int main() {
l >> a; l >> a;
l.ignore(); l.ignore();
l >> b; l >> b;
if (!order.contains(a)) {
set<int> x;
order[a] = x;
}
order[a].insert(b); order[a].insert(b);
} }

View file

@ -8,7 +8,6 @@ int main() {
string line; string line;
vector<string> lines; vector<string> lines;
while (getline(cin, line) && !line.empty()) { while (getline(cin, line) && !line.empty()) {
istringstream l(line);
lines.push_back(line); lines.push_back(line);
} }

View file

@ -8,7 +8,6 @@ int main() {
string line; string line;
vector<string> lines; vector<string> lines;
while (getline(cin, line) && !line.empty()) { while (getline(cin, line) && !line.empty()) {
istringstream l(line);
lines.push_back(line); lines.push_back(line);
} }
@ -39,10 +38,7 @@ posend:;
pos.first -= dir.first; pos.first -= dir.first;
pos.second -= dir.second; pos.second -= dir.second;
int d = dir.first * 2 + dir.second; int d = dir.first * 2 + dir.second;
if (!track.contains(pos)) { if (track[pos].contains(d)) {
set<int> s;
track[pos] = s;
} else if (track[pos].contains(d)) {
count++; count++;
goto next; goto next;
} }