something
This commit is contained in:
parent
fe59bfd041
commit
d239ed440c
3 changed files with 1329 additions and 0 deletions
15
13/inputDemo
Normal file
15
13/inputDemo
Normal file
|
@ -0,0 +1,15 @@
|
|||
Button A: X+94, Y+34
|
||||
Button B: X+22, Y+67
|
||||
Prize: X=8400, Y=5400
|
||||
|
||||
Button A: X+26, Y+66
|
||||
Button B: X+67, Y+21
|
||||
Prize: X=12748, Y=12176
|
||||
|
||||
Button A: X+17, Y+86
|
||||
Button B: X+84, Y+37
|
||||
Prize: X=7870, Y=6450
|
||||
|
||||
Button A: X+69, Y+23
|
||||
Button B: X+27, Y+71
|
||||
Prize: X=18641, Y=10279
|
35
13/mainB.c
Normal file
35
13/mainB.c
Normal file
|
@ -0,0 +1,35 @@
|
|||
#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);
|
||||
}
|
Loading…
Reference in a new issue