diff options
| author | kartofen <mladenovnasko0@gmail.com> | 2022-08-01 23:44:04 +0300 | 
|---|---|---|
| committer | kartofen <mladenovnasko0@gmail.com> | 2022-08-01 23:44:04 +0300 | 
| commit | 4e9132b983c771d3e70d5a6b8bcdfdb1fead81fa (patch) | |
| tree | 9f5e195a6c8600f065a057004670c00cfa5abee1 /Advent-of-Code-2021/AOC-5 | |
| parent | 1d96c68c66ba5648d1dd4d8ff2976fc97eea8a14 (diff) | |
some more
Diffstat (limited to 'Advent-of-Code-2021/AOC-5')
| -rw-r--r-- | Advent-of-Code-2021/AOC-5/main.c | 30 | 
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;  } | 
