1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include <ctype.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aocdailies.h"
#include "aocutils.h"
static int ppcmp(unsigned a, unsigned b, unsigned (*r)[2], size_t nr) {
for (size_t k = 0; k < nr; k++) {
if ((a == r[k][0]) && (b == r[k][1])) return -1;
if ((a == r[k][1]) && (b == r[k][0])) return 1;
}
return 0;
|
>
>
>
>
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include <ctype.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aocdailies.h"
#include "aocutils.h"
void aoc202406(char *data, size_t len) {
(void)data;
(void)len;
}
static int ppcmp(unsigned a, unsigned b, unsigned (*r)[2], size_t nr) {
for (size_t k = 0; k < nr; k++) {
if ((a == r[k][0]) && (b == r[k][1])) return -1;
if ((a == r[k][1]) && (b == r[k][0])) return 1;
}
return 0;
|