diff --git a/2024/5/main-1.cpp b/2024/5/main-1.cpp index c7f21c3..7742fdb 100644 --- a/2024/5/main-1.cpp +++ b/2024/5/main-1.cpp @@ -14,10 +14,6 @@ int main() { l >> a; l.ignore(); l >> b; - if (!order.contains(a)) { - set x; - order[a] = x; - } order[a].insert(b); } diff --git a/2024/5/main-2.cpp b/2024/5/main-2.cpp index 92a47d8..3551aa2 100644 --- a/2024/5/main-2.cpp +++ b/2024/5/main-2.cpp @@ -30,10 +30,6 @@ int main() { l >> a; l.ignore(); l >> b; - if (!order.contains(a)) { - set x; - order[a] = x; - } order[a].insert(b); } diff --git a/2024/6/main-1.cpp b/2024/6/main-1.cpp index 5797b97..b89ae46 100644 --- a/2024/6/main-1.cpp +++ b/2024/6/main-1.cpp @@ -8,7 +8,6 @@ int main() { string line; vector lines; while (getline(cin, line) && !line.empty()) { - istringstream l(line); lines.push_back(line); } diff --git a/2024/6/main-2.cpp b/2024/6/main-2.cpp index 0c58983..ef2d53f 100644 --- a/2024/6/main-2.cpp +++ b/2024/6/main-2.cpp @@ -8,7 +8,6 @@ int main() { string line; vector lines; while (getline(cin, line) && !line.empty()) { - istringstream l(line); lines.push_back(line); } @@ -39,10 +38,7 @@ posend:; pos.first -= dir.first; pos.second -= dir.second; int d = dir.first * 2 + dir.second; - if (!track.contains(pos)) { - set s; - track[pos] = s; - } else if (track[pos].contains(d)) { + if (track[pos].contains(d)) { count++; goto next; }