35 lines
656 B
C
35 lines
656 B
C
#include<stdlib.h>
|
|
#include<stdio.h>
|
|
#include<string.h>
|
|
#include<stdbool.h>
|
|
|
|
struct list {
|
|
unsigned int a[2];
|
|
unsigned int b[2];
|
|
unsigned int prize[2];
|
|
struct list *next;
|
|
};
|
|
|
|
int main ()
|
|
{
|
|
// figure out data dimensions
|
|
FILE *input = fopen("./input", "r");
|
|
unsigned int x;
|
|
unsigned int y;
|
|
struct list *games = malloc(sizeof(struct list));
|
|
for (int i = 0; fscanf(input, "%d%d", &x, &y) == 1; i++) {
|
|
|
|
}
|
|
fclose(input);
|
|
|
|
solutions = malloc(sizeof(struct list));
|
|
solutions->num = -1;
|
|
solutions->next = NULL;
|
|
|
|
unsigned long int sum = 0;
|
|
for (int i = 0; array[i] != -1; i++) {
|
|
sum += solve_stone(array[i], 6);
|
|
}
|
|
|
|
printf("total: %d\n", sum);
|
|
}
|