diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-12-25 17:56:34 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-12-25 17:56:34 +0100 |
| commit | 94d0033ed89bb5bfb6500051296892fb7cea6c29 (patch) | |
| tree | 245eac2218310c958c2df2fad5109ea4f7b2a9d9 /2023/22 | |
| parent | 6a480c4eb9c96c82a8fd3663f0fbee4d32e56f19 (diff) | |
| download | aoc-94d0033ed89bb5bfb6500051296892fb7cea6c29.tar.gz aoc-94d0033ed89bb5bfb6500051296892fb7cea6c29.zip | |
Small cleanup
Diffstat (limited to '2023/22')
| -rw-r--r-- | 2023/22/22a.c | 3 | ||||
| -rw-r--r-- | 2023/22/22b.c | 5 |
2 files changed, 1 insertions, 7 deletions
diff --git a/2023/22/22a.c b/2023/22/22a.c index a70a181..c2ca307 100644 --- a/2023/22/22a.c +++ b/2023/22/22a.c | |||
| @@ -1,12 +1,9 @@ | |||
| 1 | #include <inttypes.h> | ||
| 2 | #include <stdbool.h> | 1 | #include <stdbool.h> |
| 3 | #include <stdio.h> | 2 | #include <stdio.h> |
| 4 | #include <stdlib.h> | 3 | #include <stdlib.h> |
| 5 | #include <string.h> | ||
| 6 | 4 | ||
| 7 | #define N 1500 | 5 | #define N 1500 |
| 8 | #define M 340 | 6 | #define M 340 |
| 9 | #define MAX(x,y) ((x)>(y)?(x):(y)) | ||
| 10 | 7 | ||
| 11 | #define isnum(c) (c == '-' || (c >= '0' && c <= '9')) | 8 | #define isnum(c) (c == '-' || (c >= '0' && c <= '9')) |
| 12 | 9 | ||
diff --git a/2023/22/22b.c b/2023/22/22b.c index bbafdfa..7941554 100644 --- a/2023/22/22b.c +++ b/2023/22/22b.c | |||
| @@ -1,12 +1,9 @@ | |||
| 1 | #include <inttypes.h> | ||
| 2 | #include <stdbool.h> | 1 | #include <stdbool.h> |
| 3 | #include <stdio.h> | 2 | #include <stdio.h> |
| 4 | #include <stdlib.h> | 3 | #include <stdlib.h> |
| 5 | #include <string.h> | ||
| 6 | 4 | ||
| 7 | #define N 1500 | 5 | #define N 1500 |
| 8 | #define M 340 | 6 | #define M 340 |
| 9 | #define MAX(x,y) ((x)>(y)?(x):(y)) | ||
| 10 | 7 | ||
| 11 | #define isnum(c) (c == '-' || (c >= '0' && c <= '9')) | 8 | #define isnum(c) (c == '-' || (c >= '0' && c <= '9')) |
| 12 | 9 | ||
| @@ -78,7 +75,7 @@ int main() { | |||
| 78 | drop(j); | 75 | drop(j); |
| 79 | 76 | ||
| 80 | for (int i = 0; i < n; i++) | 77 | for (int i = 0; i < n; i++) |
| 81 | x += homanyfall(i); | 78 | x += howmanyfall(i); |
| 82 | 79 | ||
| 83 | printf("%d\n", x); | 80 | printf("%d\n", x); |
| 84 | return 0; | 81 | return 0; |
