Skip to content

Commit 0001028

Browse files
committed
Add day 15
1 parent 22abc94 commit 0001028

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.aoc_tiles/tiles/2020/15.png

8.25 KB
Loading

2020/15/15.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ fn main() {
44
let line = stdin().lines().last().unwrap().unwrap();
55
let mut lookup: HashMap<_, _> = line.split(",").map(|n| n.parse().unwrap()).zip(1..).collect();
66
let mut last = 0;
7-
for i in lookup.len()+1..30000000 {
7+
for i in lookup.len()+1..30_000_000 {
88
last = i - lookup.insert(last, i).unwrap_or(i);
99
if i == 2019 { println!("{}", last); }
1010
}

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- AOC TILES BEGIN -->
22
<h1 align="center">
3-
Advent of Code - 178/450 ⭐
3+
Advent of Code - 180/450 ⭐
44
</h1>
55
<h1 align="center">
66
2023 - 50 ⭐
@@ -237,7 +237,7 @@
237237
<img src=".aoc_tiles/tiles/2021/25.png" width="161px">
238238
</a>
239239
<h1 align="center">
240-
2020 - 28
240+
2020 - 30
241241
</h1>
242242
<a href="2020/01/01.rs">
243243
<img src=".aoc_tiles/tiles/2020/01.png" width="161px">
@@ -281,6 +281,9 @@
281281
<a href="2020/14/14.rs">
282282
<img src=".aoc_tiles/tiles/2020/14.png" width="161px">
283283
</a>
284+
<a href="2020/15/15.rs">
285+
<img src=".aoc_tiles/tiles/2020/15.png" width="161px">
286+
</a>
284287
<!-- AOC TILES END -->
285288

286289
*The above tiles are clickable, leading to the solution of the corresponding day.*

0 commit comments

Comments
 (0)