37 lines
600 B
C++
37 lines
600 B
C++
#pragma once
|
|
#include <iostream>
|
|
#include <sstream>
|
|
#include <fstream>
|
|
#include <chrono>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <stack>
|
|
#include <queue>
|
|
#include <unordered_map>
|
|
#include <map>
|
|
|
|
template <typename Output>
|
|
struct SDay {
|
|
std::string name;
|
|
std::ifstream input;
|
|
|
|
//Constructor and Destructor
|
|
SDay(std::string name);
|
|
~SDay();
|
|
|
|
virtual Output part1() = 0;
|
|
virtual Output part2() = 0;
|
|
};
|
|
|
|
template <typename Output>
|
|
SDay<Output>::SDay(std::string name) {
|
|
this->name = name;
|
|
input.open("input/" + name);
|
|
}
|
|
|
|
template <typename Output>
|
|
SDay<Output>::~SDay() {
|
|
input.close();
|
|
}
|
|
|