From ada5f3e2f8c256e2cbd19ffce3b06cf6b0824f64 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Thu, 13 Dec 2018 16:58:32 +0100 Subject: [PATCH] day4p1 --- day4p1/Makefile | 12 + day4p1/input | 1102 +++++++++++++++++++++++++++++++++++++++++++++++ day4p1/main | Bin 0 -> 17920 bytes day4p1/main.c | 210 +++++++++ 4 files changed, 1324 insertions(+) create mode 100644 day4p1/Makefile create mode 100644 day4p1/input create mode 100755 day4p1/main create mode 100644 day4p1/main.c diff --git a/day4p1/Makefile b/day4p1/Makefile new file mode 100644 index 0000000..c711967 --- /dev/null +++ b/day4p1/Makefile @@ -0,0 +1,12 @@ +CFLAGS := -Wall -Wextra -std=c17 -D_GNU_SOURCE + +LIBS := glib-2.0 +CFLAGS += $(shell pkg-config --cflags $(LIBS)) +LDLIBS := $(shell pkg-config --libs $(LIBS)) + +.PHONY: all +all: main + +.PHONY: clean +clean: + rm -f main diff --git a/day4p1/input b/day4p1/input new file mode 100644 index 0000000..a44e892 --- /dev/null +++ b/day4p1/input @@ -0,0 +1,1102 @@ +[1518-03-11 00:45] wakes up +[1518-07-13 00:13] falls asleep +[1518-11-02 23:56] Guard #3463 begins shift +[1518-11-13 00:59] wakes up +[1518-06-15 23:59] Guard #829 begins shift +[1518-08-16 00:03] Guard #1399 begins shift +[1518-09-18 00:19] wakes up +[1518-08-30 00:56] wakes up +[1518-04-22 00:32] falls asleep +[1518-10-07 00:41] wakes up +[1518-08-21 00:28] falls asleep +[1518-07-04 00:00] Guard #1699 begins shift +[1518-04-11 00:23] falls asleep +[1518-10-17 00:11] wakes up +[1518-08-23 23:56] Guard #3253 begins shift +[1518-04-29 00:51] wakes up +[1518-04-14 00:51] wakes up +[1518-05-28 00:36] falls asleep +[1518-04-02 23:58] Guard #3371 begins shift +[1518-07-11 00:54] wakes up +[1518-07-07 00:29] falls asleep +[1518-11-01 00:30] wakes up +[1518-09-18 23:56] Guard #1699 begins shift +[1518-03-27 00:08] falls asleep +[1518-07-21 00:37] falls asleep +[1518-10-30 00:00] Guard #463 begins shift +[1518-04-24 00:59] wakes up +[1518-11-18 00:52] wakes up +[1518-05-19 00:55] wakes up +[1518-04-28 00:44] wakes up +[1518-08-29 00:55] wakes up +[1518-06-14 00:57] falls asleep +[1518-03-17 00:21] falls asleep +[1518-03-31 00:14] falls asleep +[1518-09-09 23:57] Guard #73 begins shift +[1518-11-02 00:57] falls asleep +[1518-10-04 00:15] falls asleep +[1518-07-14 00:04] Guard #1759 begins shift +[1518-04-15 00:58] wakes up +[1518-09-09 00:56] wakes up +[1518-11-21 00:33] falls asleep +[1518-08-15 00:06] falls asleep +[1518-10-15 00:00] Guard #463 begins shift +[1518-07-03 00:56] falls asleep +[1518-05-17 00:41] wakes up +[1518-04-01 00:39] falls asleep +[1518-08-14 00:54] wakes up +[1518-05-25 00:51] wakes up +[1518-03-31 23:49] Guard #151 begins shift +[1518-09-12 00:34] wakes up +[1518-07-22 00:40] falls asleep +[1518-11-07 00:22] falls asleep +[1518-04-21 00:28] wakes up +[1518-07-31 23:59] Guard #151 begins shift +[1518-09-14 00:01] Guard #3463 begins shift +[1518-10-03 00:46] wakes up +[1518-03-22 00:57] wakes up +[1518-10-04 00:03] Guard #1913 begins shift +[1518-03-15 00:02] Guard #3463 begins shift +[1518-07-19 23:52] Guard #3253 begins shift +[1518-09-12 00:47] falls asleep +[1518-09-27 00:35] falls asleep +[1518-03-05 00:28] falls asleep +[1518-10-26 23:57] Guard #73 begins shift +[1518-09-30 00:00] Guard #1861 begins shift +[1518-09-28 00:25] wakes up +[1518-07-02 00:44] wakes up +[1518-05-08 00:47] wakes up +[1518-07-24 23:59] Guard #653 begins shift +[1518-08-06 00:16] wakes up +[1518-06-20 00:40] wakes up +[1518-11-16 00:08] falls asleep +[1518-06-28 00:57] wakes up +[1518-04-15 00:00] Guard #463 begins shift +[1518-07-03 00:52] wakes up +[1518-10-06 00:02] Guard #1861 begins shift +[1518-09-02 00:10] falls asleep +[1518-06-13 00:55] wakes up +[1518-07-23 00:35] wakes up +[1518-08-08 23:50] Guard #151 begins shift +[1518-09-04 00:25] wakes up +[1518-05-03 00:48] falls asleep +[1518-03-28 00:41] wakes up +[1518-04-21 00:43] wakes up +[1518-05-16 00:00] Guard #1861 begins shift +[1518-03-04 00:12] falls asleep +[1518-07-26 23:57] Guard #151 begins shift +[1518-03-07 23:48] Guard #1069 begins shift +[1518-04-06 00:43] falls asleep +[1518-10-23 00:51] falls asleep +[1518-11-21 00:58] wakes up +[1518-11-01 00:38] falls asleep +[1518-08-15 00:26] falls asleep +[1518-09-29 00:59] wakes up +[1518-08-06 00:58] wakes up +[1518-11-11 00:19] falls asleep +[1518-07-08 23:58] Guard #1597 begins shift +[1518-03-25 00:32] falls asleep +[1518-11-13 00:31] wakes up +[1518-06-03 00:15] wakes up +[1518-02-28 00:03] Guard #463 begins shift +[1518-11-20 00:07] falls asleep +[1518-10-16 00:53] wakes up +[1518-08-14 00:03] Guard #3469 begins shift +[1518-10-18 00:03] Guard #73 begins shift +[1518-04-21 00:38] falls asleep +[1518-04-08 00:49] wakes up +[1518-11-14 00:32] wakes up +[1518-03-14 00:58] wakes up +[1518-04-21 00:07] falls asleep +[1518-07-29 00:02] Guard #1597 begins shift +[1518-11-21 00:21] wakes up +[1518-09-22 00:27] falls asleep +[1518-11-19 00:11] falls asleep +[1518-03-18 00:59] wakes up +[1518-08-27 00:58] wakes up +[1518-09-18 00:53] wakes up +[1518-09-24 00:33] wakes up +[1518-06-01 00:56] wakes up +[1518-08-26 00:40] falls asleep +[1518-09-20 00:30] falls asleep +[1518-06-07 00:52] wakes up +[1518-11-13 00:50] falls asleep +[1518-07-19 00:43] falls asleep +[1518-11-19 00:04] Guard #653 begins shift +[1518-10-07 00:51] falls asleep +[1518-07-20 00:26] falls asleep +[1518-03-02 00:30] wakes up +[1518-09-26 00:40] wakes up +[1518-10-27 00:29] falls asleep +[1518-04-29 23:58] Guard #523 begins shift +[1518-03-16 00:34] wakes up +[1518-11-22 00:28] falls asleep +[1518-09-26 23:59] Guard #1759 begins shift +[1518-03-16 00:23] falls asleep +[1518-03-21 00:12] falls asleep +[1518-11-19 23:56] Guard #1399 begins shift +[1518-04-13 23:56] Guard #463 begins shift +[1518-06-15 00:46] wakes up +[1518-10-21 00:02] Guard #73 begins shift +[1518-11-05 00:18] falls asleep +[1518-03-10 23:59] Guard #829 begins shift +[1518-09-08 00:01] Guard #151 begins shift +[1518-07-21 00:17] falls asleep +[1518-04-19 00:05] falls asleep +[1518-04-05 23:49] Guard #389 begins shift +[1518-11-04 00:59] wakes up +[1518-08-13 00:17] falls asleep +[1518-02-27 00:01] Guard #2557 begins shift +[1518-09-20 00:02] Guard #1069 begins shift +[1518-11-07 00:25] wakes up +[1518-06-02 23:58] Guard #1069 begins shift +[1518-03-20 00:26] wakes up +[1518-03-30 00:02] Guard #1759 begins shift +[1518-05-04 00:05] falls asleep +[1518-06-07 23:49] Guard #653 begins shift +[1518-05-01 00:03] falls asleep +[1518-08-22 23:57] Guard #2557 begins shift +[1518-10-29 00:43] wakes up +[1518-03-06 00:54] falls asleep +[1518-05-02 00:03] Guard #1913 begins shift +[1518-07-03 00:59] wakes up +[1518-09-04 00:45] wakes up +[1518-06-18 00:17] falls asleep +[1518-05-08 00:53] falls asleep +[1518-11-15 00:58] wakes up +[1518-06-13 00:24] wakes up +[1518-08-05 00:51] wakes up +[1518-05-31 23:54] Guard #463 begins shift +[1518-04-05 00:36] falls asleep +[1518-06-04 00:15] wakes up +[1518-09-14 23:57] Guard #151 begins shift +[1518-04-20 00:01] Guard #1861 begins shift +[1518-05-23 23:50] Guard #1759 begins shift +[1518-05-08 00:43] falls asleep +[1518-10-30 23:59] Guard #829 begins shift +[1518-05-17 00:55] wakes up +[1518-07-15 00:20] wakes up +[1518-07-20 00:00] falls asleep +[1518-10-03 00:50] falls asleep +[1518-08-31 00:55] wakes up +[1518-07-28 00:00] Guard #151 begins shift +[1518-02-27 00:57] wakes up +[1518-07-05 00:43] falls asleep +[1518-07-27 00:29] falls asleep +[1518-08-26 00:04] Guard #1699 begins shift +[1518-09-12 00:12] falls asleep +[1518-10-24 00:21] falls asleep +[1518-04-17 00:03] falls asleep +[1518-04-12 00:47] wakes up +[1518-05-05 00:52] wakes up +[1518-06-30 00:24] falls asleep +[1518-08-13 00:00] Guard #3463 begins shift +[1518-05-07 00:38] falls asleep +[1518-08-10 23:46] Guard #829 begins shift +[1518-07-18 00:50] falls asleep +[1518-09-27 23:59] Guard #1123 begins shift +[1518-09-30 00:42] wakes up +[1518-04-18 00:03] falls asleep +[1518-07-15 00:36] wakes up +[1518-11-17 00:51] falls asleep +[1518-05-03 00:31] falls asleep +[1518-10-20 00:46] wakes up +[1518-08-19 00:47] falls asleep +[1518-03-22 00:20] falls asleep +[1518-06-06 00:17] falls asleep +[1518-09-13 00:58] wakes up +[1518-04-01 00:13] wakes up +[1518-07-09 00:28] falls asleep +[1518-05-10 00:43] falls asleep +[1518-08-02 00:45] falls asleep +[1518-08-18 00:04] Guard #337 begins shift +[1518-06-04 23:59] Guard #1069 begins shift +[1518-05-08 00:57] wakes up +[1518-06-13 00:10] falls asleep +[1518-06-17 00:26] wakes up +[1518-02-25 00:29] wakes up +[1518-08-20 00:56] wakes up +[1518-10-17 00:57] wakes up +[1518-09-18 00:48] falls asleep +[1518-08-12 00:48] wakes up +[1518-11-01 00:06] falls asleep +[1518-07-23 00:07] falls asleep +[1518-04-16 00:42] falls asleep +[1518-04-06 00:28] wakes up +[1518-10-05 00:47] falls asleep +[1518-11-10 23:59] Guard #1759 begins shift +[1518-07-08 00:27] wakes up +[1518-04-04 00:07] falls asleep +[1518-02-25 00:17] falls asleep +[1518-04-12 23:59] Guard #2557 begins shift +[1518-08-07 00:55] wakes up +[1518-06-03 00:51] wakes up +[1518-07-28 00:32] wakes up +[1518-08-26 00:51] falls asleep +[1518-09-23 23:56] Guard #1699 begins shift +[1518-04-22 00:42] wakes up +[1518-03-14 00:57] falls asleep +[1518-10-02 00:48] wakes up +[1518-03-03 00:24] falls asleep +[1518-04-27 00:58] wakes up +[1518-10-06 00:54] wakes up +[1518-05-14 00:55] falls asleep +[1518-11-04 00:02] Guard #1123 begins shift +[1518-04-24 00:54] falls asleep +[1518-09-16 23:57] Guard #1069 begins shift +[1518-05-30 23:48] Guard #523 begins shift +[1518-09-23 00:15] falls asleep +[1518-05-08 23:48] Guard #1069 begins shift +[1518-03-24 00:25] falls asleep +[1518-04-23 00:29] wakes up +[1518-04-27 00:03] Guard #151 begins shift +[1518-06-30 23:58] Guard #1123 begins shift +[1518-02-27 00:27] falls asleep +[1518-06-13 00:00] Guard #1759 begins shift +[1518-04-04 00:29] wakes up +[1518-03-08 23:57] Guard #3469 begins shift +[1518-05-19 23:50] Guard #389 begins shift +[1518-06-03 23:58] Guard #463 begins shift +[1518-11-10 00:08] falls asleep +[1518-11-13 00:25] falls asleep +[1518-06-14 00:59] wakes up +[1518-03-27 00:47] wakes up +[1518-07-20 23:57] Guard #463 begins shift +[1518-04-16 23:51] Guard #523 begins shift +[1518-10-06 00:53] falls asleep +[1518-08-19 00:54] wakes up +[1518-10-02 00:58] wakes up +[1518-08-28 23:49] Guard #3469 begins shift +[1518-02-26 00:07] falls asleep +[1518-03-04 00:21] wakes up +[1518-09-09 00:20] falls asleep +[1518-07-15 00:39] falls asleep +[1518-03-18 00:01] Guard #1597 begins shift +[1518-03-30 00:48] wakes up +[1518-06-04 00:38] falls asleep +[1518-10-07 00:56] wakes up +[1518-10-24 00:03] Guard #463 begins shift +[1518-10-03 00:24] falls asleep +[1518-09-15 00:49] wakes up +[1518-06-22 00:58] wakes up +[1518-07-11 00:00] Guard #463 begins shift +[1518-03-23 00:37] wakes up +[1518-06-27 00:44] falls asleep +[1518-08-27 00:31] wakes up +[1518-07-07 00:35] wakes up +[1518-11-10 00:49] falls asleep +[1518-10-30 00:51] wakes up +[1518-08-29 00:47] falls asleep +[1518-03-20 00:40] wakes up +[1518-10-02 23:59] Guard #463 begins shift +[1518-08-27 00:01] Guard #1597 begins shift +[1518-06-14 00:44] falls asleep +[1518-10-09 00:59] wakes up +[1518-07-17 00:00] Guard #1861 begins shift +[1518-11-23 00:12] falls asleep +[1518-05-16 00:58] wakes up +[1518-11-02 00:00] Guard #389 begins shift +[1518-05-31 00:00] falls asleep +[1518-04-30 00:20] falls asleep +[1518-03-20 00:55] falls asleep +[1518-09-21 00:40] falls asleep +[1518-06-27 00:46] wakes up +[1518-09-14 00:56] falls asleep +[1518-07-29 00:58] wakes up +[1518-03-04 00:57] wakes up +[1518-10-24 00:55] wakes up +[1518-03-22 00:53] falls asleep +[1518-03-13 00:38] wakes up +[1518-07-31 00:43] falls asleep +[1518-04-20 00:15] wakes up +[1518-06-26 00:57] wakes up +[1518-03-06 00:00] Guard #3463 begins shift +[1518-08-02 00:50] wakes up +[1518-11-14 00:01] Guard #523 begins shift +[1518-10-12 00:47] wakes up +[1518-08-17 00:45] falls asleep +[1518-04-06 00:25] falls asleep +[1518-06-19 00:00] Guard #389 begins shift +[1518-05-17 00:49] falls asleep +[1518-10-14 00:04] Guard #1699 begins shift +[1518-04-19 00:33] falls asleep +[1518-11-08 23:56] Guard #1913 begins shift +[1518-07-06 00:42] falls asleep +[1518-04-26 00:48] wakes up +[1518-03-11 00:09] falls asleep +[1518-08-02 00:59] wakes up +[1518-07-18 23:56] Guard #3469 begins shift +[1518-06-17 00:48] wakes up +[1518-04-26 00:00] Guard #829 begins shift +[1518-08-19 00:00] Guard #2557 begins shift +[1518-07-02 23:57] Guard #653 begins shift +[1518-03-28 00:00] Guard #829 begins shift +[1518-05-18 00:17] falls asleep +[1518-06-20 00:52] wakes up +[1518-06-27 23:57] Guard #73 begins shift +[1518-09-12 23:50] Guard #1861 begins shift +[1518-08-06 00:01] falls asleep +[1518-10-21 00:35] falls asleep +[1518-10-31 00:39] wakes up +[1518-10-15 23:54] Guard #3463 begins shift +[1518-08-26 00:21] falls asleep +[1518-09-16 00:00] Guard #653 begins shift +[1518-04-20 00:18] falls asleep +[1518-10-08 23:46] Guard #1597 begins shift +[1518-07-26 00:01] falls asleep +[1518-03-03 00:37] wakes up +[1518-08-21 00:48] falls asleep +[1518-04-28 00:10] falls asleep +[1518-09-25 00:40] falls asleep +[1518-03-09 00:50] falls asleep +[1518-09-01 00:00] Guard #3463 begins shift +[1518-05-01 00:29] wakes up +[1518-11-10 00:35] wakes up +[1518-04-04 00:00] Guard #3463 begins shift +[1518-09-19 00:17] falls asleep +[1518-03-17 00:56] falls asleep +[1518-09-07 00:39] falls asleep +[1518-04-14 00:37] wakes up +[1518-10-03 00:57] wakes up +[1518-04-26 00:18] falls asleep +[1518-04-06 00:12] wakes up +[1518-08-23 00:41] falls asleep +[1518-11-10 00:46] wakes up +[1518-09-12 00:51] wakes up +[1518-03-05 00:52] wakes up +[1518-11-23 00:00] Guard #1123 begins shift +[1518-05-22 00:04] Guard #463 begins shift +[1518-09-11 00:19] falls asleep +[1518-06-13 00:45] falls asleep +[1518-04-14 00:17] falls asleep +[1518-07-15 00:35] falls asleep +[1518-05-06 00:57] wakes up +[1518-10-30 00:32] wakes up +[1518-06-30 00:54] wakes up +[1518-05-13 00:58] wakes up +[1518-08-09 00:00] falls asleep +[1518-07-16 00:10] wakes up +[1518-10-09 00:45] wakes up +[1518-07-06 00:52] wakes up +[1518-02-26 00:49] wakes up +[1518-06-06 23:58] Guard #1399 begins shift +[1518-05-18 00:27] wakes up +[1518-03-05 00:30] wakes up +[1518-10-01 00:47] falls asleep +[1518-08-19 00:17] falls asleep +[1518-07-30 00:32] falls asleep +[1518-06-27 00:59] wakes up +[1518-08-25 00:49] falls asleep +[1518-05-30 00:51] wakes up +[1518-07-25 00:29] falls asleep +[1518-09-11 00:32] falls asleep +[1518-10-25 00:44] falls asleep +[1518-05-25 23:56] Guard #151 begins shift +[1518-05-20 23:59] Guard #337 begins shift +[1518-04-13 00:34] falls asleep +[1518-03-05 00:40] falls asleep +[1518-09-26 00:03] Guard #1123 begins shift +[1518-07-20 00:33] falls asleep +[1518-08-19 23:58] Guard #1597 begins shift +[1518-06-18 00:04] Guard #2333 begins shift +[1518-08-10 00:46] wakes up +[1518-09-17 00:55] wakes up +[1518-08-15 00:09] wakes up +[1518-04-15 00:51] wakes up +[1518-06-02 00:59] wakes up +[1518-03-10 00:00] Guard #1399 begins shift +[1518-11-12 00:01] Guard #523 begins shift +[1518-11-17 00:14] falls asleep +[1518-03-24 00:40] falls asleep +[1518-10-19 23:50] Guard #1399 begins shift +[1518-05-28 23:58] Guard #151 begins shift +[1518-07-01 23:56] Guard #829 begins shift +[1518-11-15 00:26] falls asleep +[1518-11-09 00:13] falls asleep +[1518-09-11 00:20] wakes up +[1518-08-16 00:36] wakes up +[1518-07-12 00:10] falls asleep +[1518-05-09 00:23] wakes up +[1518-08-30 23:59] Guard #1123 begins shift +[1518-09-05 00:28] wakes up +[1518-10-04 00:48] wakes up +[1518-08-21 00:58] wakes up +[1518-07-20 00:27] wakes up +[1518-06-23 00:23] falls asleep +[1518-08-01 00:48] wakes up +[1518-08-27 00:44] falls asleep +[1518-04-05 00:52] falls asleep +[1518-10-13 00:04] Guard #3469 begins shift +[1518-10-07 00:03] Guard #1861 begins shift +[1518-07-20 00:53] wakes up +[1518-03-09 00:59] wakes up +[1518-09-06 00:41] wakes up +[1518-08-25 00:57] wakes up +[1518-06-24 00:42] wakes up +[1518-09-07 00:00] Guard #151 begins shift +[1518-07-13 00:22] wakes up +[1518-08-25 00:02] Guard #463 begins shift +[1518-03-29 00:45] falls asleep +[1518-07-28 00:59] wakes up +[1518-09-27 00:59] wakes up +[1518-06-09 00:54] wakes up +[1518-08-30 00:32] falls asleep +[1518-08-24 00:43] wakes up +[1518-09-23 00:19] wakes up +[1518-10-18 00:11] falls asleep +[1518-08-24 00:25] falls asleep +[1518-05-13 00:41] falls asleep +[1518-04-23 00:36] falls asleep +[1518-05-04 00:50] wakes up +[1518-10-08 00:01] Guard #463 begins shift +[1518-04-25 00:48] wakes up +[1518-03-20 00:33] falls asleep +[1518-08-03 23:56] Guard #1699 begins shift +[1518-04-13 00:10] falls asleep +[1518-06-14 23:57] Guard #2333 begins shift +[1518-08-15 00:01] Guard #1699 begins shift +[1518-06-23 00:49] falls asleep +[1518-08-08 00:42] falls asleep +[1518-09-09 00:51] falls asleep +[1518-07-16 00:04] falls asleep +[1518-03-26 00:04] Guard #523 begins shift +[1518-06-06 00:53] wakes up +[1518-06-14 00:02] falls asleep +[1518-04-05 00:39] wakes up +[1518-06-23 00:35] wakes up +[1518-10-13 00:44] falls asleep +[1518-04-24 00:27] wakes up +[1518-11-17 00:40] wakes up +[1518-05-22 23:59] Guard #1171 begins shift +[1518-02-26 00:37] falls asleep +[1518-04-15 23:57] Guard #463 begins shift +[1518-05-15 00:01] Guard #2333 begins shift +[1518-10-10 00:31] falls asleep +[1518-11-12 23:59] Guard #1913 begins shift +[1518-08-21 00:45] wakes up +[1518-06-12 00:55] wakes up +[1518-07-20 00:56] falls asleep +[1518-09-29 00:33] falls asleep +[1518-10-02 00:05] falls asleep +[1518-09-24 23:56] Guard #1861 begins shift +[1518-10-22 00:45] wakes up +[1518-06-21 00:33] falls asleep +[1518-05-05 00:04] Guard #2333 begins shift +[1518-08-04 00:53] wakes up +[1518-05-13 00:02] Guard #829 begins shift +[1518-10-15 00:57] wakes up +[1518-05-27 00:00] Guard #2333 begins shift +[1518-11-03 00:39] wakes up +[1518-09-08 00:51] wakes up +[1518-03-18 00:52] falls asleep +[1518-11-04 00:51] wakes up +[1518-10-22 00:06] falls asleep +[1518-05-04 00:59] wakes up +[1518-06-17 00:17] falls asleep +[1518-07-15 00:00] Guard #3469 begins shift +[1518-08-16 00:40] falls asleep +[1518-06-29 00:44] wakes up +[1518-11-07 00:04] Guard #463 begins shift +[1518-04-08 00:07] falls asleep +[1518-10-19 00:34] falls asleep +[1518-10-19 00:58] wakes up +[1518-07-21 00:20] wakes up +[1518-10-23 00:57] wakes up +[1518-03-01 00:46] wakes up +[1518-10-11 23:50] Guard #3469 begins shift +[1518-08-28 00:59] wakes up +[1518-07-08 00:22] falls asleep +[1518-08-22 00:18] falls asleep +[1518-10-29 00:04] falls asleep +[1518-11-14 23:56] Guard #653 begins shift +[1518-06-14 00:49] wakes up +[1518-06-22 00:34] falls asleep +[1518-08-04 00:35] falls asleep +[1518-07-31 00:11] falls asleep +[1518-11-07 00:33] falls asleep +[1518-09-30 00:34] falls asleep +[1518-09-22 00:50] wakes up +[1518-08-21 00:56] falls asleep +[1518-11-19 00:50] falls asleep +[1518-07-29 23:58] Guard #2557 begins shift +[1518-08-23 00:28] wakes up +[1518-08-20 00:42] falls asleep +[1518-08-25 00:35] falls asleep +[1518-07-15 00:48] wakes up +[1518-07-10 00:03] Guard #463 begins shift +[1518-03-31 00:46] wakes up +[1518-10-13 00:35] falls asleep +[1518-05-19 00:00] Guard #1069 begins shift +[1518-05-04 00:56] falls asleep +[1518-06-15 00:21] falls asleep +[1518-03-12 00:19] falls asleep +[1518-10-14 00:24] falls asleep +[1518-05-11 23:50] Guard #1759 begins shift +[1518-04-24 00:10] falls asleep +[1518-08-10 00:21] falls asleep +[1518-07-14 00:39] falls asleep +[1518-10-17 00:19] falls asleep +[1518-05-01 00:32] falls asleep +[1518-05-05 23:56] Guard #389 begins shift +[1518-07-27 00:43] wakes up +[1518-05-05 00:15] falls asleep +[1518-05-22 00:26] falls asleep +[1518-05-22 00:57] wakes up +[1518-09-08 23:56] Guard #73 begins shift +[1518-10-10 00:42] wakes up +[1518-07-18 00:45] wakes up +[1518-11-18 00:03] Guard #1759 begins shift +[1518-05-03 00:01] Guard #523 begins shift +[1518-10-28 00:04] Guard #337 begins shift +[1518-09-02 00:50] falls asleep +[1518-05-11 00:00] Guard #1171 begins shift +[1518-07-30 00:21] falls asleep +[1518-03-22 00:15] wakes up +[1518-08-12 00:01] falls asleep +[1518-07-12 00:02] Guard #3463 begins shift +[1518-09-10 00:25] falls asleep +[1518-09-17 00:39] wakes up +[1518-09-17 00:36] falls asleep +[1518-08-31 00:13] falls asleep +[1518-11-04 00:47] falls asleep +[1518-10-16 00:03] falls asleep +[1518-05-16 00:43] wakes up +[1518-09-29 00:03] Guard #1759 begins shift +[1518-08-03 00:30] falls asleep +[1518-10-06 00:39] wakes up +[1518-05-06 00:19] falls asleep +[1518-06-10 00:51] wakes up +[1518-06-11 23:59] Guard #1699 begins shift +[1518-05-18 00:58] wakes up +[1518-07-19 00:20] falls asleep +[1518-10-10 23:58] Guard #829 begins shift +[1518-07-01 00:17] falls asleep +[1518-06-26 00:00] Guard #523 begins shift +[1518-11-16 00:21] wakes up +[1518-07-30 00:27] wakes up +[1518-04-21 00:00] Guard #1399 begins shift +[1518-06-23 00:11] falls asleep +[1518-08-07 00:00] Guard #1759 begins shift +[1518-05-27 00:58] wakes up +[1518-08-11 00:01] falls asleep +[1518-09-23 00:58] wakes up +[1518-06-11 00:01] Guard #2557 begins shift +[1518-11-09 00:44] falls asleep +[1518-10-01 00:00] Guard #463 begins shift +[1518-09-07 00:16] wakes up +[1518-08-11 23:46] Guard #523 begins shift +[1518-07-29 00:25] falls asleep +[1518-03-01 00:03] Guard #1123 begins shift +[1518-03-10 00:14] falls asleep +[1518-08-20 00:21] falls asleep +[1518-05-09 00:02] falls asleep +[1518-05-13 23:46] Guard #3253 begins shift +[1518-08-27 23:56] Guard #151 begins shift +[1518-10-27 00:22] wakes up +[1518-07-15 00:56] falls asleep +[1518-08-09 00:52] wakes up +[1518-05-16 00:32] falls asleep +[1518-08-16 00:47] wakes up +[1518-05-07 00:55] falls asleep +[1518-09-14 00:57] wakes up +[1518-05-14 00:42] falls asleep +[1518-10-09 23:59] Guard #2333 begins shift +[1518-11-01 00:59] wakes up +[1518-07-13 00:43] falls asleep +[1518-05-28 00:01] Guard #1759 begins shift +[1518-11-22 00:43] wakes up +[1518-05-07 00:57] wakes up +[1518-04-07 00:48] wakes up +[1518-11-12 00:46] wakes up +[1518-04-20 00:06] falls asleep +[1518-08-08 00:54] wakes up +[1518-10-20 00:03] falls asleep +[1518-02-26 00:14] wakes up +[1518-07-15 23:50] Guard #389 begins shift +[1518-05-19 00:51] falls asleep +[1518-06-11 00:29] falls asleep +[1518-03-01 00:57] wakes up +[1518-07-19 00:58] wakes up +[1518-03-15 00:12] falls asleep +[1518-03-26 23:58] Guard #3463 begins shift +[1518-10-21 23:56] Guard #3253 begins shift +[1518-09-13 00:04] falls asleep +[1518-05-16 23:52] Guard #389 begins shift +[1518-11-20 00:49] wakes up +[1518-03-31 00:01] Guard #2557 begins shift +[1518-08-23 00:51] wakes up +[1518-09-17 00:52] falls asleep +[1518-07-26 00:18] wakes up +[1518-06-30 00:00] Guard #2557 begins shift +[1518-05-01 00:40] wakes up +[1518-10-12 00:01] falls asleep +[1518-03-15 00:47] wakes up +[1518-10-24 00:43] falls asleep +[1518-03-26 00:44] falls asleep +[1518-06-16 00:40] falls asleep +[1518-07-20 00:38] wakes up +[1518-08-27 00:13] falls asleep +[1518-09-07 00:45] wakes up +[1518-06-17 00:39] falls asleep +[1518-03-20 00:56] wakes up +[1518-03-02 00:49] falls asleep +[1518-08-21 00:00] Guard #3469 begins shift +[1518-04-24 00:43] wakes up +[1518-07-24 00:13] wakes up +[1518-03-21 23:50] Guard #523 begins shift +[1518-03-01 00:24] wakes up +[1518-08-21 00:50] wakes up +[1518-09-11 00:44] wakes up +[1518-04-23 00:39] wakes up +[1518-11-09 00:29] wakes up +[1518-08-28 00:15] falls asleep +[1518-05-31 00:56] wakes up +[1518-08-16 00:11] falls asleep +[1518-11-08 00:24] falls asleep +[1518-10-06 00:38] falls asleep +[1518-03-19 00:33] wakes up +[1518-11-16 00:00] Guard #1597 begins shift +[1518-11-17 00:54] wakes up +[1518-09-22 00:00] Guard #1069 begins shift +[1518-03-04 00:04] Guard #3469 begins shift +[1518-04-15 00:46] falls asleep +[1518-09-25 00:52] wakes up +[1518-04-02 00:36] falls asleep +[1518-03-23 00:03] Guard #1597 begins shift +[1518-08-19 00:35] wakes up +[1518-11-07 00:53] wakes up +[1518-04-21 00:25] falls asleep +[1518-08-05 00:45] falls asleep +[1518-04-16 00:50] wakes up +[1518-04-13 00:35] wakes up +[1518-10-23 00:26] falls asleep +[1518-08-17 00:54] wakes up +[1518-05-10 00:19] falls asleep +[1518-11-22 00:00] Guard #1699 begins shift +[1518-07-19 00:36] wakes up +[1518-05-09 00:49] wakes up +[1518-04-29 00:00] falls asleep +[1518-05-12 00:55] wakes up +[1518-10-30 00:24] falls asleep +[1518-09-10 00:28] wakes up +[1518-03-05 00:01] Guard #1759 begins shift +[1518-04-24 00:03] Guard #1861 begins shift +[1518-11-08 00:09] wakes up +[1518-05-24 23:58] Guard #1759 begins shift +[1518-07-04 00:54] wakes up +[1518-04-24 00:40] falls asleep +[1518-09-01 00:11] falls asleep +[1518-10-13 00:58] wakes up +[1518-04-18 23:50] Guard #3463 begins shift +[1518-11-02 00:59] wakes up +[1518-11-23 00:32] wakes up +[1518-08-05 23:46] Guard #1399 begins shift +[1518-04-05 00:58] wakes up +[1518-10-26 00:16] wakes up +[1518-06-11 00:19] falls asleep +[1518-03-06 00:50] wakes up +[1518-06-23 00:15] wakes up +[1518-10-13 00:41] wakes up +[1518-03-28 00:55] wakes up +[1518-05-30 00:03] falls asleep +[1518-03-02 00:10] falls asleep +[1518-04-12 00:01] Guard #389 begins shift +[1518-11-10 00:41] falls asleep +[1518-11-10 00:53] wakes up +[1518-11-21 00:15] falls asleep +[1518-09-14 00:22] falls asleep +[1518-07-17 00:55] wakes up +[1518-06-29 00:24] falls asleep +[1518-03-19 00:58] wakes up +[1518-09-16 00:36] falls asleep +[1518-09-17 23:51] Guard #3253 begins shift +[1518-04-17 23:50] Guard #2557 begins shift +[1518-08-26 00:56] wakes up +[1518-03-12 00:00] Guard #1123 begins shift +[1518-04-22 23:57] Guard #1699 begins shift +[1518-08-02 23:58] Guard #829 begins shift +[1518-05-03 00:44] wakes up +[1518-04-02 00:45] wakes up +[1518-11-02 00:52] wakes up +[1518-03-26 00:51] wakes up +[1518-06-06 00:01] Guard #2557 begins shift +[1518-08-02 00:53] falls asleep +[1518-03-19 00:05] falls asleep +[1518-07-28 00:37] falls asleep +[1518-11-06 00:55] wakes up +[1518-03-28 00:16] falls asleep +[1518-06-02 00:13] falls asleep +[1518-06-30 00:38] wakes up +[1518-03-24 00:35] wakes up +[1518-09-19 00:48] wakes up +[1518-10-19 00:17] wakes up +[1518-11-09 23:59] Guard #1861 begins shift +[1518-06-11 00:54] wakes up +[1518-08-11 00:52] wakes up +[1518-09-25 00:34] wakes up +[1518-08-29 00:18] wakes up +[1518-06-04 00:50] wakes up +[1518-05-03 00:28] wakes up +[1518-05-18 00:43] falls asleep +[1518-06-10 00:15] falls asleep +[1518-05-02 00:30] falls asleep +[1518-06-07 00:31] falls asleep +[1518-03-18 23:52] Guard #523 begins shift +[1518-10-21 00:40] wakes up +[1518-03-12 23:52] Guard #1699 begins shift +[1518-09-24 00:28] falls asleep +[1518-09-03 00:26] falls asleep +[1518-08-22 00:50] wakes up +[1518-06-10 00:00] Guard #523 begins shift +[1518-09-07 00:07] falls asleep +[1518-03-22 00:04] falls asleep +[1518-11-17 00:27] wakes up +[1518-03-29 00:58] wakes up +[1518-05-07 00:51] wakes up +[1518-03-14 00:04] Guard #463 begins shift +[1518-11-16 23:59] Guard #1699 begins shift +[1518-10-28 23:49] Guard #3253 begins shift +[1518-04-07 00:01] Guard #1399 begins shift +[1518-07-10 00:52] wakes up +[1518-03-01 00:52] falls asleep +[1518-06-09 00:47] falls asleep +[1518-05-25 00:35] falls asleep +[1518-06-18 00:59] wakes up +[1518-04-28 23:47] Guard #523 begins shift +[1518-04-10 00:27] falls asleep +[1518-07-01 00:44] wakes up +[1518-07-06 23:54] Guard #1123 begins shift +[1518-04-13 00:28] wakes up +[1518-06-14 00:38] wakes up +[1518-06-22 00:54] wakes up +[1518-03-01 23:58] Guard #1123 begins shift +[1518-08-12 00:54] falls asleep +[1518-10-05 00:59] wakes up +[1518-07-08 00:04] Guard #389 begins shift +[1518-10-22 23:57] Guard #389 begins shift +[1518-03-06 00:58] wakes up +[1518-03-12 00:49] wakes up +[1518-10-09 00:56] falls asleep +[1518-04-10 00:03] Guard #1699 begins shift +[1518-03-06 00:38] falls asleep +[1518-10-27 00:53] wakes up +[1518-08-30 00:04] Guard #653 begins shift +[1518-07-13 00:14] wakes up +[1518-05-28 00:57] wakes up +[1518-11-20 23:57] Guard #1861 begins shift +[1518-09-01 00:41] wakes up +[1518-10-18 00:56] wakes up +[1518-05-10 00:53] falls asleep +[1518-02-26 00:03] Guard #3469 begins shift +[1518-09-04 00:00] Guard #3253 begins shift +[1518-04-23 00:24] falls asleep +[1518-06-25 00:00] Guard #1399 begins shift +[1518-09-22 00:53] falls asleep +[1518-09-21 00:03] Guard #829 begins shift +[1518-06-16 23:58] Guard #2557 begins shift +[1518-11-01 00:15] wakes up +[1518-08-06 00:43] falls asleep +[1518-11-07 23:49] Guard #1123 begins shift +[1518-04-01 00:03] falls asleep +[1518-04-15 00:54] falls asleep +[1518-08-03 00:53] wakes up +[1518-04-25 00:01] Guard #1399 begins shift +[1518-09-14 00:46] wakes up +[1518-08-10 00:04] Guard #1069 begins shift +[1518-08-04 23:56] Guard #829 begins shift +[1518-04-19 00:40] wakes up +[1518-10-16 23:46] Guard #1069 begins shift +[1518-10-11 00:25] wakes up +[1518-07-16 00:59] wakes up +[1518-04-28 00:04] Guard #3463 begins shift +[1518-09-12 00:02] Guard #463 begins shift +[1518-06-28 00:45] falls asleep +[1518-10-15 00:48] falls asleep +[1518-06-21 00:00] Guard #523 begins shift +[1518-06-13 23:47] Guard #1069 begins shift +[1518-03-08 00:35] wakes up +[1518-04-21 00:22] wakes up +[1518-05-14 00:50] wakes up +[1518-06-03 00:36] falls asleep +[1518-07-28 00:07] falls asleep +[1518-03-25 00:47] wakes up +[1518-07-13 00:51] wakes up +[1518-07-24 00:01] falls asleep +[1518-06-23 23:58] Guard #1399 begins shift +[1518-07-27 00:12] falls asleep +[1518-04-20 00:53] wakes up +[1518-08-26 00:26] wakes up +[1518-03-10 00:57] wakes up +[1518-07-29 00:34] wakes up +[1518-06-05 00:43] wakes up +[1518-05-29 00:19] falls asleep +[1518-04-11 00:00] Guard #1123 begins shift +[1518-05-14 00:58] wakes up +[1518-04-02 00:02] Guard #1399 begins shift +[1518-08-14 00:09] falls asleep +[1518-09-22 00:56] wakes up +[1518-10-08 00:54] wakes up +[1518-11-05 00:03] Guard #829 begins shift +[1518-04-07 00:10] falls asleep +[1518-07-23 00:00] Guard #73 begins shift +[1518-08-12 00:58] wakes up +[1518-09-23 00:53] falls asleep +[1518-07-06 00:03] Guard #151 begins shift +[1518-08-26 00:45] wakes up +[1518-06-09 00:02] Guard #2333 begins shift +[1518-03-14 00:54] wakes up +[1518-06-11 00:47] wakes up +[1518-07-29 00:48] falls asleep +[1518-05-16 00:57] falls asleep +[1518-06-04 00:11] falls asleep +[1518-06-23 00:57] wakes up +[1518-10-31 00:26] falls asleep +[1518-10-23 00:46] wakes up +[1518-07-18 00:56] wakes up +[1518-03-08 00:03] falls asleep +[1518-05-15 00:30] falls asleep +[1518-03-23 00:32] falls asleep +[1518-06-25 00:58] wakes up +[1518-10-25 00:56] wakes up +[1518-04-11 00:06] falls asleep +[1518-10-09 00:01] falls asleep +[1518-05-26 00:25] wakes up +[1518-07-20 00:14] wakes up +[1518-08-22 00:04] Guard #73 begins shift +[1518-06-24 00:09] falls asleep +[1518-11-19 00:56] wakes up +[1518-04-06 00:03] falls asleep +[1518-09-06 00:32] falls asleep +[1518-07-07 00:00] falls asleep +[1518-07-25 23:54] Guard #73 begins shift +[1518-06-19 00:10] falls asleep +[1518-04-09 00:01] Guard #3371 begins shift +[1518-05-15 00:53] wakes up +[1518-07-18 00:41] falls asleep +[1518-10-24 00:27] wakes up +[1518-03-17 00:57] wakes up +[1518-05-08 00:01] Guard #151 begins shift +[1518-07-30 23:56] Guard #3463 begins shift +[1518-10-05 00:29] falls asleep +[1518-04-12 00:19] falls asleep +[1518-08-31 00:40] wakes up +[1518-05-27 00:47] falls asleep +[1518-09-02 23:58] Guard #523 begins shift +[1518-06-12 00:12] falls asleep +[1518-06-11 00:26] wakes up +[1518-05-10 00:58] wakes up +[1518-10-11 00:20] falls asleep +[1518-03-29 00:57] falls asleep +[1518-07-04 00:21] falls asleep +[1518-07-20 00:46] falls asleep +[1518-10-01 00:52] wakes up +[1518-11-06 00:47] falls asleep +[1518-04-29 00:38] falls asleep +[1518-07-02 00:35] falls asleep +[1518-06-05 00:24] falls asleep +[1518-09-16 00:43] wakes up +[1518-10-15 00:56] falls asleep +[1518-03-17 00:24] wakes up +[1518-06-08 00:04] falls asleep +[1518-07-12 00:55] wakes up +[1518-09-13 00:39] wakes up +[1518-03-20 00:09] falls asleep +[1518-03-21 00:15] wakes up +[1518-07-03 00:39] falls asleep +[1518-03-01 00:07] falls asleep +[1518-05-03 00:50] wakes up +[1518-05-10 00:32] wakes up +[1518-05-09 00:34] falls asleep +[1518-09-16 00:59] wakes up +[1518-03-29 00:52] wakes up +[1518-03-15 23:58] Guard #73 begins shift +[1518-06-26 00:23] falls asleep +[1518-09-03 00:55] wakes up +[1518-08-28 00:28] wakes up +[1518-07-13 00:17] falls asleep +[1518-09-28 00:46] wakes up +[1518-06-20 00:01] Guard #2557 begins shift +[1518-03-01 00:43] falls asleep +[1518-09-28 00:19] falls asleep +[1518-06-19 00:18] wakes up +[1518-10-19 00:16] falls asleep +[1518-11-18 00:40] falls asleep +[1518-06-01 00:01] falls asleep +[1518-07-17 00:28] falls asleep +[1518-09-16 00:57] falls asleep +[1518-07-11 00:44] falls asleep +[1518-05-18 00:04] Guard #1399 begins shift +[1518-08-07 00:17] falls asleep +[1518-05-14 00:38] wakes up +[1518-09-25 00:15] falls asleep +[1518-07-25 00:57] wakes up +[1518-05-20 00:29] wakes up +[1518-04-17 00:55] wakes up +[1518-11-02 00:33] falls asleep +[1518-08-15 00:46] wakes up +[1518-06-08 00:49] wakes up +[1518-11-03 00:10] falls asleep +[1518-05-02 00:38] wakes up +[1518-09-21 00:57] wakes up +[1518-08-04 00:51] falls asleep +[1518-03-06 23:56] Guard #3371 begins shift +[1518-07-15 00:59] wakes up +[1518-09-05 00:13] falls asleep +[1518-08-17 00:02] Guard #1399 begins shift +[1518-07-05 00:02] Guard #151 begins shift +[1518-05-17 00:02] falls asleep +[1518-10-11 00:58] wakes up +[1518-10-24 23:56] Guard #389 begins shift +[1518-11-09 00:52] wakes up +[1518-07-05 00:57] wakes up +[1518-04-30 00:54] wakes up +[1518-04-01 00:49] wakes up +[1518-06-11 00:53] falls asleep +[1518-06-23 00:01] Guard #1597 begins shift +[1518-03-17 00:02] Guard #1399 begins shift +[1518-10-15 00:53] wakes up +[1518-09-11 00:43] falls asleep +[1518-10-26 00:04] Guard #73 begins shift +[1518-08-02 00:02] Guard #463 begins shift +[1518-05-01 00:43] falls asleep +[1518-10-04 23:56] Guard #829 begins shift +[1518-11-01 00:23] falls asleep +[1518-09-18 00:02] falls asleep +[1518-06-16 00:50] wakes up +[1518-09-05 23:59] Guard #1069 begins shift +[1518-07-08 00:53] wakes up +[1518-05-24 00:51] wakes up +[1518-10-26 00:15] falls asleep +[1518-11-04 00:54] falls asleep +[1518-05-10 00:46] wakes up +[1518-04-18 00:53] wakes up +[1518-05-03 00:08] falls asleep +[1518-06-28 23:58] Guard #1069 begins shift +[1518-07-31 00:24] wakes up +[1518-11-19 00:39] wakes up +[1518-07-12 23:58] Guard #2333 begins shift +[1518-07-22 00:57] wakes up +[1518-03-28 23:56] Guard #829 begins shift +[1518-04-30 23:50] Guard #2333 begins shift +[1518-05-07 00:00] Guard #1759 begins shift +[1518-06-26 23:56] Guard #151 begins shift +[1518-03-18 00:28] falls asleep +[1518-10-02 00:57] falls asleep +[1518-03-13 00:51] falls asleep +[1518-05-03 23:46] Guard #3469 begins shift +[1518-10-19 00:00] Guard #523 begins shift +[1518-09-13 00:52] falls asleep +[1518-04-11 00:07] wakes up +[1518-09-08 00:25] falls asleep +[1518-10-11 00:48] falls asleep +[1518-04-27 00:37] falls asleep +[1518-09-11 00:01] Guard #2333 begins shift +[1518-08-25 00:40] wakes up +[1518-03-24 00:51] wakes up +[1518-02-28 00:17] falls asleep +[1518-04-25 00:34] falls asleep +[1518-07-16 00:57] falls asleep +[1518-05-29 00:24] wakes up +[1518-07-21 00:57] wakes up +[1518-04-06 00:44] wakes up +[1518-04-17 00:13] wakes up +[1518-10-30 00:41] falls asleep +[1518-06-30 00:49] falls asleep +[1518-07-14 00:45] wakes up +[1518-09-04 00:11] falls asleep +[1518-05-26 00:11] falls asleep +[1518-11-11 00:58] wakes up +[1518-07-10 00:16] falls asleep +[1518-10-14 00:58] wakes up +[1518-10-07 00:37] falls asleep +[1518-04-22 00:02] Guard #1399 begins shift +[1518-09-20 00:57] wakes up +[1518-06-03 00:07] falls asleep +[1518-07-12 00:50] falls asleep +[1518-05-01 00:55] wakes up +[1518-04-17 00:27] falls asleep +[1518-07-23 23:46] Guard #1597 begins shift +[1518-09-28 00:41] falls asleep +[1518-11-06 00:00] Guard #829 begins shift +[1518-04-14 00:47] falls asleep +[1518-03-18 00:48] wakes up +[1518-06-22 00:57] falls asleep +[1518-09-09 00:21] wakes up +[1518-03-02 00:57] wakes up +[1518-08-20 00:33] wakes up +[1518-05-29 23:50] Guard #1399 begins shift +[1518-03-02 23:56] Guard #1399 begins shift +[1518-04-11 00:46] wakes up +[1518-04-19 00:26] wakes up +[1518-07-09 00:59] wakes up +[1518-11-08 00:05] falls asleep +[1518-07-22 00:04] Guard #1913 begins shift +[1518-09-04 00:39] falls asleep +[1518-04-29 00:34] wakes up +[1518-04-05 00:00] Guard #523 begins shift +[1518-05-20 00:01] falls asleep +[1518-09-15 00:42] falls asleep +[1518-03-25 00:02] Guard #1699 begins shift +[1518-08-08 00:00] Guard #3253 begins shift +[1518-04-10 00:41] wakes up +[1518-04-07 23:59] Guard #829 begins shift +[1518-09-02 00:58] wakes up +[1518-10-05 00:34] wakes up +[1518-06-21 23:57] Guard #1699 begins shift +[1518-07-30 00:49] wakes up +[1518-02-25 00:54] falls asleep +[1518-03-22 00:48] wakes up +[1518-10-01 23:50] Guard #1699 begins shift +[1518-11-17 00:38] falls asleep +[1518-06-27 00:56] falls asleep +[1518-03-14 00:49] falls asleep +[1518-09-01 23:58] Guard #389 begins shift +[1518-08-04 00:42] wakes up +[1518-05-12 00:04] falls asleep +[1518-03-30 00:47] falls asleep +[1518-06-20 00:26] falls asleep +[1518-03-19 23:56] Guard #3463 begins shift +[1518-03-24 00:01] Guard #1123 begins shift +[1518-11-14 00:28] falls asleep +[1518-07-18 00:03] Guard #3463 begins shift +[1518-10-27 00:18] falls asleep +[1518-02-24 23:57] Guard #1913 begins shift +[1518-09-05 00:01] Guard #151 begins shift +[1518-07-07 00:23] wakes up +[1518-11-05 00:53] wakes up +[1518-05-24 00:03] falls asleep +[1518-09-22 23:56] Guard #1913 begins shift +[1518-05-14 00:00] falls asleep +[1518-03-13 00:55] wakes up +[1518-09-11 00:40] wakes up +[1518-07-08 00:44] falls asleep +[1518-07-31 00:59] wakes up +[1518-08-13 00:40] wakes up +[1518-09-02 00:41] wakes up +[1518-09-26 00:17] falls asleep +[1518-08-23 00:07] falls asleep +[1518-07-15 00:12] falls asleep +[1518-03-13 00:00] falls asleep +[1518-03-04 00:39] falls asleep +[1518-08-28 00:57] falls asleep +[1518-03-28 00:45] falls asleep +[1518-07-12 00:34] wakes up +[1518-02-25 00:56] wakes up +[1518-10-08 00:30] falls asleep +[1518-02-28 00:52] wakes up +[1518-05-10 00:00] Guard #1861 begins shift +[1518-11-08 00:40] wakes up +[1518-08-31 00:45] falls asleep +[1518-06-20 00:43] falls asleep +[1518-06-21 00:39] wakes up +[1518-07-20 00:57] wakes up +[1518-08-29 00:02] falls asleep +[1518-03-19 00:55] falls asleep +[1518-06-01 23:56] Guard #73 begins shift +[1518-10-31 23:58] Guard #3463 begins shift +[1518-06-25 00:51] falls asleep +[1518-10-17 00:00] falls asleep +[1518-11-12 00:20] falls asleep +[1518-07-27 00:26] wakes up +[1518-03-21 00:00] Guard #1759 begins shift +[1518-08-01 00:40] falls asleep diff --git a/day4p1/main b/day4p1/main new file mode 100755 index 0000000000000000000000000000000000000000..baa91725296a6439e62130451c02354a0863fb33 GIT binary patch literal 17920 zcmeHPeQ+E_cJI~tLl}7_j0^$}SilN)z>92bN47DnWRE?fWMhnF!x=NIwJT}k)vmH1 z{-A)E6DBN+Kq0P+FEJH`P{g^)hc59ECs%g}%vpw{h#-MeE=Nj$p>~mz(*Z{o2fX>c z?tZJ;v6f2yNvcxnvi9}+^?R@1yzc3q>FM@w8m;RqTrR=MEp8RW4P2xUzb-g%tImM< zMWeV7zgLMX#VqhMB&N#!il9`bu8LAxsc|Q&FRM z(wj+H%{%GabCeuYE-%*SRpr7#^V)x=c0G#C$YP~8vZj<)QUH*=nzA05BfT-LH>UNN zPLM-LOgWwu6Z(5q`{ShRNC}B4$x_<|u?3V)QEjknMI z;Dcu#jBLBOF!~#Je`Dn*87iJKT?a$+rYLzD*i<-S-YMiam$CDwW$fHmM!usAzP*f{ zco{rX#?E_XI<4+NBob?HKrRu1WveG1>Ip@IMLrRWCyPu+JQT7z zQjrKD$#{ELth)zUo6$%twmap(!tmD$N5j$%X{9<#m83v4w2uUAwt^wl5!+u1hNFp) z^oV?+Ftt;BR)~%m+!j5dcsv$IKoE=e-Bx?oZmS~@j);!-NGuT&i9~xK+94821Tro< zdg9?|vO{!+k{A^!jP3gZR!2A*h=d=2FkHpuSr%2IgWDYlM}-v%29g03>`EjQ4hSLJ z(Av_x)>`UYR?IE+EvJ5?MpF89+w#QoA4w56$yZ=3Md!dDVf4FD_92oJqBb0!OV+-x zvDD?^3rPPZQbFSRlKWG??v$f?K4jdl@e#jN6O1!Ia+|_wOy{YVkWm}X<2&JFHe5dv z5G=AbyjmjaXTpYGZo~67{0bXB=2r|oi+EL5{?_>wGaE#QKmuMHPI2V4(64eN&vP;% z4SxC+f^hk~BRL@&{VGGaectxla4O?u`c;lFjwvCV{q(Esqrr;lZokTsynY0e!2LG7 zN{PtdE*p-HP)t2G+*3q_*k{A}S%QiW*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000000..6831698 --- /dev/null +++ b/day4p1/main.c @@ -0,0 +1,210 @@ +#include + +#include + +enum action { + ACTION_BEGIN, + ACTION_SLEEP, + ACTION_WAKE +}; + +struct event { + unsigned year; + unsigned month; + unsigned day; + unsigned hour; + unsigned minute; + enum action action; + unsigned guard; +}; + +gint compare_event(gconstpointer a, gconstpointer b) +{ +#define _(x) (int)( \ + (x)->year * 12 * 32 * 24 * 60 + \ + (x)->month * 32 * 24 * 60 + \ + (x)->day * 24 * 60 + \ + (x)->hour * 60 + \ + (x)->minute) + return (_((struct event *)a) - _((struct event *)b)); +#undef _ +} + +GSList *parse_events(const char *fname) +{ + FILE *f = fopen(fname, "r"); + if (!f) { + perror(fname); + return NULL; + } + + GSList *list = NULL; + + char *line = NULL; + size_t line_len = 0; + while (getline(&line, &line_len, f) != -1) { + g_strstrip(line); + + // Find the action text + char *action = line; + while (*action && *action++ != '['); + while (*action && *action++ != ']'); + if (*action) *action++ = '\0'; // Expect a minimum of one space + if (!*action) { + fprintf(stderr, "Warning: ignoring '%s': No action found.\n", line); + continue; + } + g_strstrip(action); + + struct event *event = g_malloc0(sizeof(struct event)); + + // Haha what is proper parsing + sscanf(line, "[%u-%u-%u %u:%u]", + &event->year, + &event->month, + &event->day, + &event->hour, + &event->minute + ); + + // Basic sanity check + if (event->month >= 12 || + event->day >= 32 || + event->hour >= 24 || + event->minute >= 60) { + fprintf(stderr, "Warning: ignoring '%s': Invalid time.\n", line); + g_free(event); + continue; + } + + // Figure out the action + if (strcmp(action, "falls asleep") == 0) { + event->action = ACTION_SLEEP; + } else if (strcmp(action, "wakes up") == 0) { + event->action = ACTION_WAKE; + } else { + sscanf(action, "Guard #%u begins shift", &event->guard); + if (!event->guard) continue; + } + + list = g_slist_prepend(list, event); + } + + free(line); + fclose(f); + + // We can't do much without information about the guards + unsigned current_guard = 0; + list = g_slist_sort(list, compare_event); + for (GSList *l = list; l; l = l->next) { + struct event *event = (struct event *)l->data; + if (event->action == ACTION_BEGIN) { + current_guard = event->guard; + } else { + event->guard = current_guard; + } + } + + return list; +} + +unsigned find_sleepiest_guard(GSList *events) +{ + // Figure out which guard has slept the most + // Assumptions: + // - All sleep/wake hours are 00 + // - Every sleep action is coupled with a wake action from the same guard + // According to the puzzle these are safe assumptions to make, + // and it's not worth my time to do everything "properly" right now. + GHashTable *table = g_hash_table_new(NULL, NULL); + + unsigned start_time = 0; + for (GSList *l = events; l; l = l->next) { + struct event *event = (struct event *)l->data; + + if (event->action == ACTION_SLEEP) { + start_time = event->minute; + } else if (event->action == ACTION_WAKE) { + unsigned time = event->minute - start_time; + + unsigned current_time = GPOINTER_TO_UINT(g_hash_table_lookup(table, GUINT_TO_POINTER(event->guard))); + current_time += time; + g_hash_table_insert(table, GUINT_TO_POINTER(event->guard), GUINT_TO_POINTER(current_time)); + } + } + + unsigned sleepiest_guard = 0; + unsigned sleepiest_guard_time = 0; + + gpointer key, value; + GHashTableIter iter; + g_hash_table_iter_init(&iter, table); + while (g_hash_table_iter_next(&iter, &key, &value)) { + unsigned guard = GPOINTER_TO_UINT(key); + unsigned time = GPOINTER_TO_UINT(value); + printf("Guard #%u: %u minutes\n", guard, time); + if (time > sleepiest_guard_time) { + sleepiest_guard = guard; + sleepiest_guard_time = time; + } + } + + g_hash_table_destroy(table); + return sleepiest_guard; +} + +unsigned find_sleepiest_minute(GSList *events, unsigned guard) +{ + // Figure out which is the guard's most slept minute + // Also assuming all sleep hours are at 12am + unsigned char slept[60] = {0}; + + unsigned start_time = 0; + for (GSList *l = events; l; l = l->next) { + struct event *event = (struct event *)l->data; + if (event->guard != guard) continue; + + if (event->action == ACTION_SLEEP) { + start_time = event->minute; + } else if (event->action == ACTION_WAKE) { + for (unsigned i = start_time; i < event->minute; i++) { + if (slept[i] >= UCHAR_MAX) continue; + slept[i]++; + } + } + } + + unsigned slept_minute = 0; + unsigned slept_minute_count = 0; + for (unsigned i = 0; i < 60; i++) { + if (slept[i] > slept_minute_count) { + slept_minute = i; + slept_minute_count = slept[i]; + } + } + + return slept_minute; +} + +int main() +{ + GSList *events = parse_events("input"); + for (GSList *l = events; l; l = l->next) { + struct event *event = (struct event *)l->data; + printf("[%04u-%02u-%02u %02u:%02u] %u (%u)\n", + event->year, event->month, event->day, + event->hour, event->minute, + event->action, event->guard); + } + + unsigned sleepiest_guard = find_sleepiest_guard(events); + printf("Sleepiest guard: %u\n", sleepiest_guard); + + unsigned sleepiest_minute = find_sleepiest_minute(events, sleepiest_guard); + printf("Most slept minute: %u\n", sleepiest_minute); + + printf("Result hash: %u\n", sleepiest_guard * sleepiest_minute); + + g_slist_free_full(events, g_free); + return 0; +}