aboutsummaryrefslogtreecommitdiff
path: root/src/day12pt1.rs
diff options
context:
space:
mode:
authorAleksa Vuckovic <aleksa@vuckovic.cc>2023-12-16 06:55:42 +0100
committerAleksa Vuckovic <aleksa@vuckovic.cc>2023-12-16 06:55:42 +0100
commit457c2af984ac34e6615a8b49b953c4499809255c (patch)
tree1cbfbb97d9ec829b7924a20c2d3ab22f8209cb15 /src/day12pt1.rs
parentb2c6978311010cd522d2680e7078e496fab28744 (diff)
day16
Diffstat (limited to 'src/day12pt1.rs')
-rw-r--r--src/day12pt1.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/day12pt1.rs b/src/day12pt1.rs
new file mode 100644
index 0000000..bdf4027
--- /dev/null
+++ b/src/day12pt1.rs
@@ -0,0 +1,13 @@
+pub fn main() {
+ let txt = std::fs::read_to_string("./input/day12.txt").unwrap();
+ let input = txt
+ .lines()
+ .map(|s| s.split(" ").collect::<Vec<_>>())
+ .collect::<Vec<Vec<_>>>();
+
+ for line in input {
+ let s = line[0];
+ let n = line[1].split(",").map(|s| s.parse::<u64>().unwrap()).collect::<Vec<_>>();
+ println!("{} {:?}", s, n);
+ }
+}