aoc

My solutions for the Advent of Code
git clone https://git.tronto.net/aoc
Download | Log | Files | Refs | README

commit 1bdeb79ca58b40b2f1e50428177d07ee58708a85
parent bced1a7a3af9cb67ca6bf3339298cc5882e4b29a
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Mon, 25 Dec 2023 09:19:09 +0100

Fixed a whoopsie

Diffstat:
M2023/24/24b.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/2023/24/24b.c b/2023/24/24b.c @@ -62,8 +62,8 @@ bool solvesystem(double A[D][D], double C[D], int d, double *X) { int imax; double maxi = 0.0; for (int j = i; j < d; j++) { - if (A[j][i] > maxi) { - maxi = A[j][i]; + if (ABS(A[j][i]) > maxi) { + maxi = ABS(A[j][i]); imax = j; } }