public void Distance_Example3() { var path1 = Path.Parse("R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51"); var path2 = Path.Parse("U98,R91,D20,R16,D67,R40,U7,R15,U6,R7"); var minx = Walk.MinX(path1, path2); Assert.Equal(135, minx); }
public void Distance_Example2() { var path1 = Path.Parse("R75,D30,R83,U83,L12,D49,R71,U7,L72"); var path2 = Path.Parse("U62,R66,U55,R34,D71,R55,D58,R83"); var minx = Walk.MinX(path1, path2); Assert.Equal(159, minx); }
static void Main(string[] args) { var minx = Walk.MinX(Input.Paths[0], Input.Paths[1]); Console.WriteLine($"Min distance: {minx}"); }