start day 16
This commit is contained in:
parent
7a856ddaa6
commit
d6312a6865
1 changed files with 42 additions and 0 deletions
42
src/2024/day16.lisp
Normal file
42
src/2024/day16.lisp
Normal file
|
@ -0,0 +1,42 @@
|
|||
|
||||
(defpackage :aoc/2024/16
|
||||
(:use :cl :aoc :alexandria :trivia :lla)
|
||||
(:export
|
||||
#:sample-data
|
||||
#:sample-data2
|
||||
#:part1
|
||||
#:part2
|
||||
))
|
||||
|
||||
(in-package :aoc/2024/16)
|
||||
|
||||
|
||||
(defun parse-line (line)
|
||||
line)
|
||||
|
||||
|
||||
(defun parse-input (lines)
|
||||
(mapcar #'parse-line lines))
|
||||
|
||||
(defparameter input-text (test-input 2024 16))
|
||||
(defparameter input-data (parse-input input-text))
|
||||
|
||||
(defparameter sample-text (aoc:split-lines ""))
|
||||
(defparameter sample-data
|
||||
(parse-input sample-text))
|
||||
|
||||
(defun part1 (data)
|
||||
(length data))
|
||||
|
||||
(defun part2 (data)
|
||||
(length data))
|
||||
|
||||
(defun solve-day ()
|
||||
(format t "part1: ~A~%" (part1 input-data))
|
||||
(format t "part2: ~A~%" (part2 input-data)))
|
||||
|
||||
(defun submit ()
|
||||
(let ((p1 (part1 input-data))
|
||||
(p2 (part2 input-data)))
|
||||
(if p1 (submit-part1 2024 16 p1))
|
||||
(if p2 (submit-part2 2024 16 p2))))
|
Loading…
Reference in a new issue