Program.cs 501 B

12345678910111213141516171819202122232425
  1. using System.Diagnostics;
  2. using Day14;
  3. if (args.Any(a => a == "--debug"))
  4. {
  5. Console.WriteLine("DEBUG");
  6. Console.WriteLine(Debugger.Launch());
  7. }
  8. if (args.Length < 1)
  9. {
  10. Console.WriteLine("Requires 1 args: inputFileName");
  11. return -1;
  12. }
  13. var inputFile = args[0];
  14. var parser = new Parser();
  15. var boulderMap = parser.Parse(inputFile);
  16. var load = boulderMap.CalculateMaxNorthLoad();
  17. Console.WriteLine();
  18. Console.WriteLine($"Max North Load: {load}");
  19. return 0;