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/08/8a.c | |
| parent | 6a480c4eb9c96c82a8fd3663f0fbee4d32e56f19 (diff) | |
| download | aoc-94d0033ed89bb5bfb6500051296892fb7cea6c29.tar.gz aoc-94d0033ed89bb5bfb6500051296892fb7cea6c29.zip | |
Small cleanup
Diffstat (limited to '2023/08/8a.c')
| -rw-r--r-- | 2023/08/8a.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/2023/08/8a.c b/2023/08/8a.c index 62f6fcd..f6d58b5 100644 --- a/2023/08/8a.c +++ b/2023/08/8a.c | |||
| @@ -1,17 +1,13 @@ | |||
| 1 | #include <inttypes.h> | ||
| 2 | #include <math.h> | ||
| 3 | #include <stdbool.h> | ||
| 4 | #include <stdio.h> | 1 | #include <stdio.h> |
| 5 | #include <stdlib.h> | ||
| 6 | #include <string.h> | 2 | #include <string.h> |
| 7 | 3 | ||
| 8 | #define N 30000 | 4 | #define N 30000 |
| 9 | 5 | #define ISNUM(c) (c >= '0' && c <= '9') | |
| 10 | bool isnum(char c) { return c >= '0' && c <= '9'; } | ||
| 11 | int index(char *c) { return c[0]-'A' + (c[1]-'A' + (c[2]-'A')*26)*26; } | ||
| 12 | 6 | ||
| 13 | int map[N][2]; | 7 | int map[N][2]; |
| 14 | 8 | ||
| 9 | int index(char *c) { return c[0]-'A' + (c[1]-'A' + (c[2]-'A')*26)*26; } | ||
| 10 | |||
| 15 | int main() { | 11 | int main() { |
| 16 | char *buf, dir[N], line[N]; | 12 | char *buf, dir[N], line[N]; |
| 17 | int n, i, s; | 13 | int n, i, s; |
