d04
This commit is contained in:
parent
83948b6f03
commit
4d132cbe7c
4 changed files with 232 additions and 1 deletions
10
res/04/example
Normal file
10
res/04/example
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
MMMSXXMASM
|
||||||
|
MSAMXMSMSA
|
||||||
|
AMXSXMAAMM
|
||||||
|
MSAMASMSMX
|
||||||
|
XMASAMXAMM
|
||||||
|
XXAMMXXAMA
|
||||||
|
SMSMSASXSS
|
||||||
|
SAXAMASAAA
|
||||||
|
MAMMMXMMMM
|
||||||
|
MXMXAXMASX
|
140
res/04/input
Normal file
140
res/04/input
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
SXXSAMSSMMSMMSXXXXMMXMMMMSMMMSSSXSAMXMXSXMASXMSMXSMMXSMSXMMASXMASMSSMMXSMSSSSSSXSXMAMXAMXSMSXSXXMMMMMXXMSSMMSXSASASMMSXMASXSSSSSMXMASMSMXAMX
|
||||||
|
SAXMASAXMASAAXMASXSSXSAAASASAAXMASMXXSASAMXAAAAMMSAMAMXSAAXASAMSXXAAXMMSAMAAAASAMXXMMSXSASXSAMXMSAAAMMMMASXXAAXASXSAAXAXAAAXAAXAMSMMMAAAASMM
|
||||||
|
MAMSXMAXMMXMMXAXXXAAASMMMXAMMSMMMMXMXMASXMASMSMSASAMMMASAMMXSAMAXMSSMSAMAMMMMMMXMSMSMAAMASXMAMAASXSXSMAMAMMMMSMAMAXMMSAMMMMMMMSMMAAAMSMSMAAS
|
||||||
|
AAMMMSMSMSSMSSSMSMMMMMMMXMAMXAXAAXAMXMAMAAAXXXAMASXMAMXSXMSASAMXMXXAAMXMAMXXXXMMXAAAMMMMSMXXAMXXSXMAAMSMAMAXAAMXMSMMXXAXAAXMXXSXSSSMMAMXMSSM
|
||||||
|
MASXAAAAXXAAAAAAXAMAMXSAXMSMSMXSSSXXAMASXMXMMMXMXMXSXXAMAASAMXMMMSMMSMSMSXXMXSAAMMMMXAASXASXMSXXSAMSMMXSXSASXSSMAMAMAXSMMAMMXMMAXA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XAAXAAMASAASAMASMMXXSAAAMSAMXMMSMMMMXAAXMXXXAAAS
|
||||||
|
SMSMSASMXMXSAMAXMXAAXMAAAMAMAMXXAMASMMMXXAXAMAMMAAAAMAMSXMXSAMXSAMXMAAXXXMAXAAXAXMSMAMXMAMSSMSSMMSSMMMXMXMXMAMAAMMMXMAMMSXMAXXMXMSSMMMMSSSSM
|
||||||
|
XAAAMASMSMAMASMSSMMSMMSMMMAMXMXMASXMAMAASXSXSASMMMSXMAMMAMXMAMAAAMMSMMMSXSAMSSMSXXMXXXMXMSAMAAXMAAMASMMSSMASAMXSXXXMAMAMXAMSSXMAMXMAAAXAAXMX
|
||||||
|
MMMSMMMAAMASAMAMAMAMXAXXXXXMAMXSAMMXMMMXXMAASMSAXAXASMMSAMASMMSSMMMAAAAAAMAMXXAAMAMMSMMSXSAMMMSMMSSMMAAXAMASMMAMMXMMASXMSSMAMMSMSASXMSMMSMAA
|
||||||
|
XXXMASMSMSAMXSASAMASMXMASMASMSAMASXXSAMXXMMMMASXMMSAMAASAMXSAXMAXSSSSMSSXMAAXMSMMMXAAASXASXMASAMXXAXSMMSAMXSAMMXSAAMASAAAAMAMXAMXASXAAASAASM
|
||||||
|
XSXMSAMXMAMXXSMSASASAMXAXSAMXMMXSAMXSASAXXSXMXMSMXMXMMMSSMMSXMSAMXXMAMXXASXMSAMXXMMSSSMMMMXSXSXSXSAMXAXMXMASAMMASXSMMSMMMSSSXMASMSMMSSSMSMMX
|
81
src/days/d04.rs
Normal file
81
src/days/d04.rs
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/04/input";
|
||||||
|
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let grid = contents
|
||||||
|
.lines()
|
||||||
|
.map(|l| l.chars().collect::<Vec<char>>())
|
||||||
|
.collect::<Vec<Vec<char>>>();
|
||||||
|
|
||||||
|
// add rows
|
||||||
|
let mut strings = grid
|
||||||
|
.iter()
|
||||||
|
.map(|l| l.iter().collect::<String>())
|
||||||
|
.collect::<Vec<String>>();
|
||||||
|
|
||||||
|
// add cols
|
||||||
|
for i in 0..grid.len() {
|
||||||
|
let col = grid.iter().map(|l| l[i]).collect::<Vec<char>>();
|
||||||
|
strings.push(col.iter().collect::<String>());
|
||||||
|
}
|
||||||
|
|
||||||
|
// add diagonals
|
||||||
|
for i in 0..grid.len() {
|
||||||
|
let mut diag: Vec<Vec<char>> = vec![vec!(); 4];
|
||||||
|
|
||||||
|
// left-to-right
|
||||||
|
for j in 0..grid.len() {
|
||||||
|
if i + j < grid.len() && j < grid[0].len() {
|
||||||
|
diag[0].push(grid[i + j][j])
|
||||||
|
}
|
||||||
|
if i >= j && j < grid[0].len() {
|
||||||
|
diag[1].push(grid[i - j][j])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for j in 0..grid.len() {
|
||||||
|
if i + j < grid.len() && j > 0 && j <= grid[0].len() {
|
||||||
|
diag[2].push(grid[i + j][grid[0].len() - j])
|
||||||
|
}
|
||||||
|
if i >= j && j > 0 && j <= grid[0].len() {
|
||||||
|
diag[3].push(grid[i - j][grid[0].len() - j])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
strings.append(
|
||||||
|
&mut diag
|
||||||
|
.iter()
|
||||||
|
.map(|l| l.iter().collect::<String>())
|
||||||
|
.collect::<Vec<String>>(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
let result: usize = strings
|
||||||
|
.iter()
|
||||||
|
.map(|s| {
|
||||||
|
s.matches("XMAS").count() + s.chars().rev().collect::<String>().matches("XMAS").count()
|
||||||
|
})
|
||||||
|
.sum();
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = grid
|
||||||
|
.windows(3)
|
||||||
|
.map(|rows| {
|
||||||
|
let mut count = 0;
|
||||||
|
for i in 0..rows[0].len() - 2 {
|
||||||
|
let str1 = format!("{}{}{}", rows[0][i], rows[1][i + 1], rows[2][i + 2]);
|
||||||
|
let str2 = format!("{}{}{}", rows[0][i + 2], rows[1][i + 1], rows[2][i]);
|
||||||
|
if (str1 == "MAS" || str1 == "SAM") && (str2 == "MAS" || str2 == "SAM") {
|
||||||
|
count += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
count
|
||||||
|
})
|
||||||
|
.sum();
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
|
@ -24,12 +24,12 @@ fn _all_days() {
|
||||||
println!("\nDay 3");
|
println!("\nDay 3");
|
||||||
days::d03::solve();
|
days::d03::solve();
|
||||||
time = _print_elapsed(time);
|
time = _print_elapsed(time);
|
||||||
/*
|
|
||||||
|
|
||||||
println!("\nDay 4");
|
println!("\nDay 4");
|
||||||
days::d04::solve();
|
days::d04::solve();
|
||||||
time = _print_elapsed(time);
|
time = _print_elapsed(time);
|
||||||
|
|
||||||
|
/*
|
||||||
println!("\nDay 5");
|
println!("\nDay 5");
|
||||||
days::d05::solve();
|
days::d05::solve();
|
||||||
time = _print_elapsed(time);
|
time = _print_elapsed(time);
|
||||||
|
|
Loading…
Reference in a new issue