From 4e9132b983c771d3e70d5a6b8bcdfdb1fead81fa Mon Sep 17 00:00:00 2001 From: kartofen Date: Mon, 1 Aug 2022 23:44:04 +0300 Subject: some more --- Advent-of-Code-2021/AOC-5/main.c | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) (limited to 'Advent-of-Code-2021/AOC-5') 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; } -- cgit v1.2.3