You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
496 B

#include <stdio.h>
#include <input.h>
extern int part1(uint64_t* restrict);
extern int part2(uint64_t* restrict);
inline static void print_value(int part, uint64_t p)
{
#ifdef DEBUG
printf("[%d] >>> %lu\n", part, p);
#else
(void)part;
printf("%lu\n", p);
#endif
}
int main()
{
register int r=0;
#ifdef _PART1
uint64_t p1;
if( (r = part1(&p1)) ) return r;
print_value(1, p1);
#endif
#ifdef _PART2
uint64_t p2;
if( (r = part2(&p2)) ) return r;
print_value(2, p2);
#endif
return r;
}