Advent of Code

Check-in [5718bd5370]
Login

Check-in [5718bd5370]

Overview
Comment:removed double rm
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5718bd537020102e95d73a37b991caf01f03841b4ac9387ced0fd69b82b0f408
User & Date: nnz on 2025-12-08 11:14:01.819
Other Links: manifest | tags
Context
2025-12-08
11:21
day 8 is on hold check-in: f2d9741398 user: nnz tags: trunk
11:14
removed double rm check-in: 5718bd5370 user: nnz tags: trunk
11:12
2025, day 7, part 1 check-in: 7b791fa5ed user: nnz tags: trunk
Changes
Modified aoc2025.c from [b18c3d1b41] to [88ff790e71].
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
        }
    }
    return count;
}

void aoc202507(char *data, size_t len) {
    (void)len; // unused argument
    struct RectangularMap rm[2] = {0};
    while (*data) {                      // copy from data to rms
        char *data2 = data;
        while (*data != '\n') data++;
        *data = 0; // erase newline
        RMaddline(rm + 0, data2);
        RMaddline(rm + 1, data2); // set both rm's to the same thing
        *data++ = '\n'; // unerase newline (obviously!) and skip it
    }
    unsigned part1 = tachyon_splits(rm);
    printf("P1: %u\n", part1);
    RMfree(rm);
    RMfree(rm + 1);
}

/* === aoc202506 =======================================================
===================================================================== */
static long long unsigned add2506(long long unsigned v[4][1024], int lin, int col) {
    long long unsigned sum = 0;
    for (int k = 0; k < lin; k++) sum += v[k][col];







|
|




<





<







40
41
42
43
44
45
46
47
48
49
50
51
52

53
54
55
56
57

58
59
60
61
62
63
64
        }
    }
    return count;
}

void aoc202507(char *data, size_t len) {
    (void)len; // unused argument
    struct RectangularMap rm[1] = {0};
    while (*data) {
        char *data2 = data;
        while (*data != '\n') data++;
        *data = 0; // erase newline
        RMaddline(rm + 0, data2);

        *data++ = '\n'; // unerase newline (obviously!) and skip it
    }
    unsigned part1 = tachyon_splits(rm);
    printf("P1: %u\n", part1);
    RMfree(rm);

}

/* === aoc202506 =======================================================
===================================================================== */
static long long unsigned add2506(long long unsigned v[4][1024], int lin, int col) {
    long long unsigned sum = 0;
    for (int k = 0; k < lin; k++) sum += v[k][col];