Compare commits

..

No commits in common. "0359bacf477d61ce6ee9b6a059c09ccd4d99ac5d" and "4a5eeb8cf0ffe323d4c2709293e289265d7e3928" have entirely different histories.

2 changed files with 1 additions and 13 deletions

View File

@ -10,12 +10,6 @@ public record Coordinate(long X, long Y)
public static Coordinate operator +(Coordinate left, Coordinate right) =>
new(left.X + right.X, left.Y + right.Y);
public static Coordinate operator -(Coordinate left, Coordinate right) =>
new(left.X - right.X, left.Y - right.Y);
public static Coordinate operator *(Coordinate coord, int amount) =>
new(coord.X * amount, coord.Y * amount);
}
public record Coordinate3d(long X, long Y, long Z)
@ -28,10 +22,4 @@ public record Coordinate3d(long X, long Y, long Z)
public static Coordinate3d operator +(Coordinate3d left, Coordinate3d right) =>
new(left.X + right.X, left.Y + right.Y, left.Z + right.Z);
public static Coordinate3d operator -(Coordinate3d left, Coordinate3d right) =>
new(left.X - right.X, left.Y - right.Y, left.Z - right.Z);
public static Coordinate3d operator *(Coordinate3d coord, int amount) =>
new(coord.X * amount, coord.Y * amount, coord.Z * amount);
}

View File

@ -33,7 +33,7 @@ public class Day12 : IPuzzleSolver<long>
private int GetMinTotalPresentArea(int[] presentCounts, int[] presentSizes)
{
return presentCounts
.Zip(presentSizes, (count, size) => count * size)
.Select((presentCount, index) => presentCount * presentSizes[index])
.Sum();
}