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/25 | |
| parent | 6a480c4eb9c96c82a8fd3663f0fbee4d32e56f19 (diff) | |
| download | aoc-94d0033ed89bb5bfb6500051296892fb7cea6c29.tar.gz aoc-94d0033ed89bb5bfb6500051296892fb7cea6c29.zip | |
Small cleanup
Diffstat (limited to '2023/25')
| -rw-r--r-- | 2023/25/25a.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/2023/25/25a.c b/2023/25/25a.c index 7626c74..1f3161c 100644 --- a/2023/25/25a.c +++ b/2023/25/25a.c | |||
| @@ -1,18 +1,11 @@ | |||
| 1 | #include <inttypes.h> | ||
| 2 | #include <stdbool.h> | 1 | #include <stdbool.h> |
| 3 | #include <stdio.h> | 2 | #include <stdio.h> |
| 4 | #include <stdlib.h> | ||
| 5 | #include <string.h> | 3 | #include <string.h> |
| 6 | 4 | ||
| 7 | #define N 1500 | 5 | #define N 1500 |
| 8 | #define M 15000 | ||
| 9 | #define MIN(x,y) ((x)<(y)?(x):(y)) | ||
| 10 | #define ischar(c) (c >= 'a' && c <= 'z') | 6 | #define ischar(c) (c >= 'a' && c <= 'z') |
| 11 | 7 | ||
| 12 | typedef struct { | 8 | typedef struct { int nout, out[N]; char s[4], outc[N][4]; } node_t; |
| 13 | int nout, out[N]; | ||
| 14 | char s[4], outc[N][4]; | ||
| 15 | } node_t; | ||
| 16 | 9 | ||
| 17 | bool visited[N]; | 10 | bool visited[N]; |
| 18 | char *buf, line[N][N]; | 11 | char *buf, line[N][N]; |
| @@ -90,6 +83,6 @@ int main() { | |||
| 90 | for (int t = 1; t < n; t++) | 83 | for (int t = 1; t < n; t++) |
| 91 | if (flowatmost(0, t, 3)) nother++; | 84 | if (flowatmost(0, t, 3)) nother++; |
| 92 | 85 | ||
| 93 | printf("%d (%d %d)\n", nother * (n-nother), nother, n-nother); | 86 | printf("%d\n", nother * (n-nother)); |
| 94 | return 0; | 87 | return 0; |
| 95 | } | 88 | } |
