diff options
Diffstat (limited to '2023/22')
| -rw-r--r-- | 2023/22/22a.c | 3 | ||||
| -rw-r--r-- | 2023/22/22b.c | 5 |
2 files changed, 1 insertions, 7 deletions
diff --git a/2023/22/22a.c b/2023/22/22a.c index a70a181..c2ca307 100644 --- a/2023/22/22a.c +++ b/2023/22/22a.c | |||
| @@ -1,12 +1,9 @@ | |||
| 1 | #include <inttypes.h> | ||
| 2 | #include <stdbool.h> | 1 | #include <stdbool.h> |
| 3 | #include <stdio.h> | 2 | #include <stdio.h> |
| 4 | #include <stdlib.h> | 3 | #include <stdlib.h> |
| 5 | #include <string.h> | ||
| 6 | 4 | ||
| 7 | #define N 1500 | 5 | #define N 1500 |
| 8 | #define M 340 | 6 | #define M 340 |
| 9 | #define MAX(x,y) ((x)>(y)?(x):(y)) | ||
| 10 | 7 | ||
| 11 | #define isnum(c) (c == '-' || (c >= '0' && c <= '9')) | 8 | #define isnum(c) (c == '-' || (c >= '0' && c <= '9')) |
| 12 | 9 | ||
diff --git a/2023/22/22b.c b/2023/22/22b.c index bbafdfa..7941554 100644 --- a/2023/22/22b.c +++ b/2023/22/22b.c | |||
| @@ -1,12 +1,9 @@ | |||
| 1 | #include <inttypes.h> | ||
| 2 | #include <stdbool.h> | 1 | #include <stdbool.h> |
| 3 | #include <stdio.h> | 2 | #include <stdio.h> |
| 4 | #include <stdlib.h> | 3 | #include <stdlib.h> |
| 5 | #include <string.h> | ||
| 6 | 4 | ||
| 7 | #define N 1500 | 5 | #define N 1500 |
| 8 | #define M 340 | 6 | #define M 340 |
| 9 | #define MAX(x,y) ((x)>(y)?(x):(y)) | ||
| 10 | 7 | ||
| 11 | #define isnum(c) (c == '-' || (c >= '0' && c <= '9')) | 8 | #define isnum(c) (c == '-' || (c >= '0' && c <= '9')) |
| 12 | 9 | ||
| @@ -78,7 +75,7 @@ int main() { | |||
| 78 | drop(j); | 75 | drop(j); |
| 79 | 76 | ||
| 80 | for (int i = 0; i < n; i++) | 77 | for (int i = 0; i < n; i++) |
| 81 | x += homanyfall(i); | 78 | x += howmanyfall(i); |
| 82 | 79 | ||
| 83 | printf("%d\n", x); | 80 | printf("%d\n", x); |
| 84 | return 0; | 81 | return 0; |
