| 12345678910111213141516171819202122232425262728293031 |
- using System.Diagnostics;
- using Day17;
- if (args.Any(a => a == "--debug"))
- {
- Console.WriteLine("DEBUG");
- Console.WriteLine(Debugger.Launch());
- }
- if (args.Length < 1)
- {
- Console.WriteLine("Requires 1 args: inputFileName");
- return -1;
- }
- var inputFile = args[0];
- var parser = new Parser();
- var map = parser.Parse(inputFile);
- var cost = map.ShortestPath();
- map.Print();
- Console.WriteLine($"Cost: {cost}");
- Console.WriteLine();
- map.SetUltraPathMode();
- cost = map.ShortestPath();
- map.Print();
- Console.WriteLine($"Cost: {cost}");
- return 0;
|