Filled in days with class instance -> awaiting solutions for relevant days
This commit is contained in:
parent
60f49c2705
commit
46bc190de5
@ -151,6 +151,7 @@
|
|||||||
<ClCompile Include="src\days\day22.cpp" />
|
<ClCompile Include="src\days\day22.cpp" />
|
||||||
<ClCompile Include="src\days\day23.cpp" />
|
<ClCompile Include="src\days\day23.cpp" />
|
||||||
<ClCompile Include="src\days\day24.cpp" />
|
<ClCompile Include="src\days\day24.cpp" />
|
||||||
|
<ClCompile Include="src\days\day25.cpp" />
|
||||||
<ClCompile Include="src\days\Source.cpp" />
|
<ClCompile Include="src\days\Source.cpp" />
|
||||||
<ClCompile Include="src\main.cpp" />
|
<ClCompile Include="src\main.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -93,6 +93,9 @@
|
|||||||
<ClCompile Include="src\days\day24.cpp">
|
<ClCompile Include="src\days\day24.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\days\day25.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="src\aoc2022.h">
|
<ClInclude Include="src\aoc2022.h">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "../aoc2022.h"
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
template <typename Output>
|
template <typename Output>
|
||||||
struct SDay01 : public SDay<Output> {
|
struct SDay0 : public SDay<Output> {
|
||||||
//Class constructor
|
//Class constructor
|
||||||
using SDay<Output>::SDay;
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay01 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay02 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay03 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay04 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay05 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay06 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay07 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay08 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay09 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay10 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay11 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay12 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay13 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay14 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay15 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay16 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay17 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay18 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay19 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay20 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay21 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay22 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay23 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay24 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "../aoc2022.h"
|
||||||
|
|
||||||
|
template <typename Output>
|
||||||
|
struct SDay25 : public SDay<Output> {
|
||||||
|
//Class constructor
|
||||||
|
using SDay<Output>::SDay;
|
||||||
|
|
||||||
|
//Solutions to both days
|
||||||
|
Output part1() const override final { return Output(); }
|
||||||
|
Output part2() const override final { return Output(); }
|
||||||
|
};
|
@ -4,9 +4,11 @@
|
|||||||
|
|
||||||
void createDays() {
|
void createDays() {
|
||||||
std::string fileName;
|
std::string fileName;
|
||||||
|
std::string line;
|
||||||
std::ofstream file;
|
std::ofstream file;
|
||||||
for (int i = 1; i <= 25; i++)
|
for (int i = 1; i <= 25; i++)
|
||||||
{
|
{
|
||||||
|
std::ifstream source{ "src/days/Source.cpp" };
|
||||||
if (i < 10)
|
if (i < 10)
|
||||||
{
|
{
|
||||||
file.open("src/days/day0" + std::to_string(i) + ".cpp");
|
file.open("src/days/day0" + std::to_string(i) + ".cpp");
|
||||||
@ -15,11 +17,15 @@ void createDays() {
|
|||||||
{
|
{
|
||||||
file.open("src/days/day" + std::to_string(i) + ".cpp");
|
file.open("src/days/day" + std::to_string(i) + ".cpp");
|
||||||
}
|
}
|
||||||
|
while (std::getline(source, line))
|
||||||
|
{
|
||||||
|
file << line << "\n";
|
||||||
|
}
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
SDay01<int> day1("day01");
|
//SDay01<int> day1("day01");
|
||||||
createDays();
|
createDays();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user