not working :(

This commit is contained in:
Tim Nope 2022-12-19 13:50:59 +01:00
parent 4c3e0fc9ab
commit 83c28369c7
126 changed files with 305 additions and 1 deletions

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

View File

@ -0,0 +1,30 @@
Blueprint 1: Each ore robot costs 2 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 15 clay. Each geode robot costs 2 ore and 20 obsidian.
Blueprint 2: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 20 clay. Each geode robot costs 2 ore and 8 obsidian.
Blueprint 3: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 3 ore and 14 clay. Each geode robot costs 4 ore and 8 obsidian.
Blueprint 4: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 3 ore and 15 clay. Each geode robot costs 2 ore and 13 obsidian.
Blueprint 5: Each ore robot costs 2 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 20 clay. Each geode robot costs 4 ore and 18 obsidian.
Blueprint 6: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 17 clay. Each geode robot costs 2 ore and 13 obsidian.
Blueprint 7: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 12 clay. Each geode robot costs 4 ore and 19 obsidian.
Blueprint 8: Each ore robot costs 3 ore. Each clay robot costs 4 ore. Each obsidian robot costs 2 ore and 15 clay. Each geode robot costs 2 ore and 13 obsidian.
Blueprint 9: Each ore robot costs 3 ore. Each clay robot costs 3 ore. Each obsidian robot costs 2 ore and 9 clay. Each geode robot costs 2 ore and 9 obsidian.
Blueprint 10: Each ore robot costs 3 ore. Each clay robot costs 3 ore. Each obsidian robot costs 2 ore and 12 clay. Each geode robot costs 2 ore and 10 obsidian.
Blueprint 11: Each ore robot costs 3 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 10 clay. Each geode robot costs 2 ore and 13 obsidian.
Blueprint 12: Each ore robot costs 3 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 6 clay. Each geode robot costs 3 ore and 16 obsidian.
Blueprint 13: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 4 ore and 5 clay. Each geode robot costs 3 ore and 19 obsidian.
Blueprint 14: Each ore robot costs 3 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 20 clay. Each geode robot costs 4 ore and 16 obsidian.
Blueprint 15: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 8 clay. Each geode robot costs 2 ore and 18 obsidian.
Blueprint 16: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 2 ore and 10 clay. Each geode robot costs 4 ore and 10 obsidian.
Blueprint 17: Each ore robot costs 2 ore. Each clay robot costs 2 ore. Each obsidian robot costs 2 ore and 17 clay. Each geode robot costs 2 ore and 10 obsidian.
Blueprint 18: Each ore robot costs 2 ore. Each clay robot costs 3 ore. Each obsidian robot costs 3 ore and 11 clay. Each geode robot costs 3 ore and 14 obsidian.
Blueprint 19: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 2 ore and 13 clay. Each geode robot costs 2 ore and 10 obsidian.
Blueprint 20: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 5 clay. Each geode robot costs 2 ore and 10 obsidian.
Blueprint 21: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 3 ore and 14 clay. Each geode robot costs 4 ore and 15 obsidian.
Blueprint 22: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 4 ore and 20 clay. Each geode robot costs 2 ore and 15 obsidian.
Blueprint 23: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 2 ore and 5 clay. Each geode robot costs 2 ore and 10 obsidian.
Blueprint 24: Each ore robot costs 3 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 5 clay. Each geode robot costs 4 ore and 8 obsidian.
Blueprint 25: Each ore robot costs 2 ore. Each clay robot costs 3 ore. Each obsidian robot costs 3 ore and 17 clay. Each geode robot costs 3 ore and 10 obsidian.
Blueprint 26: Each ore robot costs 3 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 6 clay. Each geode robot costs 2 ore and 20 obsidian.
Blueprint 27: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 5 clay. Each geode robot costs 3 ore and 15 obsidian.
Blueprint 28: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 17 clay. Each geode robot costs 4 ore and 20 obsidian.
Blueprint 29: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 2 ore and 14 clay. Each geode robot costs 3 ore and 17 obsidian.
Blueprint 30: Each ore robot costs 2 ore. Each clay robot costs 3 ore. Each obsidian robot costs 3 ore and 9 clay. Each geode robot costs 3 ore and 9 obsidian.

View File

@ -1,4 +1,210 @@
use core::time;
#[derive(Copy, Clone)]
struct Robots {
ore :i32,
clay :i32,
obsidian :i32,
geode :i32,
}
impl Robots {
fn from(ore :i32, clay :i32, obsidian :i32, geode :i32) -> Self {
Robots { ore: ore, clay: clay, obsidian: obsidian, geode: geode }
}
}
// ore, clay, obsidian
#[derive(Copy, Clone)]
struct Cost {
ore :i32,
clay :i32,
obsidian :i32,
geodes :i32,
}
impl Cost {
fn from(ore :i32, clay :i32, obsidian :i32, geodes :i32) -> Self {
Cost { ore: ore, clay: clay, obsidian: obsidian, geodes: geodes }
}
}
struct Blueprint {
id :i32,
ore_robot_cost :Cost,
clay_robot_cost :Cost,
obsidian_robot_cost :Cost,
geode_robot_cost :Cost,
}
impl Blueprint {
fn from(id :i32, ore :Cost, clay :Cost, obsidian :Cost, geode :Cost) -> Self {
Blueprint { id: id, ore_robot_cost: ore, clay_robot_cost: clay, obsidian_robot_cost: obsidian, geode_robot_cost: geode }
}
}
fn parse_input(inp :Vec<String>) -> Vec<Blueprint> {
let mut blueprints :Vec<Blueprint> = vec![];
for blueprint in inp {
let tmp_str = blueprint.replace("Blueprint ", "")
.replace(": Each ore robot costs", "")
.replace(" ore. Each clay robot costs", "")
.replace(" ore. Each obsidian robot costs", "")
.replace(" ore and", "")
.replace(" clay. Each geode robot costs", "")
.replace(" ore and", "")
.replace(" obsidian.", "");
println!("{}", tmp_str);
let split :Vec<i32> = tmp_str.split(' ').map(|elem| elem.parse::<i32>().unwrap()).collect();
let id = split[0];
let ore_robot_cost = Cost::from(split[1], 0, 0, 0);
let clay_robot_cost = Cost::from(split[2], 0, 0, 0);
let obsidian_robot_cost = Cost::from(split[3], split[4], 0, 0);
let geode_robot_cost = Cost::from(split[5], 0, split[6], 0);
blueprints.push(Blueprint::from(id, ore_robot_cost, clay_robot_cost, obsidian_robot_cost, geode_robot_cost));
}
blueprints
}
fn evaluate_blueprint(bp :&Blueprint, robots_av :Robots, ressources_av :Cost, time_rem :i32) -> i32 {
let mut geodes = 0;
/*
possibilities:
create ore robot
create clay robot
create obsidian robot
create geode robot
*/
if time_rem <= 0 {
return 0;
}
// ore robot
if bp.ore_robot_cost.ore <= ressources_av.ore {
// update resources
let mut new_res = Cost::from(ressources_av.ore + robots_av.ore, ressources_av.clay + robots_av.clay, ressources_av.obsidian + robots_av.obsidian, ressources_av.geodes + robots_av.geode);
// subtract robot cost
new_res.ore -= bp.ore_robot_cost.ore;
// update robots
let new_robots = Robots::from(robots_av.ore + 1, robots_av.clay, robots_av.obsidian, robots_av.geode);
// evaluate rest of simulation
let result = evaluate_blueprint(bp, new_robots, new_res, time_rem - 1);
if result > geodes {
geodes = result;
}
}
// clay robot
if bp.clay_robot_cost.ore <= ressources_av.ore {
// update resources
let mut new_res = Cost::from(ressources_av.ore + robots_av.ore, ressources_av.clay + robots_av.clay, ressources_av.obsidian + robots_av.obsidian, ressources_av.geodes + robots_av.geode);
// subtract robot cost
new_res.ore -= bp.clay_robot_cost.ore;
// update robots
let new_robots = Robots::from(robots_av.ore, robots_av.clay + 1, robots_av.obsidian, robots_av.geode);
// evaluate rest of simulation
let result = evaluate_blueprint(bp, new_robots, new_res, time_rem - 1);
if result > geodes {
geodes = result;
}
}
// obsidian robot
if bp.obsidian_robot_cost.ore <= ressources_av.ore && bp.obsidian_robot_cost.clay <= ressources_av.clay {
// update resources
let mut new_res = Cost::from(ressources_av.ore + robots_av.ore, ressources_av.clay + robots_av.clay, ressources_av.obsidian + robots_av.obsidian, ressources_av.geodes + robots_av.geode);
// subtract robot cost
new_res.ore -= bp.obsidian_robot_cost.ore;
new_res.clay -= bp.obsidian_robot_cost.clay;
// update robots
let new_robots = Robots::from(robots_av.ore, robots_av.clay, robots_av.obsidian + 1, robots_av.geode);
// evaluate rest of simulation
let result = evaluate_blueprint(bp, new_robots, new_res, time_rem - 1);
if result > geodes {
geodes = result;
}
}
// geode robot
if bp.geode_robot_cost.ore <= ressources_av.ore && bp.geode_robot_cost.obsidian <= ressources_av.obsidian {
// update resources
let mut new_res = Cost::from(ressources_av.ore + robots_av.ore, ressources_av.clay + robots_av.clay, ressources_av.obsidian + robots_av.obsidian, ressources_av.geodes + robots_av.geode);
// subtract robot cost
new_res.ore -= bp.geode_robot_cost.ore;
new_res.obsidian -= bp.geode_robot_cost.obsidian;
// update robots
let new_robots = Robots::from(robots_av.ore, robots_av.clay, robots_av.obsidian, robots_av.geode + 1);
// evaluate rest of simulation
let result = evaluate_blueprint(bp, new_robots, new_res, time_rem - 1);
if result > geodes {
geodes = result;
}
}
if geodes == 0 {
let new_res = Cost::from(ressources_av.ore + robots_av.ore, ressources_av.clay + robots_av.clay, ressources_av.obsidian + robots_av.obsidian, ressources_av.geodes + robots_av.geode);
let result = evaluate_blueprint(bp, robots_av, new_res, time_rem - 1);
if result > geodes {
geodes = result;
}
}
unsafe {
static mut MAX :i32 = 0;
if time_rem > MAX {
MAX = time_rem;
println!("{}", time_rem);
}
}
return geodes;
}
pub fn run(inp :Vec<String>) { pub fn run(inp :Vec<String>) {
let blueprints :Vec<Blueprint> = parse_input(inp);
let mut score = 0;
for bp in blueprints {
let geodes = evaluate_blueprint(&bp, Robots::from(1, 0, 0, 0), Cost::from(0, 0, 0, 0), 24);
println!("{}, {}", geodes, bp.id);
score += bp.id * geodes;
}
println!("a1: {}", score);
} }

View File

@ -32,7 +32,7 @@ fn read_file(path :&str) -> Vec<String> {
fn main() { fn main() {
let inp :Vec<String> = read_file("input.txt"); let inp :Vec<String> = read_file("test_input.txt");
a1::run(inp.clone()); a1::run(inp.clone());

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":""},"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":""},"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":""}},"successes":{}}

3
d19/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,3 @@
{"message":"unused import: `core::time`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":4,"byte_end":14,"line_start":1,"line_end":1,"column_start":5,"column_end":15,"is_primary":true,"text":[{"text":"use core::time;","highlight_start":5,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src\\a1.rs","byte_start":0,"byte_end":15,"line_start":1,"line_end":1,"column_start":1,"column_end":16,"is_primary":true,"text":[{"text":"use core::time;","highlight_start":1,"highlight_end":16}],"label":null,"suggested_replacement":"","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 import: `core::time`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:1: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;14m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse core::time;\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(unused_imports)]` on by default\u001b[0m\n\n"}
{"message":"unused variable: `inp`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":15,"byte_end":18,"line_start":3,"line_end":3,"column_start":12,"column_end":15,"is_primary":true,"text":[{"text":"pub fn run(inp :Vec<String>) {","highlight_start":12,"highlight_end":15}],"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":15,"byte_end":18,"line_start":3,"line_end":3,"column_start":12,"column_end":15,"is_primary":true,"text":[{"text":"pub fn run(inp :Vec<String>) {","highlight_start":12,"highlight_end":15}],"label":null,"suggested_replacement":"_inp","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: `inp`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:3:12\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;14m3\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mpub fn run(inp :Vec<String>) {\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: `_inp`\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":"2 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: 2 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 import: `core::time`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":4,"byte_end":14,"line_start":1,"line_end":1,"column_start":5,"column_end":15,"is_primary":true,"text":[{"text":"use core::time;","highlight_start":5,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src\\a1.rs","byte_start":0,"byte_end":15,"line_start":1,"line_end":1,"column_start":1,"column_end":16,"is_primary":true,"text":[{"text":"use core::time;","highlight_start":1,"highlight_end":16}],"label":null,"suggested_replacement":"","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 import: `core::time`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:1: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;14m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse core::time;\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(unused_imports)]` on by default\u001b[0m\n\n"}
{"message":"unused variable: `inp`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":15,"byte_end":18,"line_start":3,"line_end":3,"column_start":12,"column_end":15,"is_primary":true,"text":[{"text":"pub fn run(inp :Vec<String>) {","highlight_start":12,"highlight_end":15}],"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":15,"byte_end":18,"line_start":3,"line_end":3,"column_start":12,"column_end":15,"is_primary":true,"text":[{"text":"pub fn run(inp :Vec<String>) {","highlight_start":12,"highlight_end":15}],"label":null,"suggested_replacement":"_inp","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: `inp`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:3:12\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;14m3\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mpub fn run(inp :Vec<String>) {\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: `_inp`\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":"variable does not need to be mutable","code":{"code":"unused_mut","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":5961,"byte_end":5972,"line_start":173,"line_end":173,"column_start":13,"column_end":24,"is_primary":true,"text":[{"text":" let mut new_res = Cost::from(ressources_av.ore + robots_av.ore, ressources_av.clay + robots_av.clay, ressources_av.obsidian + robots_av.obsidian, ressources_av.geodes + robots_av.geode); ","highlight_start":13,"highlight_end":24}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_mut)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove this `mut`","code":null,"level":"help","spans":[{"file_name":"src\\a1.rs","byte_start":5961,"byte_end":5965,"line_start":173,"line_end":173,"column_start":13,"column_end":17,"is_primary":true,"text":[{"text":" let mut new_res = Cost::from(ressources_av.ore + robots_av.ore, ressources_av.clay + robots_av.clay, ressources_av.obsidian + robots_av.obsidian, ressources_av.geodes + robots_av.geode); ","highlight_start":13,"highlight_end":17}],"label":null,"suggested_replacement":"","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: variable does not need to be mutable\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:173: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;14m173\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;14m...\u001b[0m\u001b[0m let mut new_res = Cost::from(ressources_av.ore + robots_av.ore, ressources_av.clay + robots_av.clay, ressources_av.obsidian + robot\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[0m\u001b[0m\u001b[1m\u001b[38;5;14m----\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\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[0m\u001b[0m\u001b[1m\u001b[38;5;14mhelp: remove this `mut`\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_mut)]` on by default\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,3 @@
{"message":"unused import: `core::time`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":4,"byte_end":14,"line_start":1,"line_end":1,"column_start":5,"column_end":15,"is_primary":true,"text":[{"text":"use core::time;","highlight_start":5,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src\\a1.rs","byte_start":0,"byte_end":15,"line_start":1,"line_end":1,"column_start":1,"column_end":16,"is_primary":true,"text":[{"text":"use core::time;","highlight_start":1,"highlight_end":16}],"label":null,"suggested_replacement":"","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 import: `core::time`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:1: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;14m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse core::time;\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(unused_imports)]` on by default\u001b[0m\n\n"}
{"message":"unused variable: `inp`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":15,"byte_end":18,"line_start":3,"line_end":3,"column_start":12,"column_end":15,"is_primary":true,"text":[{"text":"pub fn run(inp :Vec<String>) {","highlight_start":12,"highlight_end":15}],"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":15,"byte_end":18,"line_start":3,"line_end":3,"column_start":12,"column_end":15,"is_primary":true,"text":[{"text":"pub fn run(inp :Vec<String>) {","highlight_start":12,"highlight_end":15}],"label":null,"suggested_replacement":"_inp","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: `inp`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:3:12\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;14m3\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mpub fn run(inp :Vec<String>) {\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: `_inp`\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":"2 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: 2 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
d19/target/debug/d05.d Normal file
View File

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

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

Binary file not shown.

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

Binary file not shown.

View File

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