Skip to content

Commit 9765c4a

Browse files
committed
[2025] Init year
1 parent 04550ee commit 9765c4a

File tree

8 files changed

+65
-1
lines changed

8 files changed

+65
-1
lines changed

.github/workflows/aoc_2025.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: aoc_2025
2+
on:
3+
workflow_dispatch:
4+
push:
5+
paths:
6+
- "common/**"
7+
- "aoc_2025/**"
8+
9+
env:
10+
CRATE: aoc_2025
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Build
19+
run: cargo build -p ${{ env.CRATE }}
20+
- name: Test
21+
run: cargo test -p ${{ env.CRATE }}

Cargo.lock

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ members = [
1212
"aoc_2022",
1313
"aoc_2023",
1414
"aoc_2024",
15+
"aoc_2025",
1516
]
1617

1718
[dependencies]
@@ -20,6 +21,7 @@ aoc_2021 = { path = "aoc_2021" }
2021
aoc_2022 = { path = "aoc_2022" }
2122
aoc_2023 = { path = "aoc_2023" }
2223
aoc_2024 = { path = "aoc_2024" }
24+
aoc_2025 = { path = "aoc_2025" }
2325

2426
clap = { version = "4.0.29", features = ["derive"] }
2527
chrono = "0.4.31"

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
My Rusty solutions to [Advent Of Code](https://adventofcode.com)!
44
Thank you to [Eric Wastl](http://was.tl) for running this incredible yearly event!
55

6+
## [2025](https://adventofcode.com/2025) [![aoc_2025](https://github.com/connorslade/advent-of-code/actions/workflows/aoc_2025.yml/badge.svg)](https://github.com/connorslade/advent-of-code/actions/workflows/aoc_2025.yml)
7+
8+
<!-- MARKER -->
9+
610
## [2024](https://adventofcode.com/2024) [![aoc_2024](https://github.com/connorslade/advent-of-code/actions/workflows/aoc_2024.yml/badge.svg)](https://github.com/connorslade/advent-of-code/actions/workflows/aoc_2024.yml)
711

812
- [Day 01: Historian Hysteria](aoc_2024/src/day_01.rs)
@@ -30,7 +34,6 @@ Thank you to [Eric Wastl](http://was.tl) for running this incredible yearly even
3034
- [Day 23: LAN Party](aoc_2024/src/day_23.rs)
3135
- [Day 24: Crossed Wires](aoc_2024/src/day_24.rs)
3236
- [Day 25: Code Chronicle](aoc_2024/src/day_25.rs)
33-
<!-- MARKER -->
3437

3538
## [2023](https://adventofcode.com/2023) [![aoc_2023](https://github.com/connorslade/advent-of-code/actions/workflows/aoc_2023.yml/badge.svg)](https://github.com/connorslade/advent-of-code/actions/workflows/aoc_2023.yml)
3639

aoc_2024/src/day_18.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ use nd_vec::{vector, Vec2};
66

77
solution!("RAM Run", 18);
88

9+
// Drop the first 1024 boxes, then find the length of the shortest path through
10+
// the board.
911
fn part_a(input: &str) -> Answer {
1012
let mut map = Map::parse(input, vector!(71, 71));
1113
map.fill_to(1023);
1214
map.shortest_path().into()
1315
}
1416

17+
// Binary search to find the first box that when dropped causes the maze to be
18+
// unsolvable.
1519
fn part_b(input: &str) -> Answer {
1620
let mut map = Map::parse(input, vector!(71, 71));
1721

aoc_2025/Cargo.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "aoc_2025"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]
7+
aoc_lib = { path = "../aoc_lib" }
8+
common = { path = "../common" }
9+
10+
indoc = "2.0.4"
11+
itertools = "0.13.0"
12+
nd_vec = { git = "https://github.com/connorslade/nd-vec.git" }
13+
rayon = "1.10.0"

aoc_2025/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
use common::Solution;
2+
3+
// [import_marker]
4+
5+
pub const SOLUTIONS: &[Solution] = &[
6+
// [list_marker]
7+
];

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ fn get_year(year: u16) -> &'static [Solution] {
2424
2022 => aoc_2022::SOLUTIONS,
2525
2023 => aoc_2023::SOLUTIONS,
2626
2024 => aoc_2024::SOLUTIONS,
27+
2025 => aoc_2025::SOLUTIONS,
2728
_ => &[],
2829
}
2930
}

0 commit comments

Comments
 (0)