aboutsummaryrefslogtreecommitdiff
path: root/2023/16/16b.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-12-25 17:56:34 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2023-12-25 17:56:34 +0100
commit94d0033ed89bb5bfb6500051296892fb7cea6c29 (patch)
tree245eac2218310c958c2df2fad5109ea4f7b2a9d9 /2023/16/16b.c
parent6a480c4eb9c96c82a8fd3663f0fbee4d32e56f19 (diff)
downloadaoc-94d0033ed89bb5bfb6500051296892fb7cea6c29.tar.gz
aoc-94d0033ed89bb5bfb6500051296892fb7cea6c29.zip
Small cleanup
Diffstat (limited to '2023/16/16b.c')
-rw-r--r--2023/16/16b.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/2023/16/16b.c b/2023/16/16b.c
index ce42c31..6247942 100644
--- a/2023/16/16b.c
+++ b/2023/16/16b.c
@@ -1,6 +1,4 @@
1#include <stdbool.h>
2#include <stdio.h> 1#include <stdio.h>
3#include <stdlib.h>
4#include <string.h> 2#include <string.h>
5 3
6#define M 200 4#define M 200
@@ -26,7 +24,7 @@ void walk(int i, int j, int d) {
26 if (!entered[i][j]) s++; 24 if (!entered[i][j]) s++;
27 entered[i][j] |= d; 25 entered[i][j] |= d;
28 for (int k = 1; k <= 8; k <<= 1) 26 for (int k = 1; k <= 8; k <<= 1)
29 if (k & turn[d][map[i][j]]) 27 if (k & turn[d][(int)map[i][j]])
30 walk(i+go[k][0], j+go[k][1], k); 28 walk(i+go[k][0], j+go[k][1], k);
31} 29}
32 30

Generated with cgit - Back to sebastiano.tronto.net