d16-None; d17-P1; d18-P1&P2

This commit is contained in:
Tim Nope
2022-12-18 14:37:01 +01:00
parent e9f3d310d9
commit 4c3e0fc9ab
437 changed files with 3043 additions and 1 deletions

7
d17/Cargo.lock generated Normal file
View File

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "d05"
version = "0.1.0"

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,165 @@
use std::collections::{HashSet};
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
struct Pos (i32, i32);
const WIDTH :i32 = 7;
const FLOOR :i32 = -1;
fn find_highest(map :&HashSet<Pos>) -> i32 {
let mut max = -1;
for pos in map {
if pos.1 > max {
max = pos.1;
}
}
max
}
fn evaluate_stream(mut pos :Pos, stream :char) -> Pos {
match stream {
'>' => { pos.0 += 1 }
'<' => { pos.0 -= 1 }
_ => { }
}
pos
}
fn evaluate_rock_movement(positions :&mut HashSet<Pos>, current_rock_pos :&Vec<Pos>, stream_index :&mut usize, stream :&String) {
let mut moving_rock_pos = current_rock_pos.clone();
loop {
// get current stream
let current_stream = stream.chars().nth(*stream_index).unwrap();
*stream_index = (*stream_index + 1) % stream.len();
// move according to stream
let future_pos = moving_rock_pos.iter().map(|elem| evaluate_stream(*elem, current_stream)).collect::<Vec<Pos>>();
// check for collisions
let mut collision = false;
for pos in &future_pos {
if pos.0 < 0 || pos.0 >= WIDTH || pos.1 < 0 || positions.contains(&pos) {
collision = true;
break;
}
}
// move rock if no collision took place
if !collision {
moving_rock_pos = future_pos;
}
// move down
let future_pos = moving_rock_pos.iter().map(|elem| Pos(elem.0, elem.1 - 1)).collect::<Vec<Pos>>();
// check for collisions
let mut collision = false;
for pos in &future_pos {
if pos.0 < 0 || pos.0 >= WIDTH || pos.1 < 0 || positions.contains(&pos) {
collision = true;
break;
}
}
// move rock if no collision took place
// if a collision took place then add every old position of the rock to the map and return
if !collision {
moving_rock_pos = future_pos;
} else {
for pos in moving_rock_pos {
positions.insert(pos);
}
return;
}
}
}
fn print_board(positions :&HashSet<Pos>) {
let height = find_highest(positions);
let mut map :Vec<Vec<char>> = vec![vec!['.'; WIDTH as usize]; height as usize + 1];
for pos in positions {
map[pos.1 as usize][pos.0 as usize] = '#';
}
for v in (0..map.len()).rev() {
for c in &map[v] {
print!("{}", c);
}
println!();
}
}
pub fn run(inp :Vec<String>) {
let stream = &inp[0];
const NUM_ROCKS :i32 = 2022; // 2022
const HEIGHT_OFFSET :i32 = 3;
let shape_offset :Vec<(Vec<Pos>, i32)> = vec![
(vec![Pos(-1, 0), Pos(0, 0), Pos(1, 0), Pos(2, 0)], 1), // Minus
(vec![Pos(0, 0), Pos(0, 1), Pos(1, 1), Pos(-1, 1), Pos(0, 2)], 3), // Plus
(vec![Pos(1, 0), Pos(1, 1), Pos(1, 2), Pos(0, 2), Pos(-1, 2)], 3), // Reverse L
(vec![Pos(-1, 0), Pos(-1, 1), Pos(-1, 2), Pos(-1, 3)], 4), // Line (Vertical)
(vec![Pos(-1, 0), Pos(0, 0), Pos(0, 1), Pos(-1, 1)], 2), // Square
];
let mut positions :HashSet<Pos> = HashSet::new();
let mut default_spawn = Pos(3, HEIGHT_OFFSET);
let mut stream_index = 0;
let mut shape_index = 0;
for rock_num in 0..NUM_ROCKS {
//println!("{} / {}", rock_num, NUM_ROCKS);
// get new rock offset
let mut new_rock = shape_offset[shape_index].clone();
// update spawn position
let highest_point = find_highest(&positions);
default_spawn.1 = highest_point + HEIGHT_OFFSET + new_rock.1;
//println!("{}: Def Spawn: {}", rock_num, default_spawn.1);
// calculate new rock Position
for offset in &mut new_rock.0 {
offset.0 = default_spawn.0 + offset.0;
offset.1 = default_spawn.1 - offset.1;
}
// evaluate current rock fall
evaluate_rock_movement(&mut positions, &new_rock.0, &mut stream_index, stream);
// go to next rock
shape_index = (shape_index + 1) % shape_offset.len();
}
//print_board(&positions);
let height = find_highest(&positions);
println!("a1: {}", height + 1);
}

View File

@ -1,5 +1,189 @@
use std::collections::{HashSet};
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
struct Pos (i32, i32);
const WIDTH :i32 = 7;
const FLOOR :i32 = -1;
fn find_highest(map :&HashSet<Pos>) -> i32 {
let mut max = -1;
for pos in map {
if pos.1 > max {
max = pos.1;
}
}
max
}
fn evaluate_stream(mut pos :Pos, stream :char) -> Pos {
match stream {
'>' => { pos.0 += 1 }
'<' => { pos.0 -= 1 }
_ => { }
}
pos
}
fn evaluate_rock_movement(positions :&mut HashSet<Pos>, current_rock_pos :&Vec<Pos>, stream_index :&mut usize, stream :&String) {
let mut moving_rock_pos = current_rock_pos.clone();
loop {
// get current stream
let current_stream = stream.chars().nth(*stream_index).unwrap();
*stream_index = (*stream_index + 1) % stream.len();
// move according to stream
let future_pos = moving_rock_pos.iter().map(|elem| evaluate_stream(*elem, current_stream)).collect::<Vec<Pos>>();
// check for collisions
let mut collision = false;
for pos in &future_pos {
if pos.0 < 0 || pos.0 >= WIDTH || pos.1 < 0 || positions.contains(&pos) {
collision = true;
break;
}
}
// move rock if no collision took place
if !collision {
moving_rock_pos = future_pos;
}
// move down
let future_pos = moving_rock_pos.iter().map(|elem| Pos(elem.0, elem.1 - 1)).collect::<Vec<Pos>>();
// check for collisions
let mut collision = false;
for pos in &future_pos {
if pos.0 < 0 || pos.0 >= WIDTH || pos.1 < 0 || positions.contains(&pos) {
collision = true;
break;
}
}
// move rock if no collision took place
// if a collision took place then add every old position of the rock to the map and return
if !collision {
moving_rock_pos = future_pos;
} else {
for pos in moving_rock_pos {
positions.insert(pos);
}
return;
}
}
}
fn print_board(positions :&HashSet<Pos>) {
let height = find_highest(positions);
if height == -1 {
return;
}
let mut map :Vec<Vec<char>> = vec![vec!['.'; WIDTH as usize]; height as usize + 1];
for pos in positions {
map[pos.1 as usize][pos.0 as usize] = '#';
}
for v in (0..map.len()).rev() {
for c in &map[v] {
print!("{}", c);
}
println!();
}
}
pub fn run(inp :Vec<String>) {
let stream = &inp[0];
const NUM_ROCKS :i64 = 1000000000000;
const HEIGHT_OFFSET :i32 = 3;
let shape_offset :Vec<(Vec<Pos>, i32)> = vec![
(vec![Pos(-1, 0), Pos(0, 0), Pos(1, 0), Pos(2, 0)], 1), // Minus
(vec![Pos(0, 0), Pos(0, 1), Pos(1, 1), Pos(-1, 1), Pos(0, 2)], 3), // Plus
(vec![Pos(1, 0), Pos(1, 1), Pos(1, 2), Pos(0, 2), Pos(-1, 2)], 3), // Reverse L
(vec![Pos(-1, 0), Pos(-1, 1), Pos(-1, 2), Pos(-1, 3)], 4), // Line (Vertical)
(vec![Pos(-1, 0), Pos(0, 0), Pos(0, 1), Pos(-1, 1)], 2), // Square
];
let mut positions :HashSet<Pos> = HashSet::new();
let mut default_spawn = Pos(3, HEIGHT_OFFSET);
let mut stream_index = 0;
let mut shape_index = 0;
// store the height each time a row is completely full and reset the map
let mut current_height = 0;
for rock_num in 0..NUM_ROCKS {
let mut highest_point = find_highest(&positions);
let mut can_be_reset = true;
for i in 0..WIDTH {
if !positions.contains(&Pos(i, highest_point)) {
can_be_reset = false;
break;
}
}
if can_be_reset {
println!("Reset: stream:{}, block:{}", stream_index, shape_index);
println!("i:{}", rock_num);
println!("h:{}", highest_point);
current_height += highest_point + 1;
positions.clear();
highest_point = -1;
}
// get new rock offset
let mut new_rock = shape_offset[shape_index].clone();
// update spawn position
default_spawn.1 = highest_point + HEIGHT_OFFSET + new_rock.1;
// calculate new rock Position
for offset in &mut new_rock.0 {
offset.0 = default_spawn.0 + offset.0;
offset.1 = default_spawn.1 - offset.1;
}
// evaluate current rock fall
evaluate_rock_movement(&mut positions, &new_rock.0, &mut stream_index, stream);
// go to next rock
shape_index = (shape_index + 1) % shape_offset.len();
}
//print_board(&positions);
let height = find_highest(&positions);
println!("a2: {}", current_height + height + 1);
}

View File

@ -0,0 +1 @@
{"rustc_fingerprint":15594459422025777716,"outputs":{"15697416045686424142":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\n","stderr":""},"10376369925670944939":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\tfuec\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"pc\"\nwindows\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.65.0 (897e37553 2022-11-02)\nbinary: rustc\ncommit-hash: 897e37553bba8b42751c67658967889d11ecd120\ncommit-date: 2022-11-02\nhost: x86_64-pc-windows-msvc\nrelease: 1.65.0\nLLVM version: 15.0.0\n","stderr":""}},"successes":{}}

3
d17/target/CACHEDIR.TAG Normal file
View File

@ -0,0 +1,3 @@
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by cargo.
# For information about cache directory tags see https://bford.info/cachedir/

View File

View File

@ -0,0 +1 @@
a62220af2acc103e

View File

@ -0,0 +1 @@
{"rustc":2347157018072859861,"features":"[]","target":16997346216964277088,"profile":7309141686862299243,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug\\.fingerprint\\d05-54bad1502471c435\\dep-bin-d05"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}

View File

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

View File

@ -0,0 +1,6 @@
{"message":"unused variable: `rock_num`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":3562,"byte_end":3570,"line_start":134,"line_end":134,"column_start":9,"column_end":17,"is_primary":true,"text":[{"text":" for rock_num in 0..NUM_ROCKS {","highlight_start":9,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_variables)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"src\\a1.rs","byte_start":3562,"byte_end":3570,"line_start":134,"line_end":134,"column_start":9,"column_end":17,"is_primary":true,"text":[{"text":" for rock_num in 0..NUM_ROCKS {","highlight_start":9,"highlight_end":17}],"label":null,"suggested_replacement":"_rock_num","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: unused variable: `rock_num`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:134:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m134\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m for rock_num in 0..NUM_ROCKS {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11mhelp: if this is intentional, prefix it with an underscore: `_rock_num`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(unused_variables)]` on by default\u001b[0m\n\n"}
{"message":"constant `FLOOR` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":155,"byte_end":160,"line_start":7,"line_end":7,"column_start":7,"column_end":12,"is_primary":true,"text":[{"text":"const FLOOR :i32 = -1; ","highlight_start":7,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: constant `FLOOR` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:7:7\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m7\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mconst FLOOR :i32 = -1; \u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
{"message":"function `print_board` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":2316,"byte_end":2327,"line_start":92,"line_end":92,"column_start":4,"column_end":15,"is_primary":true,"text":[{"text":"fn print_board(positions :&HashSet<Pos>) {","highlight_start":4,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: function `print_board` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:92:4\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m92\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn print_board(positions :&HashSet<Pos>) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^^^\u001b[0m\n\n"}
{"message":"constant `FLOOR` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":155,"byte_end":160,"line_start":7,"line_end":7,"column_start":7,"column_end":12,"is_primary":true,"text":[{"text":"const FLOOR :i32 = -1; ","highlight_start":7,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: constant `FLOOR` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:7:7\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m7\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mconst FLOOR :i32 = -1; \u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^\u001b[0m\n\n"}
{"message":"function `print_board` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":2316,"byte_end":2327,"line_start":92,"line_end":92,"column_start":4,"column_end":15,"is_primary":true,"text":[{"text":"fn print_board(positions :&HashSet<Pos>) {","highlight_start":4,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: function `print_board` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:92:4\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m92\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn print_board(positions :&HashSet<Pos>) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^^^\u001b[0m\n\n"}
{"message":"5 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: 5 warnings emitted\u001b[0m\n\n"}

View File

@ -0,0 +1 @@
e737b342d3e62e08

View File

@ -0,0 +1 @@
{"rustc":2347157018072859861,"features":"[]","target":16997346216964277088,"profile":9251013656241001069,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug\\.fingerprint\\d05-60235cbe9d69ff8a\\dep-bin-d05"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}

View File

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

View File

@ -0,0 +1,6 @@
{"message":"unused variable: `rock_num`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":3562,"byte_end":3570,"line_start":134,"line_end":134,"column_start":9,"column_end":17,"is_primary":true,"text":[{"text":" for rock_num in 0..NUM_ROCKS {","highlight_start":9,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_variables)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"src\\a1.rs","byte_start":3562,"byte_end":3570,"line_start":134,"line_end":134,"column_start":9,"column_end":17,"is_primary":true,"text":[{"text":" for rock_num in 0..NUM_ROCKS {","highlight_start":9,"highlight_end":17}],"label":null,"suggested_replacement":"_rock_num","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: unused variable: `rock_num`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:134:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m134\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m for rock_num in 0..NUM_ROCKS {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11mhelp: if this is intentional, prefix it with an underscore: `_rock_num`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(unused_variables)]` on by default\u001b[0m\n\n"}
{"message":"constant `FLOOR` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":155,"byte_end":160,"line_start":7,"line_end":7,"column_start":7,"column_end":12,"is_primary":true,"text":[{"text":"const FLOOR :i32 = -1; ","highlight_start":7,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: constant `FLOOR` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:7:7\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m7\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mconst FLOOR :i32 = -1; \u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
{"message":"function `print_board` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":2316,"byte_end":2327,"line_start":92,"line_end":92,"column_start":4,"column_end":15,"is_primary":true,"text":[{"text":"fn print_board(positions :&HashSet<Pos>) {","highlight_start":4,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: function `print_board` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:92:4\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m92\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn print_board(positions :&HashSet<Pos>) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^^^\u001b[0m\n\n"}
{"message":"constant `FLOOR` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":155,"byte_end":160,"line_start":7,"line_end":7,"column_start":7,"column_end":12,"is_primary":true,"text":[{"text":"const FLOOR :i32 = -1; ","highlight_start":7,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: constant `FLOOR` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:7:7\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m7\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mconst FLOOR :i32 = -1; \u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^\u001b[0m\n\n"}
{"message":"function `print_board` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":2316,"byte_end":2327,"line_start":92,"line_end":92,"column_start":4,"column_end":15,"is_primary":true,"text":[{"text":"fn print_board(positions :&HashSet<Pos>) {","highlight_start":4,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: function `print_board` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:92:4\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m92\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn print_board(positions :&HashSet<Pos>) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^^^\u001b[0m\n\n"}
{"message":"5 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: 5 warnings emitted\u001b[0m\n\n"}

View File

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

View File

@ -0,0 +1,6 @@
{"message":"unused variable: `rock_num`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":3562,"byte_end":3570,"line_start":134,"line_end":134,"column_start":9,"column_end":17,"is_primary":true,"text":[{"text":" for rock_num in 0..NUM_ROCKS {","highlight_start":9,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_variables)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"src\\a1.rs","byte_start":3562,"byte_end":3570,"line_start":134,"line_end":134,"column_start":9,"column_end":17,"is_primary":true,"text":[{"text":" for rock_num in 0..NUM_ROCKS {","highlight_start":9,"highlight_end":17}],"label":null,"suggested_replacement":"_rock_num","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: unused variable: `rock_num`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:134:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m134\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m for rock_num in 0..NUM_ROCKS {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11mhelp: if this is intentional, prefix it with an underscore: `_rock_num`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(unused_variables)]` on by default\u001b[0m\n\n"}
{"message":"constant `FLOOR` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":155,"byte_end":160,"line_start":7,"line_end":7,"column_start":7,"column_end":12,"is_primary":true,"text":[{"text":"const FLOOR :i32 = -1; ","highlight_start":7,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: constant `FLOOR` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:7:7\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m7\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mconst FLOOR :i32 = -1; \u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
{"message":"function `print_board` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":2316,"byte_end":2327,"line_start":92,"line_end":92,"column_start":4,"column_end":15,"is_primary":true,"text":[{"text":"fn print_board(positions :&HashSet<Pos>) {","highlight_start":4,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: function `print_board` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:92:4\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m92\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn print_board(positions :&HashSet<Pos>) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^^^\u001b[0m\n\n"}
{"message":"constant `FLOOR` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":155,"byte_end":160,"line_start":7,"line_end":7,"column_start":7,"column_end":12,"is_primary":true,"text":[{"text":"const FLOOR :i32 = -1; ","highlight_start":7,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: constant `FLOOR` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:7:7\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m7\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mconst FLOOR :i32 = -1; \u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^\u001b[0m\n\n"}
{"message":"function `print_board` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":2316,"byte_end":2327,"line_start":92,"line_end":92,"column_start":4,"column_end":15,"is_primary":true,"text":[{"text":"fn print_board(positions :&HashSet<Pos>) {","highlight_start":4,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: function `print_board` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:92:4\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m92\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn print_board(positions :&HashSet<Pos>) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^^^\u001b[0m\n\n"}
{"message":"5 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: 5 warnings emitted\u001b[0m\n\n"}

View File

@ -0,0 +1 @@
f0fa31a79957e157

View File

@ -0,0 +1 @@
{"rustc":2347157018072859861,"features":"[]","target":16997346216964277088,"profile":1021633075455700787,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug\\.fingerprint\\d05-cd6375c08847f9de\\dep-test-bin-d05"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}

1
d17/target/debug/d05.d Normal file
View File

@ -0,0 +1 @@
C:\personal\Programmierdaten\rust\advent_of_code\y2022\d17\target\debug\d05.exe: C:\personal\Programmierdaten\rust\advent_of_code\y2022\d17\src\a1.rs C:\personal\Programmierdaten\rust\advent_of_code\y2022\d17\src\a2.rs C:\personal\Programmierdaten\rust\advent_of_code\y2022\d17\src\main.rs

BIN
d17/target/debug/d05.exe Normal file

Binary file not shown.

BIN
d17/target/debug/d05.pdb Normal file

Binary file not shown.

View File

@ -0,0 +1,7 @@
c:\personal\Programmierdaten\rust\advent_of_code\y2022\d17\target\debug\deps\d05-54bad1502471c435.rmeta: src\main.rs src\a1.rs src\a2.rs
c:\personal\Programmierdaten\rust\advent_of_code\y2022\d17\target\debug\deps\d05-54bad1502471c435.d: src\main.rs src\a1.rs src\a2.rs
src\main.rs:
src\a1.rs:
src\a2.rs:

View File

@ -0,0 +1,7 @@
c:\personal\Programmierdaten\rust\advent_of_code\y2022\d17\target\debug\deps\d05-cd6375c08847f9de.rmeta: src\main.rs src\a1.rs src\a2.rs
c:\personal\Programmierdaten\rust\advent_of_code\y2022\d17\target\debug\deps\d05-cd6375c08847f9de.d: src\main.rs src\a1.rs src\a2.rs
src\main.rs:
src\a1.rs:
src\a2.rs:

View File

@ -0,0 +1,7 @@
C:\personal\Programmierdaten\rust\advent_of_code\y2022\d17\target\debug\deps\d05.exe: src\main.rs src\a1.rs src\a2.rs
C:\personal\Programmierdaten\rust\advent_of_code\y2022\d17\target\debug\deps\d05.d: src\main.rs src\a1.rs src\a2.rs
src\main.rs:
src\a1.rs:
src\a2.rs:

Binary file not shown.

Binary file not shown.

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