Add day 3 solution.
This commit is contained in:
parent
c9a483b2f4
commit
bbf346ba41
|
@ -0,0 +1,300 @@
|
||||||
|
dWlhclDHdFvDCCDfFq
|
||||||
|
mGdZBZBwRGjZMFgvTvgtvv
|
||||||
|
jwwJrzdzGdSbGGnNlzWczHzPHPhn
|
||||||
|
cczcbMBszhzzDBTBPPPGjtvtlt
|
||||||
|
LqJLfpwdLnvQLRGQjGtj
|
||||||
|
gSgnSJJCGSGpGSrwgfhchmmmHzcrHDmbrmMm
|
||||||
|
bVjstCsSstCLCrbSLnMpdMndcLddcqcpHR
|
||||||
|
wPZJQJwtBfJZmgBwPTcpTdcnfHMppcGMdG
|
||||||
|
gmFJzwPJJtszvNhCNC
|
||||||
|
DmjZDMZWDqGRqqRpHmmRLTTNTPTfCQJQQLJHTClc
|
||||||
|
FtzfvrfFwVgtzztgBLJNcNlTcTVNNQLN
|
||||||
|
vgsdbzzrwtqWfWRpZDdZ
|
||||||
|
rJhqRhLHhdcQqdHqfQGfPGstgGPlWttM
|
||||||
|
DzCpDDmnNCmBZBZnVBmZzBGPfsbglfNPwgPGPMWsWWft
|
||||||
|
BZFnlmpBpBzDzVZmhFHFrrrchhRqTdrc
|
||||||
|
DWCCWFNqdGFdPVcb
|
||||||
|
HllttQsTRlJlsblrHlhdmPLVcVcTccndLvPLmL
|
||||||
|
HSlstHgJltghhRrzNBNDzSwMjNZwNb
|
||||||
|
dzGSHCWSsGVVSdHVHHWWVVDCgJDpQqLTTRJpgmTLRmJTTpTR
|
||||||
|
BvNjMPZMBtBBMvvNMNttlhLQqCJpLmhTRQqQJgRJLQQg
|
||||||
|
llNncBlMCwwMnwPZrGsVHzcfFGdHGFGs
|
||||||
|
JfZhphMMQmFzDTDjSdrQjQ
|
||||||
|
sqHCbCwBVtbqbCqtrWdjzlSJTlrTSWBn
|
||||||
|
bHcwbGCGRssNscwtHNbwvmRFvpFFJFvLZMmPLFfv
|
||||||
|
qBCrzznVmDCmMMDNgrgcrvHHcgbQcW
|
||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|
RJrttBtNQCsNzTpShhHFDwFlth
|
||||||
|
QNzQFjNFrQPNbmPpqTTDGswWmB
|
||||||
|
ggHRcSlcCVCSzMVqDGwgqTWpsmqwqG
|
||||||
|
cltzCZtLClHRRtMZZLQjfNvtrJfhvrddvNNd
|
||||||
|
mcfWHffBFnQRQlTFdv
|
||||||
|
wssSLVbbzDVbzbggzSzNshNMnvnljRdvQRlMBjvQdnCj
|
||||||
|
bhDzVSSJDDJhDLBwtbDzzbbWppfpcmWGmprqqGtqprcHPp
|
||||||
|
rpVFrZpgHWSZrFPqhzwcqPwmcVBD
|
||||||
|
vMTnQJjQLCbljvvQzTMbTjPNdBLwwDhmhNNqPwmmhhBh
|
||||||
|
jvGjjQJnrspGHgFz
|
||||||
|
sjssjtZlcphZHwWvcrHTwWJH
|
||||||
|
qDdzzrFNNNDGdFDzzVBVVvfWJPfgPmgWPgvwVH
|
||||||
|
nqMQGDrnLGnqqLNqjtCZZjsMhZhCMbtl
|
||||||
|
JJJsLFmzsrFlSpzPscjgHhnRnmvcjqRvvj
|
||||||
|
fCMQbCbTjjqTGhjc
|
||||||
|
bfdbWdCddfBbtCfbfbqVWQQpPlBrJLJJSSLwppFssFzLzp
|
||||||
|
pdbbzlffWtJbgQwhcphQcCCg
|
||||||
|
vHvLFvVLvSfFRLnRFRNHjPjggcssQcjjsnwhsPCC
|
||||||
|
vGVGGFFVHLTvDRHDmBbTzfZWMdJZlfMm
|
||||||
|
wjCbjQgjTQhNNzgWQCWrDFMZmZDZDCrrMDpLpL
|
||||||
|
czGSPznnRGGJGGlVVRVBGGlBmDDcMDFDDZLqfffZFrrZqFpZ
|
||||||
|
JPGlvBSJHVGnVsjvQjjzwdwjzd
|
||||||
|
MFlWQHDTpnpsFNNQllWFWlhzjGgrgDzGGhGGjvmZDZrh
|
||||||
|
PtTPcTLbBCVPTRVcvhjmmhVhSZGGgvZg
|
||||||
|
JLPfCwPbTbBPJCfblplMpqWsMpMwWHQn
|
||||||
|
QbHVBBzWt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VHqMMRF
|
||||||
|
TsNSccnjLdcsLjdmjWvWvBhfmvWpCGhGhD
|
||||||
|
VWFFFPMpPVSMbTppHTnHTbRH
|
||||||
|
DtvfNdBNddDNSLjsvDTTHnzzHwrTrwsrwqbT
|
||||||
|
dgBLNffdgjjtfBQSvgNjNDlvMcQJmJJmZCMmVVVZFPFcPMGG
|
||||||
|
VWsQLHMVVSNRShWLhNSNLjbbbddbpDZDddcbZdDRztpd
|
||||||
|
FPlhhgPvThGFJndnnCCnJzzdCp
|
||||||
|
qrTfmllGvfvGqwNMMMsffsQsNh
|
||||||
|
NsmFqNlmnQRbCFsmJgSffpPcbvSfrVvpgS
|
||||||
|
LhZGDZhhwtDHMwDdHGhDjDpTzzPdzgTvcPvpSSpPrdrv
|
||||||
|
jgHMjBLhwtZMHMHmJNNJNFlBqlBJNn
|
||||||
|
bznSQggscgMcSTTfJbSQzQFwClMhmCmthClvMwFLwhZL
|
||||||
|
BRWBPBVVPjPNVHpVqlqrvtwFqmmLqltZmL
|
||||||
|
WDVddNHNvRgccgsDsgbT
|
||||||
|
sNgnQLtLLLPPnsPpqdqjBclpGWjcWjBG
|
||||||
|
rVCChSZhVrrwqVDVHSHmMjldGfJGfHddJGJlfGjGJj
|
||||||
|
CVZmDvZCmmhFVVrCgTNbbnQFgbsqNqNQ
|
||||||
|
WmMmSSfJNRRPfJRMRMtllCgdStgbgttgCdDd
|
||||||
|
QGBrvzwBczlgqCtDbvDq
|
||||||
|
QQpBGFrLQjQzGVVRNjPmNNWMbW
|
||||||
|
gGljnJhnJtllpNVCHWcccdTdjdmB
|
||||||
|
bLfSQDSMSHmBnwCB
|
||||||
|
LFMDrbFfFQZQRzLZnbgtlsRGtltpgNhgPpPG
|
||||||
|
cRThZZchCThtgTRhZTRtjWFjWNwqCjGmwFjqqffC
|
||||||
|
DPDPGzPMHDbrpqjfwrjqmjmp
|
||||||
|
JVHHDdVdVbvGMdnVdQVdDbHcRZllhRtgStRLThRSTcBTvc
|
||||||
|
lQWPSBrrPZGgPglGssDfHnWsfDFHHvHh
|
||||||
|
TDCqpttptJNLtwNpbwTqzqHshsvsMMFnmHMNfssmvmvf
|
||||||
|
JCjqVpDtrBjQjrlj
|
||||||
|
wFGWGpFLvCczNSWWsz
|
||||||
|
tlfgtftjlbtHHlDBsBzmQQnsQDQsCn
|
||||||
|
gjfrsVqVgPlfqhvLdvdwZhGq
|
||||||
|
pHpZHBSvRvRCBBZCTMngRnWndnRmWcgg
|
||||||
|
jsfrfrjJFDwDDMMggMCGWGcfmG
|
||||||
|
qbCszCjtCjQsQrtZVBHBHvBvqLZvlp
|
||||||
|
scFzsPScNgNPNgQzpttlCBCwpLrMLCrDdljLwq
|
||||||
|
TjfGZZjVwMZwMLwr
|
||||||
|
vnGbWTvTmFRjQFQPsb
|
||||||
|
bVLrzqrzJVgJbbtVrWJVgppcBCzBvdzwBCCBHDcBvc
|
||||||
|
hflPQnMQmQSRlQMPNRTHwwHHHqpHpdfwdBCp
|
||||||
|
hFhZMhqSNMNbrZgWWGWJjZ
|
||||||
|
NJsgNjJlMHQrwnRgSRPwrP
|
||||||
|
tqpQtTFpFvbGpzTTWSrnSbrhwChCnRfrCf
|
||||||
|
GtcvGqQpttzcqdFzWppDsZMJjBBsBJcBNmBjMsLJ
|
||||||
|
lGfZGZhFfhdSWqmFFWSS
|
||||||
|
wDRDPLcDnjtWbSmqrSCSLC
|
||||||
|
MPwmtVnVMjztznHPgQhQfJfvvHHGggQZ
|
||||||
|
llTspLllCHmLHHndldqHdlLQQPSBQczZSFDDQZSNGcGG
|
||||||
|
jMhwvVrRjbRhFBZNGPcGNN
|
||||||
|
wVtrrtRwrfrwftjVjwWvMrRpsqsnsHsBglslCmTsdWdHTd
|
||||||
|
vPvmTGgDPRvGpDPGPqGHQnWJQJMBBzJBlBQWlHWl
|
||||||
|
bfbwNsmwFdLjbfrrLsSfLNQtMllznBzJQZMQtMlZZnnF
|
||||||
|
frssSscssNfScCjfSCwjsDmRDpGmDRDvvvVcvRDvRp
|
||||||
|
LtlPZPjBTbWsWJVJVzdT
|
||||||
|
nnprqhrqmzfrSrphqfCChVVGVDJWgSHHWgWsRDVHWd
|
||||||
|
nrmppNqhcCrfMchcMCncqbzPZvlvlwbBNjPjtNjZjL
|
||||||
|
FPWsFdSspVbbbtWVvl
|
||||||
|
CCHnnfHHvCwtVMhzlzDllC
|
||||||
|
LrGnjGfgfvcwfgrLrBjrBLgwdBTSRBFsRZdRsSqFFSFSSPPp
|
||||||
|
whGCLqsrjgGhhGFqrCCFGCGzTRTZJcNnzlLTnznNHcnzTH
|
||||||
|
ddvVmbfvdvVbDVQdvvdSzpNcnJzlzSRHNJpnJcSc
|
||||||
|
BPdvfQdWtPDDPfDvDQVVPmbhssCGGMqgFCFMqGMWgMjrRw
|
||||||
|
PSLbGmWPSPLQbMTPWGFWltthdDdrmBDHhdDdczzDRh
|
||||||
|
VfCngVfgsZwCftrZdhcZrdNDzz
|
||||||
|
CjVJJJqnJwQhWPPLQlGj
|
||||||
|
ntnnQmTQTQGVWGNGNNlClG
|
||||||
|
jDffjMSvqjHzHHzwNVwNVcCddPVNdD
|
||||||
|
ZszJsrrZMjsHqqvZJLRQCbTRQbJmThbt
|
||||||
|
BgLHgFDsJNWgQgflWd
|
||||||
|
mnVVcCHnCGRcVnZSjmlthftMQddlfhQctNfW
|
||||||
|
qbSGqmHSTFprvpvTTL
|
||||||
|
dvdTMvvpdLpTcSLvdLLMmhfFBftwCNhRwRNjtCTRCf
|
||||||
|
lshQWgsgrHHqlFfRqFjRFfFwCB
|
||||||
|
rsgHQbJbrsGHHlgQHgJrlHrPZdhdpMZGDSDpdPLcZhdvhZ
|
|
@ -0,0 +1,44 @@
|
||||||
|
use std::fs::File;
|
||||||
|
use std::io::BufRead;
|
||||||
|
use std::io::BufReader;
|
||||||
|
|
||||||
|
pub fn run() {
|
||||||
|
let file = File::open("resources/day3input.txt").expect("Input file not found.");
|
||||||
|
let reader = BufReader::new(file);
|
||||||
|
|
||||||
|
let mut priority_sum1 = 0;
|
||||||
|
let mut priority_sum2 = 0;
|
||||||
|
let mut counter: usize = 0;
|
||||||
|
let mut group_sacks: Vec<String> = vec![String::new(), String::new(), String::new()];
|
||||||
|
|
||||||
|
for line in reader.lines() {
|
||||||
|
// Part 1
|
||||||
|
let current_line = line.unwrap();
|
||||||
|
let (compartment1, compartment2) = current_line.split_at(current_line.len() / 2);
|
||||||
|
let common_item_code = get_common_item_code(compartment1, compartment2);
|
||||||
|
priority_sum1 += get_priority(common_item_code);
|
||||||
|
|
||||||
|
// Part 2
|
||||||
|
counter += 1;
|
||||||
|
group_sacks[counter % 3] = current_line;
|
||||||
|
if counter % 3 == 0 {
|
||||||
|
let badge_item_code = get_common_item_code_part2(&group_sacks[0][..], &group_sacks[1][..], &group_sacks[2][..]);
|
||||||
|
priority_sum2 += get_priority(badge_item_code);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
println!("Day 3 Answer 1: {:?}", priority_sum1);
|
||||||
|
println!("Day 3 Answer 2: {:?}", priority_sum2);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get_priority(item: char) -> usize {
|
||||||
|
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".find(item).unwrap() + 1
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get_common_item_code(c1: &str, c2: &str) -> char {
|
||||||
|
c1.chars().find(|&c| c2.contains(c)).unwrap()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get_common_item_code_part2(c1: &str, c2: &str, c3: &str) -> char {
|
||||||
|
c1.chars().find(|&c| c1.contains(c) && c2.contains(c) && c3.contains(c)).unwrap()
|
||||||
|
}
|
|
@ -2,6 +2,7 @@ use std::env;
|
||||||
|
|
||||||
mod day1;
|
mod day1;
|
||||||
mod day2;
|
mod day2;
|
||||||
|
mod day3;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let args: Vec<String> = env::args().collect();
|
let args: Vec<String> = env::args().collect();
|
||||||
|
@ -11,6 +12,7 @@ fn main() {
|
||||||
match &day_to_run[..] {
|
match &day_to_run[..] {
|
||||||
"day1" => day1::run(),
|
"day1" => day1::run(),
|
||||||
"day2" => day2::run(),
|
"day2" => day2::run(),
|
||||||
|
"day3" => day3::run(),
|
||||||
_ => eprintln!("error: invalid day")
|
_ => eprintln!("error: invalid day")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue