#include #include #include #include #include #include #include #include auto main(int argc, char** argv) -> int { std::string line; std::getline(*aocpp::Startup(argc, argv), line); std::vector lengths1; for (auto && x : aocpp::SplitOn(line, ",")) { lengths1.push_back(std::stoul(x)); } auto result = knothash::hash_ex<256>(1, lengths1.begin(), lengths1.end()); std::cout << "Part 1: " << long{result[0]} * long{result[1]} << std::endl; std::cout << "Part 2: " << knothash::render(knothash::hash(line)) << std::endl; }