This commit is contained in:
Tim Nope
2022-12-11 18:06:33 +01:00
commit 6b6fc8d486
1361 changed files with 19939 additions and 0 deletions

7
d11/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"

8
d11/Cargo.toml Normal file
View File

@ -0,0 +1,8 @@
[package]
name = "d05"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

55
d11/input.txt Normal file
View File

@ -0,0 +1,55 @@
Monkey 0:
Starting items: 75, 63
Operation: new = old * 3
Test: divisible by 11
If true: throw to monkey 7
If false: throw to monkey 2
Monkey 1:
Starting items: 65, 79, 98, 77, 56, 54, 83, 94
Operation: new = old + 3
Test: divisible by 2
If true: throw to monkey 2
If false: throw to monkey 0
Monkey 2:
Starting items: 66
Operation: new = old + 5
Test: divisible by 5
If true: throw to monkey 7
If false: throw to monkey 5
Monkey 3:
Starting items: 51, 89, 90
Operation: new = old * 19
Test: divisible by 7
If true: throw to monkey 6
If false: throw to monkey 4
Monkey 4:
Starting items: 75, 94, 66, 90, 77, 82, 61
Operation: new = old + 1
Test: divisible by 17
If true: throw to monkey 6
If false: throw to monkey 1
Monkey 5:
Starting items: 53, 76, 59, 92, 95
Operation: new = old + 2
Test: divisible by 19
If true: throw to monkey 4
If false: throw to monkey 3
Monkey 6:
Starting items: 81, 61, 75, 89, 70, 92
Operation: new = old * old
Test: divisible by 3
If true: throw to monkey 0
If false: throw to monkey 1
Monkey 7:
Starting items: 81, 86, 62, 87
Operation: new = old + 8
Test: divisible by 13
If true: throw to monkey 3
If false: throw to monkey 5

184
d11/src/a1.rs Normal file
View File

@ -0,0 +1,184 @@
#[derive(Debug, Clone, Copy)]
enum Operation {
MUL,
ADD,
SQUARE,
}
struct Monkey {
id: i32,
inspections :i32,
current_items :Vec<i64>,
op :(Operation, i64),
test :i64,
throw_target :(i32, i32) // .0 for false target, .1 for true target
}
impl Monkey {
fn new(id :i32, current_items :Vec<i64>, op :(Operation, i64), test :i64, target :(i32, i32)) -> Self {
Monkey { id: id, inspections: 0, current_items: current_items, op: op, test: test, throw_target: target}
}
}
fn eval_op(inp :Vec<&str>) -> (Operation, i64) {
let mut op = (Operation::ADD, 0);
match inp[2] {
"old" => { return (Operation::SQUARE, 0); }
_ => {}
}
op.0 = match inp[1] {
"*" => { Operation::MUL }
"+" => { Operation::ADD }
_ => { Operation::ADD }
};
op.1 = inp[2].parse::<i64>().unwrap();
return op;
}
fn parse_monkey(monkey :Vec<String>) -> Option<Monkey> {
if monkey.len() < 6 {
return None;
}
let id = monkey[0].split(' ').collect::<Vec<&str>>()[1].trim_matches(':').parse::<i32>().unwrap();
let current_items = monkey[1].replace(",", "").split(' ').filter_map(|elem| elem.parse::<i64>().ok()).collect::<Vec<i64>>();
let raw_op = monkey[2].split('=').collect::<Vec<&str>>()[1].trim().split(' ').collect::<Vec<&str>>();
let op = eval_op(raw_op);
let test = monkey[3].split(' ').collect::<Vec<&str>>()[3].parse::<i64>().unwrap();
let mut target :(i32, i32) = (0, 0);
target.0 = monkey[5].split(' ').collect::<Vec<&str>>()[5].parse::<i32>().unwrap();
target.1 = monkey[4].split(' ').collect::<Vec<&str>>()[5].parse::<i32>().unwrap();
//println!("{:?}", id);
//println!("{:?}", current_items);
//println!("{:?}", op);
//println!("{:?}", test);
return Some(Monkey::new(id, current_items, op, test, target));
}
fn parse_input(inp :&Vec<String>) -> Vec<Monkey> {
//let raw_monkeys = inp.chunks(6).map(|test| {if !test.contains("") {test.to_vec()} {""}}).collect::<Vec<Vec<String>>>();
// split monkeys into single monkey vectors
let mut raw_monkeys :Vec<Vec<String>> = vec![vec![]];
for l in inp {
if l.is_empty() {
raw_monkeys.push(vec![]);
continue;
}
raw_monkeys.last_mut().unwrap().push(l.trim().to_owned());
}
// extract monkey data
let mut monkeys :Vec<Monkey> = vec![];
for m in raw_monkeys {
monkeys.push(parse_monkey(m).unwrap());
}
return monkeys;
}
pub fn run(inp :Vec<String>) {
let mut monkeys = parse_input(&inp);
const MAX_ROUNDS :i32 = 20;
for _ in 0..MAX_ROUNDS {
for i in 0..monkeys.len() {
let operation = monkeys[i].op.0;
let operand = monkeys[i].op.1;
for item_index in 0..monkeys[i].current_items.len()
{
let item = &mut monkeys[i].current_items[item_index];
// new score
match operation {
Operation::ADD => { *item = *item + operand; }
Operation::MUL => { *item = *item * operand; }
Operation::SQUARE => { *item = *item * *item }
}
// println!("{}, {}", *item, operand);
// div 3 floor
*item = *item / 3;
monkeys[i].inspections += 1;
}
// throw to monkey
while monkeys[i].current_items.len() > 0 {
let curr_item = *monkeys[i].current_items.first().unwrap();
let test_number = monkeys[i].test;
let target = {
if curr_item % test_number == 0 {
monkeys[i].throw_target.1 as usize
} else {
//println!("{} is not divisible by {}, throwing to monkey {} (else: {})", curr_item, test_number, monkeys[i].throw_target.0 as usize, monkeys[i].throw_target.1 as usize);
monkeys[i].throw_target.0 as usize
}
};
monkeys[target].current_items.push(curr_item);
monkeys[i].current_items.remove(0);
}
}
}
let mut max = 0;
let mut s_max = 0;
for i in 0..monkeys.len() {
if monkeys[i].inspections >= max {
s_max = max;
max = monkeys[i].inspections;
}
}
println!("{}", s_max * max);
}

200
d11/src/a2.rs Normal file
View File

@ -0,0 +1,200 @@
#[derive(Debug, Clone, Copy)]
enum Operation {
MUL,
ADD,
SQUARE,
}
struct Monkey {
id: i32,
inspections :u128,
current_items :Vec<u128>,
op :(Operation, u128),
test :u128,
throw_target :(i32, i32) // .0 for false target, .1 for true target
}
impl Monkey {
fn new(id :i32, current_items :Vec<u128>, op :(Operation, u128), test :u128, target :(i32, i32)) -> Self {
Monkey { id: id, inspections: 0, current_items: current_items, op: op, test: test, throw_target: target}
}
}
fn eval_op(inp :Vec<&str>) -> (Operation, u128) {
let mut op = (Operation::ADD, 0);
match inp[2] {
"old" => { return (Operation::SQUARE, 0); }
_ => {}
}
op.0 = match inp[1] {
"*" => { Operation::MUL }
"+" => { Operation::ADD }
_ => { Operation::ADD }
};
op.1 = inp[2].parse::<u128>().unwrap();
return op;
}
fn parse_monkey(monkey :Vec<String>) -> Option<Monkey> {
if monkey.len() < 6 {
return None;
}
let id = monkey[0].split(' ').collect::<Vec<&str>>()[1].trim_matches(':').parse::<i32>().unwrap();
let current_items = monkey[1].replace(",", "").split(' ').filter_map(|elem| elem.parse::<u128>().ok()).collect::<Vec<u128>>();
let raw_op = monkey[2].split('=').collect::<Vec<&str>>()[1].trim().split(' ').collect::<Vec<&str>>();
let op = eval_op(raw_op);
let test = monkey[3].split(' ').collect::<Vec<&str>>()[3].parse::<u128>().unwrap();
let mut target :(i32, i32) = (0, 0);
target.0 = monkey[5].split(' ').collect::<Vec<&str>>()[5].parse::<i32>().unwrap();
target.1 = monkey[4].split(' ').collect::<Vec<&str>>()[5].parse::<i32>().unwrap();
//println!("{:?}", id);
//println!("{:?}", current_items);
//println!("{:?}", op);
//println!("{:?}", test);
return Some(Monkey::new(id, current_items, op, test, target));
}
fn parse_input(inp :&Vec<String>) -> Vec<Monkey> {
//let raw_monkeys = inp.chunks(6).map(|test| {if !test.contains("") {test.to_vec()} {""}}).collect::<Vec<Vec<String>>>();
// split monkeys into single monkey vectors
let mut raw_monkeys :Vec<Vec<String>> = vec![vec![]];
for l in inp {
if l.is_empty() {
raw_monkeys.push(vec![]);
continue;
}
raw_monkeys.last_mut().unwrap().push(l.trim().to_owned());
}
// extract monkey data
let mut monkeys :Vec<Monkey> = vec![];
for m in raw_monkeys {
monkeys.push(parse_monkey(m).unwrap());
}
return monkeys;
}
pub fn run(inp :Vec<String>) {
let mut monkeys = parse_input(&inp);
const MAX_ROUNDS :i32 = 10000;
let mut mod_fact = 1;
for i in 0..monkeys.len() {
mod_fact *= monkeys[i].test;
}
for _ in 0..MAX_ROUNDS {
for i in 0..monkeys.len() {
let operation = monkeys[i].op.0;
let operand = monkeys[i].op.1;
for item_index in 0..monkeys[i].current_items.len() {
let item = &mut monkeys[i].current_items[item_index];
// new score
match operation {
Operation::ADD => { *item = (*item + operand) % mod_fact; }
Operation::MUL => { *item = (*item * operand) % mod_fact; }
Operation::SQUARE => { *item = (*item * *item) % mod_fact; }
}
// println!("{}, {}", *item, operand);
// div 3 floor
//*item = *item / 3;
monkeys[i].inspections += 1;
}
// throw to monkey
while monkeys[i].current_items.len() > 0 {
let curr_item = *monkeys[i].current_items.first().unwrap();
let test_number = monkeys[i].test;
let target = {
if curr_item % test_number == 0 {
monkeys[i].throw_target.1 as usize
} else {
//println!("{} is not divisible by {}, throwing to monkey {} (else: {})", curr_item, test_number, monkeys[i].throw_target.0 as usize, monkeys[i].throw_target.1 as usize);
monkeys[i].throw_target.0 as usize
}
};
//println!("throwig {} from {} to {}", curr_item, i, target);
monkeys[target].current_items.push(curr_item);
monkeys[i].current_items.remove(0);
}
}
for i in 0..monkeys.len() {
//println!("{}: {}", i, monkeys[i].inspections);
}
//println!();
}
let mut max = 0;
let mut s_max = 0;
for i in 0..monkeys.len() {
if monkeys[i].inspections >= max {
s_max = max;
max = monkeys[i].inspections;
} else if monkeys[i].inspections > s_max {
s_max = monkeys[i].inspections;
}
}
println!("{} * {} = {}", s_max, max, s_max * max);
}

41
d11/src/main.rs Normal file
View File

@ -0,0 +1,41 @@
use std::io::BufRead;
mod a1;
mod a2;
fn read_file(path :&str) -> Vec<String> {
let file = std::fs::File::open(path);
return match file {
Ok(handle) => {
let reader = std::io::BufReader::new(handle);
let mut vec : Vec<String> = vec![];
reader.lines().for_each(|elem| {
vec.push(elem.unwrap());
});
vec
}
Err(_) => vec![]
}
}
fn main() {
let inp :Vec<String> = read_file("input.txt");
a1::run(inp.clone());
a2::run(inp);
}

View File

@ -0,0 +1 @@
{"rustc_fingerprint":15594459422025777716,"outputs":{"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":""},"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":""},"15697416045686424142":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\n","stderr":""},"8623966523033996810":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\n","stderr":""},"8204103499295538959":{"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":""}},"successes":{}}

3
d11/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,4 @@
{"message":"unused variable: `i`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":4789,"byte_end":4790,"line_start":175,"line_end":175,"column_start":13,"column_end":14,"is_primary":true,"text":[{"text":" for i in 0..monkeys.len() {","highlight_start":13,"highlight_end":14}],"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\\a2.rs","byte_start":4789,"byte_end":4790,"line_start":175,"line_end":175,"column_start":13,"column_end":14,"is_primary":true,"text":[{"text":" for i in 0..monkeys.len() {","highlight_start":13,"highlight_end":14}],"label":null,"suggested_replacement":"_i","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: `i`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:175:13\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;14m175\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m for i in 0..monkeys.len() {\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: `_i`\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":"field `id` is never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":98,"byte_end":104,"line_start":9,"line_end":9,"column_start":8,"column_end":14,"is_primary":false,"text":[{"text":"struct Monkey {","highlight_start":8,"highlight_end":14}],"label":"field in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src\\a1.rs","byte_start":112,"byte_end":114,"line_start":10,"line_end":10,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":" id: i32,","highlight_start":5,"highlight_end":7}],"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: field `id` is never read\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:10:5\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;14m9\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mstruct Monkey {\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;14m------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14mfield in this struct\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m10\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m id: i32,\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":"field `id` is never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":98,"byte_end":104,"line_start":9,"line_end":9,"column_start":8,"column_end":14,"is_primary":false,"text":[{"text":"struct Monkey {","highlight_start":8,"highlight_end":14}],"label":"field in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src\\a2.rs","byte_start":112,"byte_end":114,"line_start":10,"line_end":10,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":" id: i32,","highlight_start":5,"highlight_end":7}],"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: field `id` is never read\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:10:5\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;14m9\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mstruct Monkey {\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;14m------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14mfield in this struct\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m10\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m id: i32,\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":"3 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: 3 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,4 @@
{"message":"unused variable: `i`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":4789,"byte_end":4790,"line_start":175,"line_end":175,"column_start":13,"column_end":14,"is_primary":true,"text":[{"text":" for i in 0..monkeys.len() {","highlight_start":13,"highlight_end":14}],"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\\a2.rs","byte_start":4789,"byte_end":4790,"line_start":175,"line_end":175,"column_start":13,"column_end":14,"is_primary":true,"text":[{"text":" for i in 0..monkeys.len() {","highlight_start":13,"highlight_end":14}],"label":null,"suggested_replacement":"_i","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: `i`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:175:13\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;14m175\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m for i in 0..monkeys.len() {\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: `_i`\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":"field `id` is never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":98,"byte_end":104,"line_start":9,"line_end":9,"column_start":8,"column_end":14,"is_primary":false,"text":[{"text":"struct Monkey {","highlight_start":8,"highlight_end":14}],"label":"field in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src\\a1.rs","byte_start":112,"byte_end":114,"line_start":10,"line_end":10,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":" id: i32,","highlight_start":5,"highlight_end":7}],"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: field `id` is never read\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:10:5\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;14m9\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mstruct Monkey {\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;14m------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14mfield in this struct\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m10\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m id: i32,\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":"field `id` is never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":98,"byte_end":104,"line_start":9,"line_end":9,"column_start":8,"column_end":14,"is_primary":false,"text":[{"text":"struct Monkey {","highlight_start":8,"highlight_end":14}],"label":"field in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src\\a2.rs","byte_start":112,"byte_end":114,"line_start":10,"line_end":10,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":" id: i32,","highlight_start":5,"highlight_end":7}],"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: field `id` is never read\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:10:5\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;14m9\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mstruct Monkey {\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;14m------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14mfield in this struct\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m10\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m id: i32,\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":"3 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: 3 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,4 @@
{"message":"unused variable: `i`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":4789,"byte_end":4790,"line_start":175,"line_end":175,"column_start":13,"column_end":14,"is_primary":true,"text":[{"text":" for i in 0..monkeys.len() {","highlight_start":13,"highlight_end":14}],"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\\a2.rs","byte_start":4789,"byte_end":4790,"line_start":175,"line_end":175,"column_start":13,"column_end":14,"is_primary":true,"text":[{"text":" for i in 0..monkeys.len() {","highlight_start":13,"highlight_end":14}],"label":null,"suggested_replacement":"_i","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: `i`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:175:13\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;14m175\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m for i in 0..monkeys.len() {\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: `_i`\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":"field `id` is never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":98,"byte_end":104,"line_start":9,"line_end":9,"column_start":8,"column_end":14,"is_primary":false,"text":[{"text":"struct Monkey {","highlight_start":8,"highlight_end":14}],"label":"field in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src\\a1.rs","byte_start":112,"byte_end":114,"line_start":10,"line_end":10,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":" id: i32,","highlight_start":5,"highlight_end":7}],"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: field `id` is never read\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:10:5\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;14m9\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mstruct Monkey {\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;14m------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14mfield in this struct\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m10\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m id: i32,\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":"field `id` is never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":98,"byte_end":104,"line_start":9,"line_end":9,"column_start":8,"column_end":14,"is_primary":false,"text":[{"text":"struct Monkey {","highlight_start":8,"highlight_end":14}],"label":"field in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src\\a2.rs","byte_start":112,"byte_end":114,"line_start":10,"line_end":10,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":" id: i32,","highlight_start":5,"highlight_end":7}],"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: field `id` is never read\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:10:5\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;14m9\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mstruct Monkey {\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;14m------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14mfield in this struct\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m10\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m id: i32,\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":"3 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: 3 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
d11/target/debug/d05.d Normal file
View File

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

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

Binary file not shown.

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

Binary file not shown.

View File

@ -0,0 +1,7 @@
c:\personal\Programmierdaten\rust\advent_of_code\y2022\d11\target\debug\deps\d05-54bad1502471c435.rmeta: src\main.rs src\a1.rs src\a2.rs
c:\personal\Programmierdaten\rust\advent_of_code\y2022\d11\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\d11\target\debug\deps\d05-cd6375c08847f9de.rmeta: src\main.rs src\a1.rs src\a2.rs
c:\personal\Programmierdaten\rust\advent_of_code\y2022\d11\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\d11\target\debug\deps\d05.exe: src\main.rs src\a1.rs src\a2.rs
C:\personal\Programmierdaten\rust\advent_of_code\y2022\d11\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