aboutsummaryrefslogtreecommitdiff
path: root/2023/16/16a.c
diff options
context:
space:
mode:
Diffstat (limited to '2023/16/16a.c')
-rw-r--r--2023/16/16a.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/2023/16/16a.c b/2023/16/16a.c
index 0f95553..79aba38 100644
--- a/2023/16/16a.c
+++ b/2023/16/16a.c
@@ -1,7 +1,4 @@
1#include <stdbool.h>
2#include <stdio.h> 1#include <stdio.h>
3#include <stdlib.h>
4#include <string.h>
5 2
6#define M 200 3#define M 200
7 4
@@ -25,7 +22,7 @@ void walk(int i, int j, int d) {
25 if (!entered[i][j]) s++; 22 if (!entered[i][j]) s++;
26 entered[i][j] |= d; 23 entered[i][j] |= d;
27 for (int k = 1; k <= 8; k <<= 1) 24 for (int k = 1; k <= 8; k <<= 1)
28 if (k & turn[d][map[i][j]]) 25 if (k & turn[d][(int)map[i][j]])
29 walk(i+go[k][0], j+go[k][1], k); 26 walk(i+go[k][0], j+go[k][1], k);
30} 27}
31 28

Generated with cgit - Back to sebastiano.tronto.net