summaryrefslogtreecommitdiff
path: root/Advent-of-Code-2021/AOC-5
diff options
context:
space:
mode:
Diffstat (limited to 'Advent-of-Code-2021/AOC-5')
-rw-r--r--Advent-of-Code-2021/AOC-5/main.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/Advent-of-Code-2021/AOC-5/main.c b/Advent-of-Code-2021/AOC-5/main.c
index ea39e06..d83ec06 100644
--- a/Advent-of-Code-2021/AOC-5/main.c
+++ b/Advent-of-Code-2021/AOC-5/main.c
@@ -97,42 +97,16 @@ void print_board()
}
}
-void part_1()
+int main(void)
{
parse();
int count = 0;
for(int i = 0; i < HEIGHT; i++)
for(int j = 0; j < WIDTH; j++)
- if(board[j][i] >= 2) count++;
+ if(board[j][i] >= 2) count += 1;
printf("Count is %d\n", count);
-}
-
-void part_2()
-{
- parse();
-
- int count = 0;
- for(int i = 0; i < HEIGHT; i++)
- for(int j = 0; j < WIDTH; j++)
- if(board[j][i] >= 2) count++;
-
- // print_board();
-
- printf("Count is %d\n", count);
-}
-
-int main(void)
-{
-
-#ifdef PART_1
- part_1();
-#endif
-
-#ifdef PART_2
- part_2();
-#endif
return 0;
}