Advent of Code

Check-in [cb68a52d2d]
Login

Check-in [cb68a52d2d]

Overview
Comment:added TODO notes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: cb68a52d2d0322b2163bb63183520557e8c4cfce278e457212c7680418e6e633
User & Date: nnz on 2025-01-09 19:11:24
Other Links: manifest | tags
Context
2025-01-09
19:37
revamped the comma separated output check-in: 2f90165e39 user: nnz tags: trunk
19:11
added TODO notes check-in: cb68a52d2d user: nnz tags: trunk
19:02
202417 2nd star check-in: 38c17bcc28 user: nnz tags: trunk
Changes

Modified aoc2024.c from [8ba34621fd] to [7e73975195].

1
2
3
4
5
6
7
8
9
10

11
12
13
14
15
16
17
#include <ctype.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aocdailies.h"
#include "aocutils.h"

/* === aoc202422 =======================================================

===================================================================== */
static long long unsigned mix(long long unsigned a, long long unsigned b) {
    long long unsigned tmp = a ^ b;
    return tmp;
}

static long long unsigned prune(long long unsigned a) {










>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <ctype.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aocdailies.h"
#include "aocutils.h"

/* === aoc202422 =======================================================
TODO: Part Two
===================================================================== */
static long long unsigned mix(long long unsigned a, long long unsigned b) {
    long long unsigned tmp = a ^ b;
    return tmp;
}

static long long unsigned prune(long long unsigned a) {
33
34
35
36
37
38
39

40
41
42
43
44
45
46
        sum2000 += secret;
        key = strtok(NULL, "\n");
    }
    printf("The sum of all 2000th secrets is {%llu}.\n", sum2000);
}

/* === aoc202417 =======================================================

===================================================================== */

static unsigned combo(unsigned operand, unsigned long long r[3]) {
    switch (operand) {
        default: fprintf(stderr, "Nope!\n"); exit(EXIT_FAILURE);
        case 0: return 0;
        case 1: return 1;







>







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
        sum2000 += secret;
        key = strtok(NULL, "\n");
    }
    printf("The sum of all 2000th secrets is {%llu}.\n", sum2000);
}

/* === aoc202417 =======================================================
TODO: proper (recursive) solution for Part Two
===================================================================== */

static unsigned combo(unsigned operand, unsigned long long r[3]) {
    switch (operand) {
        default: fprintf(stderr, "Nope!\n"); exit(EXIT_FAILURE);
        case 0: return 0;
        case 1: return 1;