Compare commits

..

3 Commits

Author SHA1 Message Date
dd3d582b58 adding input 2020-12-18 14:04:36 -08:00
94a85094bc Implemented 18 part 1
=
2020-12-18 14:04:28 -08:00
d2bfa9043e finished day 3 2020-12-03 17:12:48 -08:00
128 changed files with 1090 additions and 48 deletions

372
18.input Normal file
View File

@ -0,0 +1,372 @@
(2 + 6) * 2 + 2 + 4
6 * 2 * 6 + (8 + 8 * (5 + 4 * 7 + 6 + 6 + 3)) * 8
2 * 7 * 3 * 6 + 2
(2 * 4 + 2 + 8) * 4 + 7 + 6 * 7
7 * ((7 + 4) + 7 * (3 + 4 * 8 + 7 * 8) * 2 * (4 + 3 + 9 * 5)) + (9 * 6) + 8
7 + 3 * (9 * (3 * 7 + 8 * 4) + (4 * 5 + 7)) * 9
9 + 9 + 3 + 7 * 3
(4 + 9) + 8 + 4 * 9 * (6 + 4 * 4 * 3 + 9 + 4)
5 * (6 * 4 * (8 * 4 * 4 * 9) + 6) * 7 + (8 + 3 + (8 * 3 * 6) * 5 * 5)
6 * 6 * (6 + 6 + 6 * (8 * 4 * 2 + 8 * 6) + 4) + 3
5 * 4 + 3 + (2 + 6) * 8 * 4
(8 + (3 * 7 * 4 + 4) * 2) + (8 * 8 * 4 + 6 * (8 + 9 + 7 + 9 + 5 + 3) * 4) * 5 * 4 * 3
9 * 7 + 6 * 9 + (3 * (7 * 5 * 6 * 3 + 3 * 8)) * 7
5 * 8 * 7 * 9 + 5 + (9 * (4 + 4 * 2 + 9 * 7) * 3)
(6 * 3 + 9 + (2 * 4 + 4 * 3) + 3) + (9 + (5 + 4) + 8) + 6 * 9
6 * (8 * (2 + 3 * 6 + 6 + 9) + (7 + 6 + 2) * 9 * 9)
(7 * (8 + 3 * 8 + 5 + 2 + 2) * (9 * 9 * 3 + 4 + 5) + 5 + 6 + 8) * 5 * (5 + (6 + 3 + 4 * 3 + 6) * 3) * 8 * 3
9 * 8
7 + ((6 * 7 + 5 + 8) * (5 * 9 + 9))
3 * 8 + 7 + 7 + (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 * 2 + 7))
8 + 2 * 5 * (2 * 7 + 9 + 3 + (7 * 2) * 4)
4 + (9 + 3 + 5) * (6 * 3 + (6 + 8 * 2) * 5 * 4) + 3
8 * 2 * (5 * 9 + 4) + 5 + ((7 * 7 * 2 + 5 + 3 * 9) * 8) * 9
2 + 8 + 8 + 4 * ((7 + 9 * 7 + 5) * 5 + 2 * 9 * (2 + 2 + 7 * 7 + 4) * 3) + 5
(7 * 8 + 8) * 8
8 * 6 + 8 + 3 + 2 + (8 + 9 + 2)
6 + 4 * 9 * ((9 + 9 * 2) * (5 * 7 * 3 + 4 * 6 * 6))
(9 + 4 + 7) + 2 + ((8 * 8 * 8 + 7) + 3 * 3 + 8 + 5 * (9 * 7 + 3 + 2 + 2 + 9))
(9 * 2 + (6 * 4 * 8 * 9 * 9 + 5) * 2) * 7 + 4 * (6 + 7 * 5 * 5 * 6 * (9 * 3 + 8))
8 * (7 + 5 * (8 + 3 + 9) + 6 + 6) + 2 + (4 * 2 + 8 * (3 * 4) + 7) + (2 + 4) * 8
(6 * 4 * 7 * 7 * 6 * (5 + 6 + 4 * 8 * 9)) + 7 + (8 + 3 + 6 + 8) * 8 * 5
4 * (4 + (7 + 3 * 2 + 9)) * 3 + 6 * 7 * 4
9 * (8 * 6 + 7 * 9 + 4 + 9) * 7 * 4 + 8
((8 * 7 * 6 + 4) * (4 + 9 * 5 + 8 * 2 * 7) * 2 + (6 * 3 + 9 + 6 + 5 * 7)) * 4
5 + 2 * ((7 * 8 * 6 * 4) * 4) * 4 * 4 + 9
5 + (2 + 2 + 3 * 5) + 2 * 2 * (7 * 7 * 2 + 4)
8 * (7 + (9 + 5 * 6 * 6) * (6 + 5 + 7)) * 3 * 6
(7 * 7 * 2 + 3 + 9) + 3 + 7 * 4 + 8 + 4
5 * (7 * 6 + (8 + 5 + 2) + 7 * 7) * (6 * (2 + 5 * 4) + 4 * 7 + 4 * (6 + 7)) + 2

323
3.input Normal file
View File

@ -0,0 +1,323 @@
.##.#.........#.....#....#...#.
.#.#.#...#.......#.............
......#..#....#.#...###.......#
.......###......#.....#..##..#.
..#...##.......#.......###.....
....###.#....###......#....#..#
......#..#....#...##...........
..#..#....#...#.....####.......
...#........#.#.......#..#...#.
......#...#........#...#..##...
#..#........#............#...##
..#..#.#....#...........#...###
#.#..#...........#.##.#.#....#.
.#.#....#...##.....#...........
.....##....#...#..............#
...#....#...#.#.#.#...#........
#....#....#.#.#..#....#..#..#..
.................#..#.....#....
#..###...#.#..#.#......#.......
...#..........#......#....#....
.#.#.........##..#.......#...#.
.#..........#...#..#...........
....##.#.......................
.......#...........#...#.......
...#...#..##...#....###..#....#
....#.#.....##...##.#.#........
...........#.#..#.#......#..#..
.....#.....#....#...#........#.
..#......#..#.........#.....#..
.........................#...#.
#...#...#....#........##....#..
#..#.#.............#..........#
.#.........#.....#..#.#.#..#.#.
#...#..#.......####.#....##....
##...##..#.#.#...#.#.....#..#.#
.#..#....#.##........#...#....#
#...#..##.#....##..#..#.#......
.#........#.....#.#....##.##.#.
...#...#........#..#.##.##.....
....................#.#.#.#...#
..####.#..##...#....#.....##...
#......#.....#.#......#.#..#.##
..#.....#..#...........##.#....
#....#........#............#...
..##....#..............#......#
..#......#.#.......####......#.
..............##....#....##.#..
.#...............#....#....#.#.
..#.#.#..#.......##.#..........
.#...#.......#.#....#.##.......
.....#.##...#...........#.#....
..#.#..#...#..##...#.#.......##
.#.....#....#.#......#.#.......
....##.........#.#.............
.......##.......#..............
..........#......#......#....##
..##.....#..#.#..........#.....
...#....#.......#....##........
.......#...........#...........
...#.#......#.#........#....#..
.....#...........#.#.#...#.#..#
.#.#...#.#.#..........#.....###
#........#...#.................
...##.....#.....#..#..#.......#
......##...........#..#....##..
.........#............##...#...
.....#.....##...##.............
.#....#..#.#.#.#...#..#..#.....
.....#..#.#..#....#..#.........
....#.....#......#...#.........
#..#..#.................#......
.###.....#...#.#........##.#...
..#...#....#.##..#.....#.#....#
..#...##.................#.#...
....##..........#..#..#..#....#
....#..##....##.....#.#....#...
.#.#.#.....##........#.##..##.#
....#..#......#..#........#....
.......#.....###.#....#.......#
#....#.......#......##.#.......
.##.#.........#.#..##..#....##.
......#........#.#....#...#....
.####.....#.........#.#......##
##....#......#....#..#.#....##.
...........###.#.....#..#......
.......#...........#...........
........###....#..#.#..........
....#........#......#..........
.........#......#..............
...#...............#......#...#
....#..##...#.........#...#....
##........#.#....#......###....
....#.......................#..
#................#.#..#......##
...#.#.....#...#...........#.##
.#....#.##......#...##.#....#..
#...#....#..............#..#..#
.......#....#.##............#.#
.....#.#.......#.#...#.........
...#.....#..##...##...#........
..#.......#..####..#..#...#....
#.#................##...##.#..#
.....#.....##.#.....#......#..#
....#.#...#.........#.........#
..#......#............#.....#..
.....#..........#.#..#..##...##
........#................#.#...
#...#.#....##...###...#.#......
.............##.#..##..........
#..#......#...........#......#.
#.#....#..........#.##....###..
.............#.........#....#..
#........#..#.#..#...#....#....
..............#..............##
.....#...#..............#.##...
#...##..#...........#..........
..#....#...#.#........#..#.#..#
..##......#...............#....
....#...#..###..#......###.#...
.......##..#.#........#....#...
..##...#.......#...#...........
.#.......#.....#.#...##..#....#
.............#.......#.#.#....#
#.......#..#..#...#.#......##..
#.##..#..#..#....##.#...###.#.#
...##...#..#..#........#.#..#..
#....##........................
##...#...#......#.#.....#..#...
......#............#....#......
#......#.......#.......##.#....
..................#..#..#.#....
..#..................##.#......
..##........#.#.....##..#..#.#.
#....#..............#....####..
#..#..........................#
..#.#.#.#....#.......#....#.#..
.....#.#........#..........#.#.
........#.....#.......#........
#.....#....#.###.....#.......#.
.....##.#...#.#..#...#.#.#.....
......##...#.#...##..........#.
.#............#.....#..#....#..
.#................#.#..#.......
....................##...##....
#.......##...#.....#..#........
.##....#.#.#.#...........#...#.
..#.#..#.#.........#...........
...#......#.....#...##.........
..........#.#.....###.#........
.............#.....##..........
.........#...####........#.####
...................#....#......
.....#.........#.#....#..#...#.
.##...#.......##.#...#.#.#..#..
.....##........#....#...#.##.#.
#...#...#.#....#..............#
#..#.##.............#..........
..#...#..#.#.##..............##
#......#.#...##..........#.##..
.##.#...#...#.........#.#......
......#........##.#..#.........
#..#.......#......#.#..#.#.....
.#..#...........#.#.##.....#...
.....................#..#.#....
........#...##......#.....##...
#.............#...##....##....#
#.#...........#....##.#......##
.....#.....#.#..........###..#.
....#...#....##....#..##.......
.#....#....#.......#.#.....#...
.#...#.......##...##........#..
......##.......#.##.#.###......
....##.......#......#..........
...................#..##.......
......................#...##...
...##....#.#..#..#.............
.#......##..........#...#......
....##..#....#..#...#...####.#.
...#.......#.......#........#.#
#.........#..#...#...##...#.#.#
....#...#.......#...#....#.....
...#.....#.##..##.#.......##.##
.......#....#........#.........
.....#...#....#..#....#....#...
.##....#...#........#...#.#...#
.......##............#..#...#..
#.#...#....#......#.#..........
.#.##...........#........#.....
.#....#.............#.#.##.....
#.......###..#...###.........#.
#..#.#.......#.........#...#..#
..........#......#........#...#
.#.#...#.##.......##...........
.....#.........#.....#.........
.........#.........#....##.#..#
.#.......##..##..#.....#...#...
.#.....##...#..#..............#
..##...#..#..#.#...#..........#
.#.......####......#......####.
##..##........#.....#........#.
..##.#..#.#....................
...........#..#...##....##.....
..#.#........#.........#....##.
..#...#..##..###.#..###........
......#..#.............#..##...
.##.........#.#..#...#.##.###..
.#...............#...........#.
.#....#........#....#........##
..#####.#.#..#.#........##...#.
###....#....#...#..............
.....#...##............#...#...
##...........##.#.##.....#.....
..............#..#.....#...#...
...................#...........
#..........##.........#........
...#.........#..#.....#..#..#..
....###.#......#......##....#..
#......#..........#...#........
...#.#...#..#..........##......
.....##.....#.#............##..
..#..#.###....#.#.#...##....#..
...#........#....##.......#....
.#.............#..##.......#...
..#.#..###..#.....#...##.......
.........#......##...#.#..#....
.............#....##....#.#....
#..#...#....#.#...#......##....
.............#.#......#.....###
#.##....#........#.............
.....#...#.####...#.....#......
....#....###....##.......#.....
..#....##..#....#.#.......#....
...#.....#....#.........#......
.#......#.#....#.#........#....
.......#......#.....#.#..#.....
#......#.........##.##.#...#...
..#.###...................#....
....#..#....##.#........#....#.
...........#..........#......#.
.#..#.#...###..........#..#...#
...#...##..#....#...#..........
.#........#.................##.
....#.......##....#...#........
#.#...##.##...#.#.......#...#..
.....#.#.##.#......#..#..##....
.....##...#.#.....#...#........
#.#.......#..#..........##.....
................#......#..#.#.#
#......#...#...................
...#.....##.#.........#.#..#..#
...#..##..##.......#....#......
....##...#....#..#...........#.
..#..#......#...#..#...........
...#.##....#...##.......#......
.......#....#..#..##..#..#....#
.#.................#.#...#.##..
.....#..................#..#.#.
...#......##...#...........#...
..#.........#....#..#...#.....#
..#...#.....#.........##.#.....
.....#.#....##...............#.
....#...#............#.........
.....#.....###............#....
..#.#.#.......#....#...........
...........##...##...#.......#.
.........###.#......#..........
.#.......#....#.....#.##..#...#
..#..................#..###....
..#....#...#......##.........#.
........#..#........#.........#
.#..#......#.........#.........
...#..##.....#....#....#.....#.
......#.#............###.....##
.......#........#.......#.#....
..#.............#..............
.............##..#.#.#....#....
.................#....#.#......
##..#.#.......#....#.....#.....
.##............##.#.......#.#..
#..#...........##......#.......
.##......#####..##.#....#.#....
.......##.....#...#........#...
.#.#.....##....#..#....#..#...#
............##.#.....##.#......
........##...###.#......#......
......#..#.#...#..#............
.........#...........#......#..
.#.........#............##.....
.#..#..#...#.#.............#...
......#.#..##...#.#...........#
#.##.......#...#.........#.....
.....#..#............#....##...
.#......#........#.............
..#...#....#..#.......###......
....#.......###.#.#...........#
.............#...##............
.##.#.#.#...........#...#....#.
............##.........#......#
...............#......#...#....
...#.....#..###..#...........#.
.#........#.....##........#.#..
....#.#.......#..#..#...##.#.#.
.......##...........#...#......
....#.#..##......#.......#.....
..#........#.#......#.#........
........#....#..#....#..##.....
.#.........##..........#.#.....
..##...##.....##......##..#....
.###.....##...........##.#...##
...#................#.......#..
#.......#.#.#..#.#.##..#...#...
.#.#.......#..#................
..#.#.#......#............#....
#.....#.###..#.#...#...........
#...........#..........#.#.#.##
..#.#...#......##.....#........
........#.......#.#...#...#....
..#..........#......###......#.
..........##.#....#.....#.##...
..#.....#......#.........#..##.
.#...#........#..#.#..#...##..#
..###........#......#.#........
..#.##.#....#.#....#.#...#.....

104
Cargo.lock generated
View File

@ -5,6 +5,7 @@ name = "advent"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"nom",
] ]
[[package]] [[package]]
@ -12,3 +13,106 @@ name = "anyhow"
version = "1.0.34" version = "1.0.34"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf8dcb5b4bbaa28653b647d8c77bd4ed40183b48882e130c1f1ffb73de069fd7" checksum = "bf8dcb5b4bbaa28653b647d8c77bd4ed40183b48882e130c1f1ffb73de069fd7"
[[package]]
name = "arrayvec"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
[[package]]
name = "bitflags"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
[[package]]
name = "bitvec"
version = "0.19.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7ba35e9565969edb811639dbebfe34edc0368e472c5018474c8eb2543397f81"
dependencies = [
"funty",
"radium",
"tap",
"wyz",
]
[[package]]
name = "cfg-if"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "funty"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ba62103ce691c2fd80fbae2213dfdda9ce60804973ac6b6e97de818ea7f52c8"
[[package]]
name = "lexical-core"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db65c6da02e61f55dae90a0ae427b2a5f6b3e8db09f58d10efab23af92592616"
dependencies = [
"arrayvec",
"bitflags",
"cfg-if",
"ryu",
"static_assertions",
]
[[package]]
name = "memchr"
version = "2.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
[[package]]
name = "nom"
version = "6.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88034cfd6b4a0d54dd14f4a507eceee36c0b70e5a02236c4e4df571102be17f0"
dependencies = [
"bitvec",
"lexical-core",
"memchr",
"version_check",
]
[[package]]
name = "radium"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8"
[[package]]
name = "ryu"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
[[package]]
name = "static_assertions"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "tap"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36474e732d1affd3a6ed582781b3683df3d0563714c59c39591e8ff707cf078e"
[[package]]
name = "version_check"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed"
[[package]]
name = "wyz"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214"

View File

@ -7,4 +7,5 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
anyhow = "1.0" anyhow = "1.0"
nom = "6.0"

View File

@ -36,65 +36,51 @@ Of course, your expense report is much larger. Find the two entries that sum to
do you get if you multiply them together? do you get if you multiply them together?
*/ */
use anyhow::Result; use std::fs::{File};
use std::collections::HashSet; use std::collections::HashSet;
use std::fs::File;
use std::io::{BufRead, BufReader}; use std::io::{BufRead, BufReader};
use anyhow::Result;
struct Entries { fn find_triple(target: i32, list: &Vec<i32>, set: &HashSet<i32>) -> i32 {
list: Vec<i32>, for i in list {
set: HashSet<i32>, let product = find_pair(target - i, list, set);
if product > 0 {
return product * i;
}
}
0
} }
impl Entries { fn find_pair(target: i32, list: &Vec<i32>, set: &HashSet<i32>) -> i32 {
fn find_triple(&self, target: i32) -> i32 { for i in list {
for i in self.list.iter().copied() { if i > &target {
let product = self.find_pair(target - i); break
if product > 0 {
return product * i;
}
} }
0 let val = target - i;
} if set.contains(&val) {
return i * val;
fn find_pair(&self, target: i32) -> i32 {
for i in self.list.iter().copied() {
if i > target {
break;
}
let val = target - i;
if self.set.contains(&val) {
return i * val;
}
} }
0
}
}
impl std::iter::FromIterator<i32> for Entries {
fn from_iter<T>(iter: T) -> Self
where
T: IntoIterator<Item = i32>,
{
let mut list = Vec::new();
let mut set = HashSet::new();
for value in iter {
list.push(value);
set.insert(value);
}
list.sort();
Entries { list, set }
} }
0
} }
fn main() -> Result<()> { fn main() -> Result<()> {
//let contents = fs::read_to_string("1.input").expect("Couldn't read \"1.input\""); //let contents = fs::read_to_string("1.input").expect("Couldn't read \"1.input\"");
let entries: Entries = BufReader::new(File::open("1.input")?) let file = File::open("1.input")?;
.lines() let reader = BufReader::new(file);
.filter_map(|line| line.ok()?.parse().ok())
.collect();
println!("Pair is {}", entries.find_pair(2020)); let mut list: Vec<i32> = Vec::new();
println!("Triple is {}", entries.find_triple(2020)); let mut set: HashSet<i32> = HashSet::new();
for line in reader.lines() {
let value = line?.parse::<i32>()?;
list.push(value);
set.insert(value);
}
list.sort();
println!("Pair is {}", find_pair(2020, &list, &set));
println!("Triple is {}", find_triple(2020, &list, &set));
Ok(()) Ok(())
} }

141
src/bin/18.rs Normal file
View File

@ -0,0 +1,141 @@
use std::fmt;
use std::fs::File;
use std::io::{BufRead, BufReader};
// call with a starting parenthesis.
// returns the offset of the closing parenthesis
fn find_matching_paren(input: &str) -> usize {
let mut parens_count = 0;
for (i, item) in input.chars().enumerate() {
match item {
'(' => parens_count += 1,
')' => parens_count -= 1,
_ => (),
}
if parens_count == 0 {
return i+1;
}
}
return 0;
}
// call with a first number, returns the length of the number
fn find_number(input: &str) -> usize {
let mut i= 0;
for item in input.chars() {
match item {
'0'..='9' => (),
_ => return i,
}
i += 1;
}
return i;
}
#[derive(Debug)]
enum Token<'a> {
Number(i64),
Operator(Binop),
Parens(&'a str),
End,
}
type Binop = fn(i64, i64) -> i64;
fn add(a: i64, b: i64) -> i64 {
a + b
}
fn mul(a: i64, b: i64) -> i64 {
a * b
}
// returns the number of chars consumed, as well as a token.
fn get_token(input: &str) -> (usize, Token) {
let mut i : usize = 0;
for item in input.chars() {
match item {
'(' => {
let len = find_matching_paren(&input[i..]);
return (i + len, Token::Parens(&input[i..i + len]));
}
'+' => {
return (i + 1, Token::Operator(add));
}
'*' => {
return (i + 1, Token::Operator(mul));
}
'0'..='9' => {
let len = find_number(&input[i..]);
let val = input[i..i+len].parse::<i64>().unwrap();
return (i + len, Token::Number(val));
}
' ' => (),
_ => panic!("Unexpected input!"),
}
i += 1;
}
(i, Token::End)
}
// finds a left argument, right argument, and operator.
// calls the operator on the args and returns the result.
fn evaluate(input: &str) -> i64 {
let mut left_val;
let (offset, tok) = get_token(&input);
match tok {
Token::Number(n) => {
left_val = n;
},
Token::Parens(p) => {
left_val = evaluate(&p[1..p.len()-1]);
},
_ => panic!("expected a number or a parenthetical"),
}
let mut input = &input[offset..];
loop {
let operator;
let (offset, op) = get_token(&input);
match op {
Token::Operator(o) => {
operator = o;
},
Token::End => {
return left_val;
}
_ => panic!("expected an operator"),
}
let right_val;
input = &input[offset..];
let (offset, right) = get_token(&input);
match right {
Token::Number(n) => {
right_val = n;
},
Token::Parens(p) => {
right_val = evaluate(&p[1..p.len()-1]);
},
_ => panic!("expected a number or a parenthetical"),
}
input = &input[offset..];
left_val = operator(left_val, right_val)
}
}
fn main() -> anyhow::Result<()> {
let file = File::open("18.input")?;
let reader = BufReader::new(file);
let mut answer = 0;
for line in reader.lines() {
answer += evaluate(&line?);
}
//println!("eval: {}", evaluate("6 * 2 * 6 + (8 + 8 * (5 + 4 * 7 + 6 + 6 + 3)) * 8"));
println!("answer is: {}", answer);
Ok(())
}

0
src/bin/2.rs Normal file
View File

53
src/bin/3.rs Normal file
View File

@ -0,0 +1,53 @@
use std::fs::File;
use std::io::{BufRead, BufReader};
fn traverse(xslope: usize, yslope: usize, data: &Vec<Vec<bool>>) -> i64 {
let mut x = 0;
let mut y = 0;
let mut count = 0;
loop {
y += yslope;
x += xslope;
let row = data.get(y).unwrap();
if x >= row.len() {
x = x % row.len();
}
if row[x] {
count += 1;
}
if y == data.len() - 1 {
return count;
}
}
}
fn main() -> anyhow::Result<()> {
let file = File::open("3.input")?;
let reader = BufReader::new(file);
let mut data: Vec<Vec<bool>> = Vec::new();
for line in reader.lines() {
data.push(Vec::new());
let current_line = data.last_mut().unwrap();
for c in line?.chars() {
match c {
'#' => current_line.push(true),
'.' => current_line.push(false),
'\n' => (),
_ => panic!("unexpected input"),
}
}
}
println!("Count is {}", traverse(3, 1, &data));
let second = traverse(1, 1, &data) *
traverse(3, 1, &data) *
traverse(5, 1, &data) *
traverse(7, 1, &data) *
traverse(1, 2, &data);
println!("Second count is {}", second);
Ok(())
}

View File

@ -0,0 +1 @@
4a1a9d4c3bcf3173

View File

@ -0,0 +1 @@
{"rustc":1359611718356577327,"features":"[]","target":300061782397719604,"profile":18074012566298724745,"path":1808561760770030955,"deps":[[6716024485129112654,"anyhow",false,2153753142955884757]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/advent-50d3208384b478e2/dep-bin-3"}}],"rustflags":[],"metadata":16855462643986786377,"config":0}

View File

@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@ -0,0 +1 @@
1394c88f1a6e65d3

View File

@ -0,0 +1 @@
{"rustc":1359611718356577327,"features":"[]","target":300061782397719604,"profile":8341259748240011191,"path":1808561760770030955,"deps":[[6716024485129112654,"anyhow",false,4012914409444696521]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/advent-657b4727d3d9d1d6/dep-test-bin-3"}}],"rustflags":[],"metadata":16855462643986786377,"config":0}

View File

@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@ -0,0 +1 @@
23d32f59d997f35b

View File

@ -0,0 +1 @@
{"rustc":1359611718356577327,"features":"[]","target":12473694884668196228,"profile":8341259748240011191,"path":12686468793064529765,"deps":[[6716024485129112654,"anyhow",false,4012914409444696521]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/advent-7a0417601357c5ab/dep-test-bin-2"}}],"rustflags":[],"metadata":16855462643986786377,"config":0}

View File

@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@ -0,0 +1,3 @@
{"message":"`main` function not found in crate `2`","code":{"code":"E0601","explanation":"No `main` function was found in a binary crate.\n\nTo fix this error, add a `main` function:\n\n```\nfn main() {\n // Your program will start here.\n println!(\"Hello world!\");\n}\n```\n\nIf you don't know the basics of Rust, you can look at the\n[Rust Book][rust-book] to get started.\n\n[rust-book]: https://doc.rust-lang.org/book/\n"},"level":"error","spans":[{"file_name":"src/bin/2.rs","byte_start":0,"byte_end":0,"line_start":0,"line_end":0,"column_start":1,"column_end":1,"is_primary":true,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding a `main` function to `src/bin/2.rs`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0601]\u001b[0m\u001b[0m\u001b[1m: `main` function not found in crate `2`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: consider adding a `main` function to `src/bin/2.rs`\u001b[0m\n\n"}
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to previous error\u001b[0m\n\n"}
{"message":"For more information about this error, try `rustc --explain E0601`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mFor more information about this error, try `rustc --explain E0601`.\u001b[0m\n"}

View File

@ -0,0 +1 @@
a6e6d5b857e8d201

View File

@ -0,0 +1 @@
{"rustc":1359611718356577327,"features":"[]","target":300061782397719604,"profile":1613559695681135254,"path":1808561760770030955,"deps":[[6716024485129112654,"anyhow",false,4012914409444696521]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/advent-bd869b2eed552663/dep-bin-3"}}],"rustflags":[],"metadata":16855462643986786377,"config":0}

View File

@ -0,0 +1 @@
This file has an mtime of when this was started.

BIN
target/debug/3 Executable file

Binary file not shown.

1
target/debug/3.d Normal file
View File

@ -0,0 +1 @@
/Users/adamkramer/advent/target/debug/3: /Users/adamkramer/advent/src/bin/3.rs

1
target/debug/3.dSYM Symbolic link
View File

@ -0,0 +1 @@
deps/3.dSYM

View File

@ -0,0 +1,5 @@
/Users/adamkramer/advent/target/debug/deps/2-7a0417601357c5ab.rmeta: src/bin/2.rs
/Users/adamkramer/advent/target/debug/deps/2-7a0417601357c5ab.d: src/bin/2.rs
src/bin/2.rs:

View File

@ -0,0 +1,5 @@
/Users/adamkramer/advent/target/debug/deps/2-87dd2d357b4f5ae0.rmeta: src/bin/2.rs
/Users/adamkramer/advent/target/debug/deps/2-87dd2d357b4f5ae0.d: src/bin/2.rs
src/bin/2.rs:

BIN
target/debug/deps/3 Executable file

Binary file not shown.

View File

@ -0,0 +1,5 @@
/Users/adamkramer/advent/target/debug/deps/3-657b4727d3d9d1d6.rmeta: src/bin/3.rs
/Users/adamkramer/advent/target/debug/deps/3-657b4727d3d9d1d6.d: src/bin/3.rs
src/bin/3.rs:

View File

@ -0,0 +1,5 @@
/Users/adamkramer/advent/target/debug/deps/3-bd869b2eed552663.rmeta: src/bin/3.rs
/Users/adamkramer/advent/target/debug/deps/3-bd869b2eed552663.d: src/bin/3.rs
src/bin/3.rs:

5
target/debug/deps/3.d Normal file
View File

@ -0,0 +1,5 @@
/Users/adamkramer/advent/target/debug/deps/3: src/bin/3.rs
/Users/adamkramer/advent/target/debug/deps/3.d: src/bin/3.rs
src/bin/3.rs:

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.3</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More