Skip to content

Commit

Permalink
reusing alias
Browse files Browse the repository at this point in the history
  • Loading branch information
K20shores committed Dec 23, 2024
1 parent 3908f60 commit 0f7ce7a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions 2024/src/day22.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <format>
#include <unordered_map>
#include <array>
#include <set>

// Specialization of std::hash for std::array<int, 4>
namespace std
Expand Down Expand Up @@ -65,10 +64,10 @@ int64_t part1(const Data &data)
return sum;
}

using Changes = std::unordered_map<std::array<int, 4>, int>;
using Changes = std::unordered_map<std::array<int, 4>, int64_t>;
int64_t part2(const Data &data)
{
std::unordered_map<std::array<int, 4>, int64_t> global_sums;
Changes global_sums;

for (size_t i = 0; i < data.values.size(); ++i)
{
Expand Down

0 comments on commit 0f7ce7a

Please sign in to comment.