Compare commits
2 Commits
17df598e16
...
932d76ba8a
Author | SHA1 | Date |
---|---|---|
Alexander Andreev | 932d76ba8a | |
Alexander Andreev | 4dbf46697c |
|
@ -5,7 +5,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
|
||||
uint64_t parse_number(char *end);
|
||||
inline uint64_t parse_number(const char *end);
|
||||
|
||||
#define SETS_STR_MAX_LEN 200
|
||||
|
||||
|
@ -66,7 +66,7 @@ int main(int argc, char **argv) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
uint64_t parse_number(char *end) {
|
||||
inline uint64_t parse_number(const char *end) {
|
||||
uint64_t num = 0;
|
||||
|
||||
for (size_t n = 1;; n *= 10) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
|
||||
uint64_t parse_number(char *end);
|
||||
inline uint64_t parse_number(const char *end);
|
||||
|
||||
#define SETS_STR_MAX_LEN 200
|
||||
|
||||
|
@ -72,7 +72,7 @@ int main(int argc, char **argv) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
uint64_t parse_number(char *end) {
|
||||
inline uint64_t parse_number(const char *end) {
|
||||
uint64_t num = 0;
|
||||
|
||||
for (size_t n = 1;; n *= 10) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#define ISDIGIT(c) (c >= 0x30 && c <= 0x39)
|
||||
|
||||
uint64_t parse_number(char *line, ssize_t j);
|
||||
inline uint64_t parse_number(const char *line, ssize_t j);
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
@ -101,7 +101,7 @@ int main(int argc, char **argv) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
uint64_t parse_number(char *line, ssize_t j) {
|
||||
inline uint64_t parse_number(const char *line, ssize_t j) {
|
||||
uint64_t n = 0;
|
||||
uint64_t multiplier = 1;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
|
||||
uint64_t parse_number(char *end);
|
||||
inline uint64_t parse_number(const char *end);
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
@ -66,7 +66,7 @@ int main(int argc, char **argv) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
uint64_t parse_number(char *end) {
|
||||
inline uint64_t parse_number(const char *end) {
|
||||
uint64_t num = 0;
|
||||
|
||||
for (size_t n = 1;; n *= 10) {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define STACK_SZ UINT8_MAX+1
|
||||
typedef uint8_t stackpointer_t;
|
||||
|
||||
uint64_t parse_number(char *end);
|
||||
inline uint64_t parse_number(const char *end);
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
@ -76,7 +76,7 @@ int main(int argc, char **argv) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
uint64_t parse_number(char *end) {
|
||||
inline uint64_t parse_number(const char *end) {
|
||||
uint64_t num = 0;
|
||||
|
||||
for (size_t n = 1;; n *= 10) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
|
||||
int64_t parse_number(char *end);
|
||||
inline int64_t parse_number(const char *end);
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
@ -69,7 +69,7 @@ int main(int argc, char **argv) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int64_t parse_number(char *end) {
|
||||
inline int64_t parse_number(const char *end) {
|
||||
int64_t num = 0;
|
||||
|
||||
for (size_t m = 1;; m *= 10) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
|
||||
uint64_t parse_number(char *end);
|
||||
inline uint64_t parse_number(const char *end);
|
||||
|
||||
#define MAPS_LEN 7
|
||||
|
||||
|
@ -100,7 +100,7 @@ int main(int argc, char **argv) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
uint64_t parse_number(char *end) {
|
||||
inline uint64_t parse_number(const char *end) {
|
||||
uint64_t num = 0;
|
||||
|
||||
for (size_t m = 1;; m *= 10) {
|
||||
|
|
5
test
5
test
|
@ -19,4 +19,7 @@ echo "Day 4 with test data part 1 $(test_case 4 1 "test" "13"), and part 2 $(tes
|
|||
echo "Day 4 with my data part 1 $(test_case 4 1 "my" "21959"), and part 2 $(test_case 4 2 "my" "5132675").";
|
||||
|
||||
echo "Day 5 with test data part 1 $(test_case 5 1 "test" "35"), and part 2 $(test_case 5 2 "test" "46").";
|
||||
# echo "Day 5 with my data part 1 $(test_case 5 1 "my" "379811651"), and part 2 $(test_case 5 2 "my" "27992443").";
|
||||
# echo "Day 5 with my data part 1 $(test_case 5 1 "my" "379811651"), and part 2 $(test_case 5 2 "my" "27992443").";
|
||||
|
||||
echo "Day 6 with test data part 1 $(test_case 6 1 "test" "288"), and part 2 $(test_case 6 2 "test" "71503").";
|
||||
echo "Day 6 with my data part 1 $(test_case 6 1 "my" "2344708"), and part 2 $(test_case 6 2 "my" "30125202").";
|
Loading…
Reference in New Issue