day14: rust

This commit is contained in:
matthias@arch 2023-12-14 17:37:54 +01:00
parent 3d5270034b
commit f3d747b0df
3 changed files with 4 additions and 3 deletions

View File

@ -3,9 +3,9 @@
Today's language: **Rust**
Lines of code: **84**
Lines of code: **85**
Execution time: **0,171 s**
Execution time: **0,172 s**
This solution uses a single function for the tilting procedure.
Different tilting directions are achieved by "remapping" `x` and `y` through captures.

View File

@ -72,6 +72,7 @@ fn main() {
rocks = original.clone();
// find a cycle
let mut rocks_store: Vec<Rocks> = Vec::new();
rocks_store.reserve(200);
let mut cycle_start: usize = 0;
let mut cycle_length: usize = 0;
for i in 0..1_000_000_000 as usize {

View File

@ -16,6 +16,6 @@ This is a repository for my solutions for the [advent of code 2023](https://adve
| [10](10) | Rust | 136 | 0,003 s | lots of bitwise operations |
| [11](11) | Rust | 66 | 0,005 s | |
| [13](13) | Rust | 84 | 0,002 s | binary encoding ftw |
| [14](14) | Rust | 84 | 0,171 s | no bruteforce in < 90 lines |
| [14](14) | Rust | 85 | 0,172 s | no bruteforce in < 90 lines |
Lines of code are without blank lines and comments