35 lines
557 B
C#
35 lines
557 B
C#
using System.Text;
|
|
|
|
using AdventOfCodeLibrary._2022;
|
|
using AdventOfCodeLibrary.Shared;
|
|
|
|
string _demoData = @"$ cd /
|
|
$ ls
|
|
dir a
|
|
14848514 b.txt
|
|
8504156 c.dat
|
|
dir d
|
|
$ cd a
|
|
$ ls
|
|
dir e
|
|
29116 f
|
|
2557 g
|
|
62596 h.lst
|
|
$ cd e
|
|
$ ls
|
|
584 i
|
|
$ cd ..
|
|
$ cd ..
|
|
$ cd d
|
|
$ ls
|
|
4060174 j
|
|
8033020 d.log
|
|
5626152 d.ext
|
|
7214296 k";
|
|
|
|
Answerable answerable = new Day07Part2();
|
|
byte[] dataArray = File.ReadAllBytes(answerable.DefaultInputFile);
|
|
//dataArray = Encoding.UTF8.GetBytes(_demoData);
|
|
|
|
Console.WriteLine($"Max value: {answerable.GetAnswer(dataArray)}");
|
|
Console.ReadKey(true); |