Advent of Code

Check-in [4ad4c64403]
Login

Check-in [4ad4c64403]

Overview
Comment:fixed possible bug (3)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4ad4c64403e94ff513a136cb16c7f46ac500539f2a59fa14c7ea318322845735
User & Date: nnz on 2024-12-07 14:41:25
Other Links: manifest | tags
Context
2024-12-08
13:22
202408 wip check-in: a382d65717 user: nnz tags: trunk
13:13
struct TextGrid is replacing linearize2d check-in: f28e83772a user: nnz tags: TextGrid
2024-12-07
14:41
fixed possible bug (3) check-in: 4ad4c64403 user: nnz tags: trunk
14:39
fixed possible bug (2) check-in: afa0bfe340 user: nnz tags: trunk
Changes

Modified aoc2024.c from [7cc4fb360f] to [9685519f7e].

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
    a[1] = tmp;
    if (!pplus && !pmult) {
        a[1] = concat(a[0], tmp);
        pconcat = operatorsrequired(v, a+1, n-1, 3);
        a[1] = tmp;
    }
    if (pconcat) return 3;
    if (pmult) return pmult;
    if (pplus) return pplus;
    return 0;
}

void aoc202407(char *data, size_t len) {
    (void)len; // unused argument
    unsigned long long calibrationtotal = 0, calibration3total = 0;
    char *line = strtok(data, "\n");







|
<







37
38
39
40
41
42
43
44

45
46
47
48
49
50
51
    a[1] = tmp;
    if (!pplus && !pmult) {
        a[1] = concat(a[0], tmp);
        pconcat = operatorsrequired(v, a+1, n-1, 3);
        a[1] = tmp;
    }
    if (pconcat) return 3;
    if (pplus || pmult) return (pplus > pmult) ? pplus : pmult;

    return 0;
}

void aoc202407(char *data, size_t len) {
    (void)len; // unused argument
    unsigned long long calibrationtotal = 0, calibration3total = 0;
    char *line = strtok(data, "\n");