d3p1
This commit is contained in:
parent
8ea82daa5c
commit
ab9d8fb2b1
7
day3/Cargo.lock
generated
Normal file
7
day3/Cargo.lock
generated
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
version = 3
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "day3"
|
||||||
|
version = "0.1.0"
|
8
day3/Cargo.toml
Normal file
8
day3/Cargo.toml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[package]
|
||||||
|
name = "day3"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
300
day3/input.txt
Normal file
300
day3/input.txt
Normal file
@ -0,0 +1,300 @@
|
|||||||
|
qFdBBvtHHfvRlfvsqldvqjPpQmnQmjnjjjTRTLGRNG
|
||||||
|
ZCWhhCsJCzSJzSbzgsmPTGNNPPNGjgLTLjgn
|
||||||
|
WJZsbJMwJcszJcScwhVltFwBFBlqddvFdHDfqq
|
||||||
|
crtTsGTtqFThGQGCrsjTwdNJwpRdnJJwffRClpSf
|
||||||
|
PWVBPVHLvHHVgvZWBzmPpnfRSJJRQnSRflRPSNSl
|
||||||
|
gmzBzDgzmZQWLDLLgVmDrqGhsscrqDMGhcqtqcFr
|
||||||
|
HsbcdVrsbVbcLfPqqQsqqtPj
|
||||||
|
mMBFzZRnmFMRBDnDFBGZDGdDqLjtdQtPtgfPfttgtqgq
|
||||||
|
BZvZZdJMBFdJhSvhbhchcHll
|
||||||
|
GNRSqRfcNTpfGCcqjfzBpDQPWBzgDpQsPWzW
|
||||||
|
rrSdnVHlbMdLdBDzgtBtBmQt
|
||||||
|
rbFwwnLFLFwlMLrFwFhMVLrGNSTfZTRhfTqjGJRRZTCNcf
|
||||||
|
QWTnQCnWNNWmTnSPQwmqDbcscbpcjPjVPbrjp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ffL
|
||||||
|
rWMVQtrFlbFlSSMHVSdHHNHdcdDcddzppzzm
|
||||||
|
bTpjpjcVTLmphbLppJwqzqwJLqqzzzgRLJ
|
||||||
|
sdHNbrvNHrqPvZZZPRww
|
||||||
|
bNQCrCNtNsSlhffhVhpVWFCW
|
||||||
|
lpNnpMMZZDbNbnBjcrbjvScFmbGj
|
||||||
|
wqhdqVqdscrjdLsv
|
||||||
|
HQftVqWCfhwqtCCjWwfqzzVPZRJQgMlggZMMMZTNMNTnNRTN
|
||||||
|
fvvGbFtVmtTwgtMT
|
||||||
|
WcCcClzPCCcczJJScPWWZzBDmwbhBBHSghgDDMTHMDBD
|
||||||
|
nWPljWzZWnbcbRsNFjFFdFdVjFsj
|
||||||
|
NQrcLNmQGRfGLHHLZgbbnpjZJJJndbgnlv
|
||||||
|
DWtThDWtzzhltWTwjbdpvjbgqjgg
|
||||||
|
VtSPFWtBPBFSFBWCStshWBmlRfHfMRcfQLQLLlmCrCcN
|
||||||
|
pbmwqJnqSJVwwDPCjZZzrZfD
|
||||||
|
QtssBTvNdNvNtQvQGpGhdjPjDjczZDfjhgPPDcgjgr
|
||||||
|
GltptQpMGNNpRWlWFVFHJFHLWH
|
||||||
|
ZLLsDGGVhZcQQLhrLshrVFwHnWqJnWMnJJJnqfWfGn
|
||||||
|
jMlPdTlPlgCgFpngFWFnJfpw
|
||||||
|
TlTNbdSSTSTmTjPMTCdBPjBMrLDczsZcNrDhRNDRQRLLRVVz
|
||||||
|
HDLpBqDVVTvwGDDNRT
|
||||||
|
PlVWjfhsPMMmWtlFNTrhrrvCCCTNNbvw
|
||||||
|
lsglfgVJmsfMjJfSqSzdZnLgqcnLnp
|
||||||
|
pfCDJWBpfDffpJLgQJzzVzNrgNgNgNhNzmVr
|
||||||
|
ZnnGZbGTPZnsnRFdTlbrwdrNzrrmmWwmwVwttH
|
||||||
|
GbPGRvTnZljWnpqSMMCjqJQSCf
|
||||||
|
ZgnFgwggznFrfrwfHhNMMr
|
||||||
|
pctLCLRhPHBLMLWfBL
|
||||||
|
JJcdJcQCCJmQJppmlgndnFslsVnsvghZ
|
||||||
|
WpMgTppWGSWWJmJDpJcJJhqm
|
||||||
|
zZzjZNHvNjPvNsbZLbRLzsPcqhVJSVttdwhwmdRhtdJRVd
|
||||||
|
sLbvvCZCPSSSbbPfNlQQTQGBllCTnMnWQn
|
||||||
|
fwbwswddwSbBfDBggMBPDPhHcPWDmhHhmWnWPC
|
||||||
|
FQFlzLCzQTlrTTzvltFqFrmhPHjnhhnnchcJWcRRmRRq
|
||||||
|
lpLzlFZzCltrTNlTztQLZfSMGBNdSBVwbBNVSMSbVs
|
||||||
|
FMmgbTFdgLSgFQdjrRPrQBPDdj
|
||||||
|
ZqqWRvsfGrrPvvPC
|
||||||
|
wZzwnqccRwRNNpRSMztSMMFbgzLTFS
|
||||||
|
qTwBPfTfqQDMDrssHdvtRHccHMjR
|
||||||
|
gWSZGWzGFhnFFgnhNsRHtRdsVjZcRjHs
|
||||||
|
jgplhpJJFgnDrrwfqprwDP
|
||||||
|
CWhMSRfWhVVnRSZnVVdsLQqQMzGqLBvGMQqczv
|
||||||
|
PHbpNwrjJplttvcclLlQzzDszc
|
||||||
|
NrJbJrFNNJNPrmwrtbjtNmCfSWfWhSZZfSWCsfShfFVR
|
||||||
|
VLhRPLGLRPRSStRRLwfGqfmDwbmqbqqDlD
|
||||||
|
rBSFvppnzTbwDwlDcFWm
|
||||||
|
MJrnJTMvMsrTsPtshRNPZdSLhL
|
||||||
|
BZBrRCrnCQBBnZfGqhGGMMRcthMhMG
|
||||||
|
TLjsCdDCPTvNssjdsPsDgsgqGcPHczchtHczWzPWzzlWhG
|
||||||
|
gsTpsdNbvNNjNSpsNDTsmCnSVQFmSFwZnQBnmnQQ
|
||||||
|
llbsNsWrmbrGbWCNtBjcCFBzQFZBCFjF
|
||||||
|
LdSpwgdqSgzwJdRdLMRHLjQQjHjFHctjHBDTZj
|
||||||
|
gSppgpSJMhpzwrhblfbhhlWlnW
|
||||||
|
DwhTvvsJZWsBnDzPpBLbFp
|
||||||
|
GHtNGRGNdzbMBBtmBt
|
||||||
|
NljlCSVSHdjGSQRGlCQSCswqfWzhZfTcfzcJvshJ
|
||||||
|
lmsGNFsDGqCbFQBbffjjwpzptw
|
||||||
|
hRQdvdrvrvSngWnvnHrTMfzfzRtftzwVTwwpzB
|
||||||
|
HnSSWrvLJvWJGFDsmFLPDFcQ
|
||||||
|
bwwpGphpLghpTvpWphvJlFLJqqltjSjVlSStSR
|
||||||
|
cmszZdDdBZzcNcDCDcNsmNMcqVjMJStFRJltVPVrlVPjVJll
|
||||||
|
HcdmcCzzzQcHNcsCdpnGnhwGgnRggHvbbR
|
||||||
|
CfMBbwBGbMbDCFrDvhFFDT
|
||||||
|
mjzRjjRdSmjPnzFZgnnrTT
|
||||||
|
cmSsVcHjLHTwMfLBpBpBwM
|
||||||
|
whqqfZzgHvhSzzVNVDbpDbmbVbNpJD
|
||||||
|
GcQFntGTCCcCTMCTGBlJsJsDDWpRbWBsJpNS
|
||||||
|
FnPcrGFFdddMnCnTqgqgqPHfLjLqgSzz
|
||||||
|
zMSzzjssFdGnszRtNftqqwFHbbZw
|
||||||
|
RRPLVrgrwHqBqgwt
|
||||||
|
rPWmLCTCQlCQQmmrWLrQShJshhzdhhJjcSjlzRds
|
||||||
|
lvgvCDfPqLHppqpCCDJncbntttbBtBBVHjwtrB
|
||||||
|
TdddszSQsWcngjzVbcVZ
|
||||||
|
hRWsTRTGQhNRGhRTFSWmlpgfqlvLmplPqvvGgv
|
||||||
|
LbWFLQdWWPwWSjSHPHRfppHHDRpggR
|
||||||
|
zmqqNNzlzmnzzNCmVCmtBzpfGsfpBgDgspprcfcfsrRB
|
||||||
|
qNNVNJtNmmmNzznVJzvCTDZWhvZZjZFbWQQhFhbZSw
|
||||||
|
DjdHqJVVhHVZjhDHPWtDtZLFBRBFmSRTFSbwmRRTffTTJf
|
||||||
|
NNznnGlgMQsnQzNclzpfSRSMRmfPMmFRwBwB
|
||||||
|
vzrcGcNcPPvHvHPt
|
||||||
|
wLCcmZwWTNtZNdMSMGSCnJGGMB
|
||||||
|
RFbHsPhVvFPRjlshhrnQnGjQGSdSqJfqnQBM
|
||||||
|
HhzVlFHhPwzScmSTgL
|
||||||
|
TNlBhDNvNBFpJgpPPpDQ
|
||||||
|
jjfCdCZZqsCZsbdqPgFGGMRzSFMqQMRS
|
||||||
|
jnWPtWssCtWcmZbbtstvnrrvhVBhTNNhBHlBlL
|
||||||
|
DZwNWPDzPVWbJngrQjrNnrQcMg
|
||||||
|
GRRfttLBhhvTvmLmFcFcgFFSnjWrnsrG
|
||||||
|
TLthBWtTRLHqhlLLfmhBqVPDJVdPwzJCPPZHwdDdVd
|
||||||
|
GGVhrVSMQwQqfVssVvnWFgvgWn
|
||||||
|
jtlcRBBtQRmpWsjzFCvzWnvF
|
||||||
|
QPcRbpppDmNDtPPblZMfhZdDwdMrqSSGrq
|
||||||
|
ZRrdtBdQvQsWnnfWFZsF
|
||||||
|
bJLcMzNDLbMgwfnGMWFv
|
||||||
|
lpvhmzNDmDmlNbzbmrVVPrHRCPHQBVCP
|
||||||
|
rZllQrsRWrlQswccMVbGbVbTdcQQ
|
||||||
|
NtJCntLSHCjznfLTcGGGqWMdWM
|
||||||
|
jCtzzSFthhSSSjPJrFDlvWrlDZRpwpRZ
|
||||||
|
mQmbLjbrLQjLmTtwwWBTTvWjtt
|
||||||
|
BHSqdHclHHNFlppNqWPwfwDvTfDPPtCw
|
||||||
|
ddSGMGHcdcMhMZnBbmbZmgGJJg
|
||||||
|
lvvBzvDnlzjfPnfjnQPlldRbVbRqbqqCgsqqVpQQgVqc
|
||||||
|
NNFtGNMtTNFmJNGNZtZMwVRTTcsCpVTbbgCbgRhscp
|
||||||
|
FGNGZMtNLWmmJWGFWJGLSNtPrPnBfDzzvjnDBzpnvDBLnv
|
||||||
|
fwvQRFQvQqwpwNJrwN
|
||||||
|
BstDnBjhjBhnshSptpJzWqNppbfr
|
||||||
|
CsDjCdZcBCDcjnfDHfhnfggZMGlgQVmgMTRmgVGMMl
|
||||||
|
MwlBVqVlsgnmzwJsvjhWZhGPvjvRRWzG
|
||||||
|
QNQpQpftHdHHCHGfSpCrQNdSrDRDhchhjvjcPrRRWrPvhZjv
|
||||||
|
LtLSCTSGfHGdGwswnqsggssTqV
|
||||||
|
qDDCHjzjznTvWshZQWfnZZ
|
||||||
|
PFFmmNMMtNMVFtczcFPJNrLhZwQZQsSvvSvWvGQQJQssss
|
||||||
|
tFzrrPPNNFlzVrpRTpblRDqjTpDC
|
||||||
|
DWDrrBdpmdpBrCgDthdtfcHsqJsCqscqwfsjzHcq
|
||||||
|
TNLNFNSTQNQTSnlMcczVJjVzsqLDDfJJ
|
||||||
|
TFPZQRvvlMSPPtRWDtmDRWrBGr
|
||||||
|
LWGVZdrvWdpLGWRsjPMsHmdHdHldlj
|
||||||
|
zJzznChzzzCSfTgMhCPDmlDCbmlsmjDDQj
|
||||||
|
nSTTJhJtnShNtzwhgNrGRRWZZRvMWMtVrqGp
|
||||||
|
PbPmtNmBbPlqBvqlDJBT
|
||||||
|
LpGVDzVpVZqqSTvq
|
||||||
|
pMnWGLRLRppnGpGndrGPtgDCjMPmbPgCQmPPNN
|
||||||
|
sqcZcbZZpcZspcCCRMmznWGWdLWhwDRGTTWggT
|
||||||
|
NjFSJgVHrvfVtrGzWdSznDwLSTLn
|
||||||
|
jFrBNVVjBFNvHrFHBlBFFpMslPgPcpMPmcQPPZCgpP
|
||||||
|
frddqsThtsTfTbPcvhsrbsRLpRBNRpmDpGmRGcRNLpGp
|
||||||
|
QWJHCJwWzlHZQZHQCJJRzRqnLDGRGpnGBRnNDN
|
||||||
|
CVwHCClJjQgWCZVZQgMwSdthjrqvrSPPhdbqtPhs
|
||||||
|
TvdphBBhhhCgdLNNJJJLWz
|
||||||
|
fVcsqRVrPcnJWgDnJN
|
||||||
|
JlqsRJtssZwqwVtPwltRPsHHbFTwTFbpjHhQjTQbvpTF
|
||||||
|
cQSnP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vpGndJtgdsgNd
|
||||||
|
wDQwQhtQhQRmSmjsJndJdBBJBJnlLS
|
||||||
|
hwhmRrzFVjtwzDmrVFrvPCcCMVPPvfqpCCTVVb
|
||||||
|
jRrRNPNRWjPRWPRQNjQjThTCzBBzDCFBGzgDFGGQ
|
||||||
|
dnppLwmwCnvtlqltvtnTGBThGhdFZhgzDzGccD
|
||||||
|
MvnqpLlMqCqCHMjWPPHMSHSs
|
||||||
|
NNpNNvpvBdtTrMFFMhSSwzjzchzwhzwL
|
||||||
|
VVndHqflQZZZgHSLLhjzRSmZRhcR
|
||||||
|
glGgnqbQlngnWCGJpJprtrtFrdPPGs
|
||||||
|
WqwRjzGtRzZZRRGjWBJzjwmfMTHGGssTTDsrLmmmQLMD
|
||||||
|
SNdvSdFlSNNhSPFFcPFclbQQslHmfHTDsTQMLgDTmHQQ
|
||||||
|
CNcCFvpdnWpjWwJf
|
||||||
|
PVPnVHcnRncGZqbVzHVPnnLbSMjwrzWMjSwDtWwWtwWhwDWz
|
||||||
|
pTfsQCshCllpglWWSjBMSQSrMrjM
|
||||||
|
hvpvppggCpJTvTmshgfsmZRRHqbcLPHZmPLRnmPZ
|
||||||
|
LQbhVZZmZhZjBdbGmgHqnHTmvqgnnWHr
|
||||||
|
SzCfDFFNRfsSFFMFfvprvpWzqzgqTwHTvp
|
||||||
|
CDNDFJgMDSQhjVdPJLQG
|
||||||
|
plpdLdpjjrrHJJjLrrHLFdbzzCcvzgFgcwggzPMFvvcMhM
|
||||||
|
GRtSBQNsQlMPRzRlzw
|
||||||
|
ZSTtsmBlmjLLpnpH
|
||||||
|
hglGNVSdNSghzSgCBhDFLBMBtFMMFtHtbtLL
|
||||||
|
frQZccRcqGFmFHrJ
|
||||||
|
nvfGZwvTwGTfQwvfTwfgnCSlpdnzgzslppCsCV
|
||||||
|
snTSPbQnTTnQgbmsTJsLfZwjffhpLnGRjpGfjL
|
||||||
|
dcNWcNHHlNtWHHlCtltWNFNMLZwjpGfpmrZfrFprrRGpwZfp
|
||||||
|
HmdNWCmDMVvQPDgqJs
|
||||||
|
GGFtSngQLfnSnQffgPnRgFRGRwmRJvwbBbJDwjvTbjrwhJvJ
|
||||||
|
WHClslcNNWcqNWlCZdcHsVrThBwBjbhDTDBhrvDZJTwm
|
||||||
|
NWVqqcHHNpsNcNVdVlhCMlHQQMQQzLfzQPttFGPMLSLgtF
|
32
day3/src/main.rs
Normal file
32
day3/src/main.rs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
use std::env;
|
||||||
|
use std::fs;
|
||||||
|
use std::collections::HashSet;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let input = fs::read_to_string(&env::args().nth(1).unwrap()).unwrap();
|
||||||
|
|
||||||
|
let mut sum: u64 = 0;
|
||||||
|
for line in input.lines() {
|
||||||
|
let mut left_chars: HashSet<char> = HashSet::new();
|
||||||
|
let mut dupe_chars: HashSet<char> = HashSet::new();
|
||||||
|
|
||||||
|
for (i, c) in line.char_indices() {
|
||||||
|
if i < line.len()/2 {
|
||||||
|
left_chars.insert(c);
|
||||||
|
} else if left_chars.contains(&c) {
|
||||||
|
dupe_chars.insert(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for c in dupe_chars {
|
||||||
|
if c >= 'a' && c <= 'z' {
|
||||||
|
sum += (c as u64) - ('a' as u64) + 1;
|
||||||
|
} else {
|
||||||
|
sum += (c as u64) - ('A' as u64) + 27;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
println!("{:?}", sum);
|
||||||
|
}
|
||||||
|
|
6
day3/test.txt
Normal file
6
day3/test.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
vJrwpWtwJgWrhcsFMMfFFhFp
|
||||||
|
jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL
|
||||||
|
PmmdzqPrVvPwwTWBwg
|
||||||
|
wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn
|
||||||
|
ttgJtRGJQctTZtZT
|
||||||
|
CrZsJsPPZsGzwwsLwLmpwMDw
|
Loading…
Reference in New Issue
Block a user