diff options
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; |
