Day03: Add part 2 statement and remove unnecessary initialization
This commit is contained in:
@@ -51,6 +51,14 @@ namespace AdventOfCode2018
|
||||
|
||||
If the Elves all proceed with their own plans, none of them will have enough fabric. How many square inches of fabric are within two or more claims?
|
||||
|
||||
--- Part Two ---
|
||||
|
||||
Amidst the chaos, you notice that exactly one claim doesn't overlap by even a single square inch of fabric with any other claim. If you can somehow draw attention to it, maybe the Elves will be able to make Santa's suit after all!
|
||||
|
||||
For example, in the claims above, only claim 3 is intact after all claims are made.
|
||||
|
||||
What is the ID of the only claim that doesn't overlap?
|
||||
|
||||
*/
|
||||
|
||||
public class Day03
|
||||
@@ -62,14 +70,6 @@ namespace AdventOfCode2018
|
||||
const int edgeSize = 1000;
|
||||
int[,] cells = new int[edgeSize, edgeSize];
|
||||
|
||||
for (int j = 0; j < edgeSize; j++)
|
||||
{
|
||||
for (int i = 0; i < edgeSize; i++)
|
||||
{
|
||||
cells[i, j] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Claim claim in claims)
|
||||
{
|
||||
for (int j = 0; j < claim.Height; j++)
|
||||
|
||||
Reference in New Issue
Block a user