day8/1: added
This commit is contained in:
parent
37818823a8
commit
503bbd176a
|
@ -1 +1,66 @@
|
|||
const INPUTS: [&'static str; 2] = [include_str!("./sample.txt"), include_str!("./input.txt")];
|
||||
#![feature(byte_slice_trim_ascii)]
|
||||
#![feature(test)]
|
||||
|
||||
use std::{cmp::Ordering, collections::HashMap};
|
||||
|
||||
extern crate test;
|
||||
|
||||
const INPUTS: [&str; 2] = [include_str!("./sample.txt"), include_str!("./input.txt")];
|
||||
|
||||
fn process(data: &str) -> usize {
|
||||
let mut answer = 0;
|
||||
|
||||
let mut data = data.split("\n\n");
|
||||
|
||||
let seq: Vec<char> = data.next().map(|x| x.chars().collect()).unwrap();
|
||||
|
||||
let mut map = HashMap::new();
|
||||
|
||||
for line in data.next().unwrap().lines() {
|
||||
let (start, remain) = line.split_once(" = ").unwrap();
|
||||
|
||||
let (l, r) = remain.split_once(',').unwrap();
|
||||
let l: String = l.chars().filter(|x| x.is_ascii_alphabetic()).collect();
|
||||
let r: String = r.chars().filter(|x| x.is_ascii_alphabetic()).collect();
|
||||
|
||||
map.insert(start, (l, r));
|
||||
}
|
||||
|
||||
let mut i = 0;
|
||||
let mut pos = "AAA";
|
||||
|
||||
loop {
|
||||
let step = seq[i % seq.len()];
|
||||
if pos == "ZZZ" {
|
||||
return answer;
|
||||
}
|
||||
|
||||
let (l, r) = map.get(&pos).unwrap();
|
||||
|
||||
println!("pos = {} l = {} r = {}", pos, l, r);
|
||||
match step {
|
||||
'R' => pos = r,
|
||||
'L' => pos = l,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
|
||||
answer += 1;
|
||||
|
||||
i += 1;
|
||||
}
|
||||
answer
|
||||
}
|
||||
|
||||
fn main() {
|
||||
for input in INPUTS.iter() {
|
||||
println!("total = {}", process(input));
|
||||
}
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn part1(b: &mut test::Bencher) {
|
||||
b.iter(|| {
|
||||
let v = process(INPUTS[1]);
|
||||
test::black_box(v);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1 +1,77 @@
|
|||
const INPUTS: [&'static str; 2] = [include_str!("./sample.txt"), include_str!("./input.txt")];
|
||||
#![feature(byte_slice_trim_ascii)]
|
||||
#![feature(test)]
|
||||
|
||||
use std::{cmp::Ordering, collections::HashMap};
|
||||
|
||||
extern crate test;
|
||||
|
||||
const INPUTS: [&str; 2] = [include_str!("./sample.txt"), include_str!("./input.txt")];
|
||||
|
||||
fn process(data: &str) -> usize {
|
||||
let mut answer = 0;
|
||||
|
||||
let mut data = data.split("\n\n");
|
||||
|
||||
let seq: Vec<char> = data.next().map(|x| x.chars().collect()).unwrap();
|
||||
|
||||
let mut map = HashMap::new();
|
||||
|
||||
for line in data.next().unwrap().lines() {
|
||||
let (start, remain) = line.split_once(" = ").unwrap();
|
||||
|
||||
let (l, r) = remain.split_once(',').unwrap();
|
||||
let l: String = l.chars().filter(|x| x.is_ascii_alphabetic()).collect();
|
||||
let r: String = r.chars().filter(|x| x.is_ascii_alphabetic()).collect();
|
||||
|
||||
map.insert(start, (l, r));
|
||||
}
|
||||
|
||||
let mut i = 0;
|
||||
let mut pos = "AAA";
|
||||
|
||||
let mut stack = vec![];
|
||||
|
||||
for k in map.keys() {
|
||||
if k.ends_with('A') {
|
||||
stack.push((k.clone(), seq[0]));
|
||||
}
|
||||
}
|
||||
|
||||
println!("{:?}", stack);
|
||||
|
||||
// loop {
|
||||
// let step = seq[i % seq.len()];
|
||||
// if pos == "ZZZ" {
|
||||
// return answer;
|
||||
// }
|
||||
//
|
||||
// let (l, r) = map.get(&pos).unwrap();
|
||||
//
|
||||
// println!("pos = {} l = {} r = {}", pos, l, r);
|
||||
// match step {
|
||||
// 'R' => pos = r,
|
||||
// 'L' => pos = l,
|
||||
// _ => unreachable!(),
|
||||
// }
|
||||
//
|
||||
// answer += 1;
|
||||
//
|
||||
// i += 1;
|
||||
// }
|
||||
answer
|
||||
}
|
||||
|
||||
fn main() {
|
||||
for input in INPUTS.iter() {
|
||||
println!("total = {}", process(input));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn part2(b: &mut test::Bencher) {
|
||||
b.iter(|| {
|
||||
let v = process(INPUTS[1]);
|
||||
test::black_box(v);
|
||||
});
|
||||
}
|
||||
|
|
704
src/day8/input.txt
Normal file
704
src/day8/input.txt
Normal file
|
@ -0,0 +1,704 @@
|
|||
LRRRLRRRLRRLRRLRLRRLRRLRRRLRRLRRRLRRRLLRRRLRRRLRRRLRLRRLRRRLRLRRRLRRRLLRLRLRRLRRLLLRRLRRLRRRLLRRRLLRRRLRLRRRLRRRLLRRLRLLRLRRRLRRLRRLRLRLRLRLRLRRRLRLRRRLLRLRRLRRRLRRRLRLRRLRLLLRLRLRLRLRLRRRLLRRLRLRLLRRRLRRLRRRLRRLRRLRRRLLRRLRLRRLRRRLRRLRLRRLRLLRRLLRLRRRLRRLRLLRRRR
|
||||
|
||||
RHQ = (QNL, HDC)
|
||||
FVH = (LMX, SDD)
|
||||
MCR = (THP, XKJ)
|
||||
RFJ = (TVQ, HGJ)
|
||||
MLK = (KKF, MMK)
|
||||
JDL = (XXQ, BFT)
|
||||
KXN = (HFS, XFM)
|
||||
NJP = (MSB, PBD)
|
||||
KDR = (VFC, SBM)
|
||||
RKR = (MBK, RFS)
|
||||
RJB = (PQK, FHB)
|
||||
XTL = (LMG, LMF)
|
||||
QDD = (KFF, JSD)
|
||||
CFP = (VBK, XNS)
|
||||
BQX = (FFP, SKX)
|
||||
NSJ = (HNC, MLQ)
|
||||
KQQ = (LTG, TNH)
|
||||
KVN = (SSJ, LNK)
|
||||
QCT = (FQQ, LLX)
|
||||
LBB = (VMQ, THT)
|
||||
DPQ = (PGL, GTC)
|
||||
RTH = (QNQ, CMS)
|
||||
QLS = (NFV, FKX)
|
||||
FST = (DNQ, QJQ)
|
||||
MHX = (LFT, JDL)
|
||||
JLF = (CCF, JNJ)
|
||||
TQJ = (VVT, TBV)
|
||||
HSC = (LKR, GTS)
|
||||
GHV = (NFS, RNT)
|
||||
VBK = (CPT, MBX)
|
||||
HVV = (CFH, QGR)
|
||||
JMG = (LXR, NHP)
|
||||
DDJ = (LNK, SSJ)
|
||||
NKV = (HLG, TCT)
|
||||
QBG = (FHB, PQK)
|
||||
FKH = (DDS, JLK)
|
||||
TLF = (VKH, QLQ)
|
||||
NTR = (MLL, GKH)
|
||||
KFF = (MDN, HCD)
|
||||
NPF = (FCP, VLM)
|
||||
PKP = (HXS, KGH)
|
||||
DVV = (TDH, XKB)
|
||||
SNM = (BJN, SGS)
|
||||
JVC = (PKX, CGR)
|
||||
VLB = (RDM, VBP)
|
||||
RQQ = (KQQ, HHB)
|
||||
SHH = (RRP, CSQ)
|
||||
DPN = (HLR, LCK)
|
||||
MCT = (BQG, SMV)
|
||||
FNJ = (QML, TVP)
|
||||
RGK = (CTF, KTS)
|
||||
HNC = (VPX, PPR)
|
||||
JLG = (THT, VMQ)
|
||||
RJJ = (PLT, TFH)
|
||||
VRK = (CMS, QNQ)
|
||||
JGJ = (JLF, RFM)
|
||||
RMD = (BVV, XTG)
|
||||
MBB = (QTQ, MCH)
|
||||
KDN = (LMF, LMG)
|
||||
SPR = (KHB, BPG)
|
||||
TFN = (CTT, JGH)
|
||||
LXR = (VTV, GRD)
|
||||
MPX = (LSD, RDD)
|
||||
SDN = (FLL, XSG)
|
||||
RMR = (TMB, NKV)
|
||||
FJM = (STG, DLM)
|
||||
HKK = (VPV, HFQ)
|
||||
GQG = (JDL, LFT)
|
||||
SQM = (CJM, HSN)
|
||||
BFM = (LKX, LKX)
|
||||
KMH = (NDL, GNG)
|
||||
THT = (DXV, PHQ)
|
||||
XHT = (FXG, PVN)
|
||||
JCJ = (BVJ, FKM)
|
||||
MBX = (CKQ, CST)
|
||||
XPJ = (QHB, RKH)
|
||||
NLL = (KXP, RXV)
|
||||
VJD = (MBK, RFS)
|
||||
SGS = (QQB, DMG)
|
||||
FBS = (PQH, MCR)
|
||||
XFT = (FHC, PKJ)
|
||||
LXS = (GCR, FVL)
|
||||
CPC = (KFS, RTM)
|
||||
PKX = (CND, KFP)
|
||||
TKK = (XBR, NTR)
|
||||
NTJ = (QCQ, MJQ)
|
||||
DVC = (TPP, FBS)
|
||||
NVC = (DPN, CNF)
|
||||
CFG = (TRX, VFS)
|
||||
SDQ = (KMH, GFG)
|
||||
GNG = (RLH, FKJ)
|
||||
TXL = (XNP, XHF)
|
||||
FKM = (STF, BDQ)
|
||||
DDN = (NKG, CFP)
|
||||
KMB = (NKG, CFP)
|
||||
VQD = (TQJ, VGS)
|
||||
DBX = (BGX, SSX)
|
||||
QTX = (QCX, MSS)
|
||||
VMN = (SDQ, DFD)
|
||||
MJQ = (GGM, XSR)
|
||||
VGS = (TBV, VVT)
|
||||
HDC = (NNN, BNV)
|
||||
FVB = (TQS, XBQ)
|
||||
QML = (LDS, PVQ)
|
||||
GTS = (PJK, XQP)
|
||||
LLX = (QNG, RHD)
|
||||
NRG = (VFK, QHK)
|
||||
KVD = (MBB, TJD)
|
||||
FMV = (CSX, BKH)
|
||||
RDK = (NKP, JGJ)
|
||||
HFR = (DFD, SDQ)
|
||||
QLQ = (VMN, HFR)
|
||||
MVB = (JNM, DKL)
|
||||
RXQ = (MMT, DFP)
|
||||
QQP = (VFS, TRX)
|
||||
SCN = (XRD, XRD)
|
||||
SDR = (JKQ, XHC)
|
||||
VCB = (JGD, VQD)
|
||||
PPR = (KGD, DJJ)
|
||||
QVZ = (JLB, DXR)
|
||||
CMT = (JDG, CNN)
|
||||
FGX = (HRX, VLQ)
|
||||
KTS = (CPB, DMP)
|
||||
CJM = (VTX, NTJ)
|
||||
SPQ = (RGS, KKV)
|
||||
DDS = (MCT, FMS)
|
||||
LMT = (RJJ, MTR)
|
||||
NNN = (RTH, VRK)
|
||||
NHP = (GRD, VTV)
|
||||
CGX = (MMM, MJT)
|
||||
FDQ = (NHM, QTX)
|
||||
XHF = (JGM, PBC)
|
||||
QJQ = (TFJ, HKR)
|
||||
STF = (RFR, DHN)
|
||||
CVV = (LSD, RDD)
|
||||
MPR = (JVC, XMS)
|
||||
VFG = (MFV, RPC)
|
||||
DVH = (SHS, FML)
|
||||
CNF = (LCK, HLR)
|
||||
VFK = (GSH, FVB)
|
||||
HXB = (KPC, PMF)
|
||||
TRX = (VMG, LXF)
|
||||
DBP = (KQQ, HHB)
|
||||
TKQ = (RCD, RLC)
|
||||
MFT = (BNR, TFN)
|
||||
XMM = (GCR, FVL)
|
||||
DSJ = (QLS, CFJ)
|
||||
XNM = (RKJ, MGB)
|
||||
CPB = (CDM, XSL)
|
||||
BVV = (DQK, FDC)
|
||||
XVN = (VVM, NTB)
|
||||
LTB = (MBB, TJD)
|
||||
LTG = (FCK, JMG)
|
||||
JTG = (CGX, PBQ)
|
||||
MSB = (PXM, SHH)
|
||||
GHS = (XDT, RKG)
|
||||
HPN = (PMF, KPC)
|
||||
VHN = (MHX, GQG)
|
||||
PGB = (XBR, NTR)
|
||||
RHD = (NFR, XRV)
|
||||
DKL = (CDJ, MPR)
|
||||
PVN = (LSN, RRQ)
|
||||
VFC = (QXB, RTX)
|
||||
HFQ = (MCC, QVB)
|
||||
MGB = (RGN, TGP)
|
||||
JDD = (KVB, GGL)
|
||||
GRB = (FCC, GHR)
|
||||
NLC = (NJC, JJL)
|
||||
FQM = (MSB, PBD)
|
||||
VSN = (BPD, FKN)
|
||||
RFS = (GKT, TQQ)
|
||||
XSG = (RKS, RRV)
|
||||
CXS = (SHB, XDD)
|
||||
MKN = (JNQ, SDN)
|
||||
PXM = (RRP, CSQ)
|
||||
JNQ = (XSG, FLL)
|
||||
NCP = (HPV, KKX)
|
||||
NKS = (PJH, XPT)
|
||||
PGL = (VGD, VGD)
|
||||
SDD = (LRG, FRT)
|
||||
JKV = (XVS, KKR)
|
||||
LXF = (BFM, PSF)
|
||||
XBR = (GKH, MLL)
|
||||
DQK = (RSF, STP)
|
||||
QLR = (DXR, JLB)
|
||||
DQD = (LCC, XFT)
|
||||
CST = (VFG, NRV)
|
||||
SNR = (BPG, KHB)
|
||||
GKH = (BNJ, NRL)
|
||||
XTG = (FDC, DQK)
|
||||
PBC = (JFV, VHN)
|
||||
FRT = (SXR, CTX)
|
||||
TTQ = (MGB, RKJ)
|
||||
TKJ = (HHM, RTD)
|
||||
LLQ = (RNT, NFS)
|
||||
QGZ = (NQV, CCP)
|
||||
GCN = (CSX, BKH)
|
||||
SSM = (RCF, VNG)
|
||||
XRT = (DLB, BJB)
|
||||
BVJ = (STF, BDQ)
|
||||
QXM = (CSK, SDR)
|
||||
QJM = (DBP, RQQ)
|
||||
VVM = (KDD, HDN)
|
||||
CTX = (JVG, XCN)
|
||||
XCM = (KXN, KCQ)
|
||||
FDC = (RSF, STP)
|
||||
KFS = (KMF, XSS)
|
||||
RVN = (GDL, GHS)
|
||||
JXZ = (RMD, SMQ)
|
||||
SXF = (VBP, RDM)
|
||||
JCS = (RQF, QFL)
|
||||
CSX = (RXD, LSC)
|
||||
TXS = (GBQ, JHK)
|
||||
RQF = (MBC, SQM)
|
||||
QXB = (NXK, DFN)
|
||||
PKJ = (BSB, NDP)
|
||||
VMQ = (DXV, PHQ)
|
||||
HLG = (NCP, KBQ)
|
||||
CSQ = (LJP, BGN)
|
||||
MMT = (MVB, GHX)
|
||||
KXG = (XCF, HKK)
|
||||
FBH = (XFT, LCC)
|
||||
SQG = (LTB, KVD)
|
||||
VMG = (BFM, PSF)
|
||||
FFP = (SSF, QJM)
|
||||
KVF = (JCS, GMR)
|
||||
HXS = (RLR, NPQ)
|
||||
PVM = (BMM, PTQ)
|
||||
JFD = (DLB, BJB)
|
||||
FTD = (BMP, XXL)
|
||||
JLK = (FMS, MCT)
|
||||
BGN = (JTG, NCV)
|
||||
KGH = (NPQ, RLR)
|
||||
QFL = (MBC, SQM)
|
||||
XNP = (JGM, PBC)
|
||||
DHN = (SPR, SNR)
|
||||
LJP = (JTG, NCV)
|
||||
KKX = (PKP, GTB)
|
||||
KKR = (KKC, SNM)
|
||||
DBG = (LKR, GTS)
|
||||
RCN = (FQQ, LLX)
|
||||
BKH = (RXD, LSC)
|
||||
HCD = (KDR, LGD)
|
||||
KVB = (JLS, TMH)
|
||||
SPC = (SXF, VLB)
|
||||
NKG = (XNS, VBK)
|
||||
FNN = (RMB, NPF)
|
||||
QNT = (SJD, KTM)
|
||||
RXK = (NKV, TMB)
|
||||
RDF = (FCJ, FST)
|
||||
XSS = (GKK, SQG)
|
||||
LRG = (SXR, CTX)
|
||||
FMS = (SMV, BQG)
|
||||
DVA = (DXR, JLB)
|
||||
JKQ = (KTP, RDF)
|
||||
LCC = (FHC, PKJ)
|
||||
LSD = (NKS, DPC)
|
||||
HHM = (BTG, NXB)
|
||||
XBQ = (QPF, TLF)
|
||||
JNM = (MPR, CDJ)
|
||||
TCB = (KXG, PJD)
|
||||
TBV = (RXK, RMR)
|
||||
KTP = (FCJ, FST)
|
||||
HSN = (VTX, NTJ)
|
||||
GDL = (XDT, RKG)
|
||||
FCJ = (DNQ, QJQ)
|
||||
DXR = (FFT, HNQ)
|
||||
RTB = (SVP, BQX)
|
||||
HLR = (DSC, SSR)
|
||||
LVL = (QML, TVP)
|
||||
KXQ = (RJP, DVV)
|
||||
BKN = (LXS, XMM)
|
||||
JHK = (FFR, QXX)
|
||||
DLS = (MKN, PTL)
|
||||
BTD = (CCP, NQV)
|
||||
JVG = (LMT, SKC)
|
||||
FFT = (LTR, PMD)
|
||||
XDD = (KRC, JBN)
|
||||
QNL = (BNV, NNN)
|
||||
LNK = (KDN, XTL)
|
||||
CMS = (DLS, VQG)
|
||||
TJD = (MCH, QTQ)
|
||||
LHR = (HNC, MLQ)
|
||||
FKS = (MPX, CVV)
|
||||
CCP = (XFP, XHT)
|
||||
QCX = (KQL, SPQ)
|
||||
KXP = (QXM, QXM)
|
||||
HHG = (FML, SHS)
|
||||
HDS = (KTS, CTF)
|
||||
BPG = (GMQ, NDD)
|
||||
QPR = (TFG, CDF)
|
||||
QCQ = (GGM, XSR)
|
||||
DFN = (KXQ, XCV)
|
||||
KRC = (FGX, XTP)
|
||||
RLR = (DDJ, KVN)
|
||||
PVX = (TGJ, XPJ)
|
||||
SVX = (MQN, QNJ)
|
||||
VQG = (PTL, MKN)
|
||||
GTM = (CFH, QGR)
|
||||
KVJ = (JLK, DDS)
|
||||
HHB = (TNH, LTG)
|
||||
BCB = (RVN, NHB)
|
||||
XTP = (HRX, VLQ)
|
||||
DJJ = (PGT, VCM)
|
||||
JQA = (CSK, SDR)
|
||||
PSR = (GLC, DQV)
|
||||
HDN = (CPC, GCF)
|
||||
VPX = (DJJ, KGD)
|
||||
BNR = (CTT, JGH)
|
||||
QRC = (XDD, SHB)
|
||||
VRX = (XNP, XHF)
|
||||
BTG = (QNS, QDL)
|
||||
RRP = (LJP, BGN)
|
||||
PFS = (RJB, QBG)
|
||||
BSB = (LKN, SBH)
|
||||
RXD = (SHQ, RHR)
|
||||
JJL = (VCK, RTB)
|
||||
RJP = (XKB, TDH)
|
||||
RCD = (DPT, FXX)
|
||||
PHQ = (PDH, KVF)
|
||||
DDL = (JSD, KFF)
|
||||
VBP = (DDN, KMB)
|
||||
GRD = (KVJ, FKH)
|
||||
CKQ = (NRV, VFG)
|
||||
KNM = (PTQ, BMM)
|
||||
XCD = (NXG, FSP)
|
||||
LGD = (VFC, SBM)
|
||||
RTD = (NXB, BTG)
|
||||
VCK = (SVP, BQX)
|
||||
GBC = (NHB, RVN)
|
||||
STP = (MQQ, KGJ)
|
||||
NKP = (RFM, JLF)
|
||||
JBN = (XTP, FGX)
|
||||
SBS = (RGK, HDS)
|
||||
RRQ = (FDM, CSB)
|
||||
FDM = (KSX, TFM)
|
||||
NXB = (QDL, QNS)
|
||||
NHB = (GHS, GDL)
|
||||
DQV = (FNJ, LVL)
|
||||
MBC = (HSN, CJM)
|
||||
QHK = (FVB, GSH)
|
||||
MDN = (KDR, LGD)
|
||||
FCP = (PBH, RHQ)
|
||||
NRL = (DXL, KXK)
|
||||
MSS = (SPQ, KQL)
|
||||
PBD = (SHH, PXM)
|
||||
JBB = (XKD, PSR)
|
||||
TVP = (PVQ, LDS)
|
||||
DKB = (TTQ, XNM)
|
||||
LSN = (FDM, CSB)
|
||||
XRD = (CQQ, CQQ)
|
||||
TGP = (MMV, BKN)
|
||||
NDD = (VCB, NSB)
|
||||
FSP = (KNM, PVM)
|
||||
CDM = (VSC, VSC)
|
||||
NXG = (PVM, KNM)
|
||||
SSF = (DBP, RQQ)
|
||||
RKJ = (TGP, RGN)
|
||||
SRF = (FJM, CPG)
|
||||
MSP = (RLC, RCD)
|
||||
BDQ = (RFR, DHN)
|
||||
DTR = (LBN, GRB)
|
||||
SHS = (SRF, QBT)
|
||||
LGT = (JHK, GBQ)
|
||||
BQG = (SBS, LHK)
|
||||
XVS = (SNM, KKC)
|
||||
TFG = (VSN, VSN)
|
||||
NTB = (HDN, KDD)
|
||||
HNQ = (PMD, LTR)
|
||||
PMF = (XCM, RPX)
|
||||
FLV = (NJP, FQM)
|
||||
PTQ = (PFS, XPF)
|
||||
XXQ = (PGB, TKK)
|
||||
PJL = (DQD, FBH)
|
||||
GHX = (JNM, DKL)
|
||||
GMR = (QFL, RQF)
|
||||
TFH = (DTR, HNK)
|
||||
KVM = (PGL, GTC)
|
||||
DPC = (XPT, PJH)
|
||||
KDD = (GCF, CPC)
|
||||
JMM = (FBH, DQD)
|
||||
XCF = (VPV, VPV)
|
||||
JLS = (HSC, DBG)
|
||||
GKT = (BKM, KSH)
|
||||
DNQ = (TFJ, HKR)
|
||||
PTA = (SMQ, RMD)
|
||||
XFV = (RKR, VJD)
|
||||
RKG = (LHR, NSJ)
|
||||
RPC = (JDD, HPK)
|
||||
HNK = (GRB, LBN)
|
||||
NSB = (VQD, JGD)
|
||||
HKR = (MQT, XHH)
|
||||
FKX = (BXX, RTN)
|
||||
BPD = (NRG, LPP)
|
||||
NJC = (RTB, VCK)
|
||||
QXX = (CKT, MRX)
|
||||
SFG = (DDL, QDD)
|
||||
FGV = (PSR, XKD)
|
||||
PJH = (NRJ, NVC)
|
||||
CPG = (STG, DLM)
|
||||
NPQ = (DDJ, KVN)
|
||||
SSR = (PCJ, HVX)
|
||||
XCV = (RJP, DVV)
|
||||
SMV = (LHK, SBS)
|
||||
PCJ = (FTK, HHN)
|
||||
RHX = (FDK, DBX)
|
||||
DXL = (XFV, PKV)
|
||||
RDM = (KMB, DDN)
|
||||
NFR = (QQP, CFG)
|
||||
VNG = (MSP, TKQ)
|
||||
QDL = (DSQ, QNT)
|
||||
HPV = (GTB, PKP)
|
||||
SBM = (QXB, RTX)
|
||||
RGQ = (SXF, VLB)
|
||||
NRV = (MFV, RPC)
|
||||
DFD = (GFG, KMH)
|
||||
RRV = (RDK, HSB)
|
||||
PBH = (QNL, HDC)
|
||||
MMV = (LXS, XMM)
|
||||
VVT = (RMR, RXK)
|
||||
RPX = (KXN, KCQ)
|
||||
LPP = (VFK, QHK)
|
||||
RLH = (NHF, JKV)
|
||||
TPP = (MCR, PQH)
|
||||
XPB = (TGJ, XPJ)
|
||||
FVL = (RNM, JCJ)
|
||||
KGJ = (HPN, HXB)
|
||||
GKK = (LTB, KVD)
|
||||
BGX = (TTS, PHD)
|
||||
BNJ = (KXK, DXL)
|
||||
KBQ = (HPV, KKX)
|
||||
NFS = (JMM, PJL)
|
||||
BXX = (JLG, LBB)
|
||||
TNH = (FCK, JMG)
|
||||
BJB = (DVC, HSL)
|
||||
KHB = (NDD, GMQ)
|
||||
SKX = (SSF, QJM)
|
||||
LTR = (PVX, XPB)
|
||||
FDK = (SSX, BGX)
|
||||
LBN = (FCC, GHR)
|
||||
STG = (DJM, RHX)
|
||||
KGD = (VCM, PGT)
|
||||
PDH = (JCS, GMR)
|
||||
MCC = (QLR, QLR)
|
||||
GKN = (TTQ, XNM)
|
||||
KKC = (SGS, BJN)
|
||||
JDG = (NPX, PKR)
|
||||
DXV = (KVF, PDH)
|
||||
PGT = (QQH, GPS)
|
||||
GGL = (JLS, TMH)
|
||||
LRH = (QGG, LQN)
|
||||
XDT = (LHR, NSJ)
|
||||
TFJ = (XHH, MQT)
|
||||
CKT = (FTD, VPL)
|
||||
QNM = (GPD, HFT)
|
||||
QQB = (HHG, DVH)
|
||||
LKX = (MQN, MQN)
|
||||
HFT = (CMT, ZZZ)
|
||||
GTC = (VGD, NLL)
|
||||
DFP = (MVB, GHX)
|
||||
NDP = (LKN, SBH)
|
||||
PJK = (VRX, TXL)
|
||||
GBQ = (QXX, FFR)
|
||||
BJN = (QQB, DMG)
|
||||
RCF = (TKQ, MSP)
|
||||
FCK = (NHP, LXR)
|
||||
HHN = (RFJ, KHX)
|
||||
XNS = (MBX, CPT)
|
||||
XFM = (SPC, RGQ)
|
||||
VTV = (FKH, KVJ)
|
||||
PXP = (NHM, QTX)
|
||||
FKN = (LPP, NRG)
|
||||
DLM = (DJM, RHX)
|
||||
BCQ = (TFG, TFG)
|
||||
RFR = (SPR, SNR)
|
||||
GPS = (NBG, MKL)
|
||||
FML = (SRF, QBT)
|
||||
JLB = (HNQ, FFT)
|
||||
DLB = (DVC, HSL)
|
||||
DMP = (CDM, XSL)
|
||||
VCM = (QQH, GPS)
|
||||
SKC = (MTR, RJJ)
|
||||
TQZ = (SDR, CSK)
|
||||
XHH = (CXS, QRC)
|
||||
KKF = (RCN, QCT)
|
||||
TDH = (BGT, TCB)
|
||||
DSC = (HVX, PCJ)
|
||||
CND = (XVN, PCV)
|
||||
QBT = (FJM, CPG)
|
||||
KCQ = (HFS, XFM)
|
||||
KFP = (PCV, XVN)
|
||||
MCH = (NLC, NNC)
|
||||
TGJ = (RKH, QHB)
|
||||
RTN = (LBB, JLG)
|
||||
XSL = (VSC, QNM)
|
||||
SMQ = (BVV, XTG)
|
||||
PQH = (XKJ, THP)
|
||||
XQP = (TXL, VRX)
|
||||
PQK = (DRQ, MLK)
|
||||
QNQ = (VQG, DLS)
|
||||
SJD = (JBB, FGV)
|
||||
XSR = (LLQ, GHV)
|
||||
CFJ = (NFV, FKX)
|
||||
RNM = (BVJ, FKM)
|
||||
FSS = (PLL, DSG)
|
||||
SSJ = (XTL, KDN)
|
||||
JGM = (VHN, JFV)
|
||||
RTM = (XSS, KMF)
|
||||
MLQ = (VPX, PPR)
|
||||
SBH = (GXD, LRH)
|
||||
ZZZ = (CNN, JDG)
|
||||
VTX = (QCQ, MJQ)
|
||||
KHX = (TVQ, HGJ)
|
||||
NPX = (FND, FLV)
|
||||
PKR = (FLV, FND)
|
||||
JGD = (VGS, TQJ)
|
||||
JGH = (DPQ, KVM)
|
||||
PFB = (DFP, MMT)
|
||||
LHK = (RGK, HDS)
|
||||
GMQ = (NSB, VCB)
|
||||
DJM = (FDK, DBX)
|
||||
JKH = (XRD, RBT)
|
||||
CGR = (KFP, CND)
|
||||
RSF = (KGJ, MQQ)
|
||||
GQT = (DDL, QDD)
|
||||
RNT = (PJL, JMM)
|
||||
PTL = (SDN, JNQ)
|
||||
NCV = (PBQ, CGX)
|
||||
KTM = (FGV, JBB)
|
||||
FBR = (CFJ, QLS)
|
||||
BFT = (PGB, TKK)
|
||||
TTS = (FDQ, PXP)
|
||||
GTB = (KGH, HXS)
|
||||
XFP = (FXG, PVN)
|
||||
SHQ = (BCQ, BCQ)
|
||||
VGD = (KXP, KXP)
|
||||
CSK = (XHC, JKQ)
|
||||
MLL = (NRL, BNJ)
|
||||
CFH = (SFG, GQT)
|
||||
BMM = (PFS, XPF)
|
||||
LKN = (LRH, GXD)
|
||||
HSL = (FBS, TPP)
|
||||
TMB = (TCT, HLG)
|
||||
CDJ = (XMS, JVC)
|
||||
FQQ = (RHD, QNG)
|
||||
TQQ = (BKM, KSH)
|
||||
PVQ = (GKN, DKB)
|
||||
QTZ = (FKN, BPD)
|
||||
DSQ = (KTM, SJD)
|
||||
TMH = (HSC, DBG)
|
||||
QHB = (FSS, HCN)
|
||||
CQQ = (SMQ, RMD)
|
||||
MBK = (GKT, TQQ)
|
||||
MMM = (RXQ, PFB)
|
||||
LSC = (SHQ, RHR)
|
||||
MQT = (CXS, QRC)
|
||||
PMD = (XPB, PVX)
|
||||
MMK = (QCT, RCN)
|
||||
TVJ = (RCF, VNG)
|
||||
FHB = (MLK, DRQ)
|
||||
QNJ = (BTD, QGZ)
|
||||
TVQ = (NXS, XCD)
|
||||
GLC = (FNJ, LVL)
|
||||
HFS = (RGQ, SPC)
|
||||
BJV = (FKS, KFM)
|
||||
SSX = (TTS, PHD)
|
||||
FXG = (LSN, RRQ)
|
||||
TQS = (TLF, QPF)
|
||||
QVB = (QLR, QVZ)
|
||||
BNV = (RTH, VRK)
|
||||
NXS = (NXG, FSP)
|
||||
KSH = (TDL, FSC)
|
||||
HPK = (KVB, GGL)
|
||||
KKV = (FNN, BRK)
|
||||
XHC = (RDF, KTP)
|
||||
LQN = (BJV, GJC)
|
||||
GPD = (CMT, CMT)
|
||||
HRX = (LGQ, TKJ)
|
||||
CSB = (KSX, TFM)
|
||||
XPT = (NRJ, NVC)
|
||||
QTQ = (NNC, NLC)
|
||||
VPV = (MCC, MCC)
|
||||
TDL = (SCN, SCN)
|
||||
CTT = (DPQ, KVM)
|
||||
JFV = (GQG, MHX)
|
||||
GFG = (GNG, NDL)
|
||||
MKL = (TVJ, SSM)
|
||||
XKB = (TCB, BGT)
|
||||
XRV = (CFG, QQP)
|
||||
CRA = (BPD, FKN)
|
||||
VSC = (GPD, GPD)
|
||||
RGS = (FNN, BRK)
|
||||
MFV = (JDD, HPK)
|
||||
GGM = (GHV, LLQ)
|
||||
FKJ = (JKV, NHF)
|
||||
GCF = (KFS, RTM)
|
||||
JSD = (MDN, HCD)
|
||||
SXR = (XCN, JVG)
|
||||
LMF = (MXP, FVH)
|
||||
AAA = (JDG, CNN)
|
||||
MJT = (RXQ, PFB)
|
||||
PJD = (XCF, HKK)
|
||||
RDD = (NKS, DPC)
|
||||
DPT = (HVV, GTM)
|
||||
NHM = (QCX, MSS)
|
||||
MQQ = (HXB, HPN)
|
||||
FLL = (RKS, RRV)
|
||||
BRK = (RMB, NPF)
|
||||
FHC = (BSB, NDP)
|
||||
RHR = (BCQ, QPR)
|
||||
NNC = (JJL, NJC)
|
||||
LKR = (XQP, PJK)
|
||||
CDF = (VSN, QTZ)
|
||||
MRX = (FTD, VPL)
|
||||
PLT = (DTR, HNK)
|
||||
VLQ = (TKJ, LGQ)
|
||||
GJC = (KFM, FKS)
|
||||
MQN = (BTD, BTD)
|
||||
GHR = (MFT, NRB)
|
||||
XXL = (FBR, DSJ)
|
||||
NHF = (XVS, KKR)
|
||||
LDS = (DKB, GKN)
|
||||
PKV = (RKR, VJD)
|
||||
KPC = (RPX, XCM)
|
||||
NRJ = (DPN, CNF)
|
||||
BGA = (CCP, NQV)
|
||||
LCK = (DSC, SSR)
|
||||
KFM = (MPX, CVV)
|
||||
RMB = (FCP, VLM)
|
||||
XKJ = (FMV, GCN)
|
||||
NBG = (SSM, TVJ)
|
||||
QPF = (VKH, QLQ)
|
||||
RKH = (HCN, FSS)
|
||||
HGJ = (XCD, NXS)
|
||||
RGN = (MMV, BKN)
|
||||
HCN = (DSG, PLL)
|
||||
RFM = (CCF, JNJ)
|
||||
DRQ = (KKF, MMK)
|
||||
XKD = (DQV, GLC)
|
||||
NXK = (KXQ, XCV)
|
||||
FTK = (RFJ, KHX)
|
||||
QQH = (MKL, NBG)
|
||||
HSB = (NKP, JGJ)
|
||||
GSH = (TQS, XBQ)
|
||||
CTF = (CPB, DMP)
|
||||
GCR = (RNM, JCJ)
|
||||
CCF = (XRT, JFD)
|
||||
DSG = (BCB, GBC)
|
||||
XCN = (SKC, LMT)
|
||||
PLL = (GBC, BCB)
|
||||
VKH = (HFR, VMN)
|
||||
PBQ = (MJT, MMM)
|
||||
PSF = (LKX, SVX)
|
||||
LMG = (MXP, FVH)
|
||||
BMP = (FBR, DSJ)
|
||||
GXD = (LQN, QGG)
|
||||
XMS = (PKX, CGR)
|
||||
RLC = (DPT, FXX)
|
||||
NRB = (BNR, TFN)
|
||||
VPL = (XXL, BMP)
|
||||
PCV = (VVM, NTB)
|
||||
QGR = (SFG, GQT)
|
||||
PHD = (PXP, FDQ)
|
||||
NQV = (XFP, XHT)
|
||||
LGQ = (RTD, HHM)
|
||||
CNN = (NPX, PKR)
|
||||
CPT = (CST, CKQ)
|
||||
BGT = (KXG, PJD)
|
||||
THP = (GCN, FMV)
|
||||
QGG = (BJV, GJC)
|
||||
KSX = (LGT, TXS)
|
||||
BKM = (TDL, FSC)
|
||||
FXX = (HVV, GTM)
|
||||
KMF = (SQG, GKK)
|
||||
FCC = (MFT, NRB)
|
||||
NDL = (FKJ, RLH)
|
||||
TFM = (TXS, LGT)
|
||||
LMX = (FRT, LRG)
|
||||
FFR = (MRX, CKT)
|
||||
KXK = (PKV, XFV)
|
||||
JNJ = (XRT, JFD)
|
||||
DMG = (HHG, DVH)
|
||||
TCT = (NCP, KBQ)
|
||||
MXP = (SDD, LMX)
|
||||
FSC = (SCN, JKH)
|
||||
VFS = (VMG, LXF)
|
||||
RBT = (CQQ, JXZ)
|
||||
RXV = (QXM, TQZ)
|
||||
RKS = (HSB, RDK)
|
||||
FND = (FQM, NJP)
|
||||
XPF = (QBG, RJB)
|
||||
LFT = (XXQ, BFT)
|
||||
HVX = (HHN, FTK)
|
||||
RTX = (NXK, DFN)
|
||||
QNG = (XRV, NFR)
|
||||
NFV = (RTN, BXX)
|
||||
KQL = (RGS, KKV)
|
||||
MTR = (TFH, PLT)
|
||||
QNS = (QNT, DSQ)
|
||||
SHB = (KRC, JBN)
|
||||
SVP = (FFP, SKX)
|
||||
VLM = (PBH, RHQ)
|
9
src/day8/sample.txt
Normal file
9
src/day8/sample.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
RL
|
||||
|
||||
AAA = (BBB, CCC)
|
||||
BBB = (DDD, EEE)
|
||||
CCC = (ZZZ, GGG)
|
||||
DDD = (DDD, DDD)
|
||||
EEE = (EEE, EEE)
|
||||
GGG = (GGG, GGG)
|
||||
ZZZ = (ZZZ, ZZZ)
|
Loading…
Reference in New Issue
Block a user