#include #include #include #include #include #include namespace aocpp { auto Startup(int argc, char ** argv) -> std::istream& { static std::ifstream fin; switch (argc) { case 2: fin = std::ifstream{argv[1]}; return fin; case 1: return std::cin; default: std::cerr << "bad arguments\n"; exit(EXIT_FAILURE); } } }