From 94d0033ed89bb5bfb6500051296892fb7cea6c29 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 25 Dec 2023 17:56:34 +0100 Subject: Small cleanup --- 2023/12/12a.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to '2023/12') diff --git a/2023/12/12a.c b/2023/12/12a.c index d88ed9a..129746f 100644 --- a/2023/12/12a.c +++ b/2023/12/12a.c @@ -1,14 +1,10 @@ -#include -#include #include #include #include #define N 1000 -#define MAX(a,b) ((a)>(b)?(a):(b)) -#define MIN(a,b) ((a)<(b)?(a):(b)) -#define ABS(a) MAX((a),-(a)) +#define ABS(a) ((a)>0?(a):-(a)) #define isnum(c) (c == '-' || (c >= '0' && c <= '9')) @@ -16,7 +12,7 @@ char *buf, line[N]; int s, n, a[N]; int readl(int nums[], char *buf) { - int64_t i; + int i; for (i = 0; *buf; buf++) { if (!isnum(*buf)) continue; nums[i++] = atoll(buf); -- cgit v1.3