Compare commits

..

1 Commits
main ... wip

Author SHA1 Message Date
Alpha Chen 050f7577ec wip
8 years ago

1
.gitignore vendored

@ -1 +0,0 @@
**/rust/target

3
.gitmodules vendored

@ -1,3 +0,0 @@
[submodule "2022/bqn/lib"]
path = 2022/bqn/lib
url = https://github.com/mlochbaum/bqn-libs.git

145
2015/rust/Cargo.lock generated

@ -1,145 +0,0 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "advapi32-sys"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "307c92332867e586720c0222ee9d890bbe8431711efed8a1b06bc5b40fc66bd7"
dependencies = [
"winapi",
"winapi-build",
]
[[package]]
name = "advent_of_code"
version = "0.1.0"
dependencies = [
"permutohedron",
"regex",
"rust-crypto",
]
[[package]]
name = "aho-corasick"
version = "0.7.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
dependencies = [
"memchr",
]
[[package]]
name = "gcc"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca10e3e1f1c8278047da19b94dc17c4397861150d5fbcea052eedb1d9847d356"
dependencies = [
"advapi32-sys",
"winapi",
]
[[package]]
name = "kernel32-sys"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5b5e7edf375e6d26243bde172f1d5ed1446f4a766fc9b7006e1fd27258243f1"
dependencies = [
"winapi",
"winapi-build",
]
[[package]]
name = "libc"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e32a70cf75e5846d53a673923498228bbec6a8624708a9ea5645f075d6276122"
[[package]]
name = "libc"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10569e57695cc2c91ca4214357907649c9e242dc822c9ae623d0e0b0d68aa4d9"
[[package]]
name = "memchr"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
[[package]]
name = "permutohedron"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abf78a1e8b52782de92fc4f361362a62bcf5fd5718b5432b48cb381485740b83"
[[package]]
name = "rand"
version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5eee40bdf3d293e1648490ab47e5471d9ab3e455e6b0bd48e558c454be4a015e"
dependencies = [
"advapi32-sys",
"libc 0.2.4",
"winapi",
]
[[package]]
name = "regex"
version = "1.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.6.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64"
[[package]]
name = "rust-crypto"
version = "0.2.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8672a8eb8db93d0938972e391159ba66912b415285ee5cf0ebe732df9e53b70"
dependencies = [
"gcc",
"libc 0.1.12",
"rand",
"rustc-serialize",
"time",
]
[[package]]
name = "rustc-serialize"
version = "0.3.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a48546a64cae47d06885e9bccadb99d0547d877a94c5167fa451ea33a484456"
[[package]]
name = "time"
version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c4aeaa1c95974f5763c3a5ac0db95a19793589bcea5d22e161b5587e3aad029"
dependencies = [
"kernel32-sys",
"libc 0.2.4",
"winapi",
]
[[package]]
name = "winapi"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc3583688b861fcd83c2823d37cf2cd2446c233dd7ba3f97884d1a7302817537"
[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"

@ -1 +0,0 @@
R4, R3, L3, L2, L1, R1, L1, R2, R3, L5, L5, R4, L4, R2, R4, L3, R3, L3, R3, R4, R2, L1, R2, L3, L2, L1, R3, R5, L1, L4, R2, L4, R3, R1, R2, L5, R2, L189, R5, L5, R52, R3, L1, R4, R5, R1, R4, L1, L3, R2, L2, L3, R4, R3, L2, L5, R4, R5, L2, R2, L1, L3, R3, L4, R4, R5, L1, L1, R3, L5, L2, R76, R2, R2, L1, L3, R189, L3, L4, L1, L3, R5, R4, L1, R1, L1, L1, R2, L4, R2, L5, L5, L5, R2, L4, L5, R4, R4, R5, L5, R3, L1, L3, L1, L1, L3, L4, R5, L3, R5, R3, R3, L5, L5, R3, R4, L3, R3, R1, R3, R2, R2, L1, R1, L3, L3, L3, L1, R2, L1, R4, R4, L1, L1, R3, R3, R4, R1, L5, L2, R2, R3, R2, L3, R4, L5, R1, R4, R5, R4, L4, R1, L3, R1, R3, L2, L3, R1, L2, R3, L3, L1, L3, R4, L4, L5, R3, R5, R4, R1, L2, R3, R5, L5, L4, L1, L1

@ -1,5 +0,0 @@
RDRRDLRRUDRUUUULDDRDUULLDUULDURDDUDRULDLUDDRLRDUDDURRRRURDURLLRDRUUULDLLLURDRLLULLUULULLLDLLLRRURRLRDUULRURRUDRRDRLURLRURLLULRUURRUURDDLDRDLDLLUDUULLLUUUUDULLDRRUURLDURDDDDDRLLRRURDLUDRRUUDLRRLLRDURDUDDDLRDDRDLRULLUULRULRLLULDDRURUUDLDDULDRLLURDDUDDUDRDUDLDRRRDURRLDRDRLDLLDUDDDULULRRULRLLURDRRDDUUUUUULRUDLRRDURDLRDLUDLDURUDDUUURUDLUUULDLRDURDLDUUDLDDDURUUDUUDRLRDULLDUULUDRUDRLRRRDLLDRUDULRRUDDURLDRURRLLRRRDRLLDLULULRRUURRURLLUDRRLRULURLDDDDDURUDRRRRULLUUDLDDLUUL
ULURUDLULDULDLLDDLLLDRRLLUDRRDRDUDURUDLRRRRUDRDDURLRRULLDLURLDULLUDDLUDURDUURRRRLDLRLDDULLRURLULLDDRUDLRRRLDRRRDLDRLLDDRRDDLUUDRUDDLULRURLDURRLLDLRUDLLRRUULUDRLLLRLDULURRRRRDDUURDRRUUDULRUULDDULRLUDLUDDULLRLRDDLRLLURRRULDLRRRUURRLDDRDLRDLRRDRDLDRDUDRDURUUDRLRRULRDLLDLLRRRDRLDRLRLRLLLURURDULUUDDRLLDDDRURRURLRDDULLRURUDRRDRLRRRLDLRLRULDRLUURRUUULRLDLLURLLLDLLLDRRDULRURRRRLUDLLRRUDLRUDRURDRRDLUUURRDLRLRUUUDURDLUDURRUUDURLUDDDULLDRDLLDDDRLDDDRLDLDDDDUDUUDURUUDULRDDLULDRDRLURLUDRDLUULLULRLULRDDRULDUDDURUURULUDLUURLURU
URLURDDRLLURRRLDLDLUDUURDRUDLLLRRDLUUULRRLURRRLUDUDLRLDDRUDLRRRULUDUDLLLULULLLRUDULDDDLLLRRRLRURDULUDDDULDLULURRRDLURDLRLLDUDRUDURDRRURULDRDUDLLRDDDUDDURLUULLULRDRRLDDLDURLRRRLDRDLDULRULRRRLRLLDULRDLURLRUUDURRUUDLLUDRUDLRLDUUDLURRRDDUUDUDRLDLDDRURDDLLDDRDLRLRDLLLUDLUUDRLRLRDDRDLRDLLUULLLLUULLDLLDLRDLRLRRLUUDLLRLRUDRURULRLRLULUDRLLUDDUDDULRLDDRUUUURULDRRULLLDUURULUDRLLURLRRLDLRRLDDRRRDUDDUDLDDLULUDDUURDLLLRLDLRDRUUUUUDDDLDRDDRRRLRURRRRDURDRURUDLURRURDRLRUUDDLDRRULLDURDRLRRDURURUULRDUDLDRDDLULULRDRRUDDRLLRLULRLLUUDRDUUDDUDLRUUDLLUULLRUULUDDLURRRLLDRLRRLLRULLDUULURLLLLUUULDR
LDUURULLRLDRRUUDUUUURUUUDDDURRDDLRDLLRDDRULDDUURUDDURLLUDRDUDRDULDRRRLULUDRULLLLDRLLDRDLDLLRURULUDDDDURDDDRLLUDLDRULRDLDUDDDUUDLLRLLLDLRLRLRRUDDULDDDUDLDDLUDDULDLLLLULLLLDDURDDURRRDDRLRLLUDLLUDDDUDURUDRLRDRULULDDRULDLULULLRUULRLDULUURRDRDRRDLDDDRRLUULDLUDRDDUDLRURULLDDURLDDRULUDLDDDRDRLLRDLLUURRRURDRLRURLDDLURDRURDDURLLRLRUDUUDLDUDURRDDURDRDDUDDDUDUURURDDLLRUUDDRRDULDDLLDLRULUULRUUDLLDRLULDULDDUDLULRULDRLLDUULDDDLRLLRLULDDULDDRRRLDRRLURULRDDRDLRRDUDDRDRRRRUDUDLLRRDRRURRUURDRULDDUDURLUDDURDUDRDUULLDRURUURURDRRLDDLDLUURLULRUDURDRUUURRURRDRUDRUURDURLRULULLLULDLLDLRRLDRDLUULUDDDLRDRLRLDRUDUDRLLRL
LURLUURLURDUUDRUDLDLLURRRDLDRRRULDDRRDRDUUDRUDURDDDURLUDDLULUULRRLLRULUDRDDRRRLDURDUDDURDDDLRLDDLULLDRDDLUUDUURRRLULRUURRRRLLULDUDRDUURRRURRDRDUDUDLUDULLDLDDRLUDRURDULURLURRLLURLLLRLUURLRUDLUDDRLURRUULULRLURRURUDURDLDLDDUDDRDLLRLLRRULDDRUDURUDDDUDLLRDLRUDULLLRRRUURUDUUULLRDUDRURUDULLDLLUUUDRULRLLRRDDDDUDULDRDRLLDDLLDDDURRUDURLDLRDRUURDDURLRDRURLRRLLRLULDRRLRUDURDUURRLUUULUDDDLRLULRDRLLURRRDLURDUUDRRRLUURRLLUDLUDLUULLRRDLLRDDRURRUURLDDLRLRLRUDLDLRLRDRRDLLLRDLRDUDLLDDDRD

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,598 +0,0 @@
eqvmfqnf
jvkezmqt
zcssqwlw
cuacncgg
ikmpzpoh
dzpzobdl
qlsnuhuq
fwqnoklz
cibgplfq
ktsqfcrv
vcknjnnx
upaiaprz
bpqmolbq
dflhnpnk
heqjflch
cmewgodc
aaorgxkn
plekphpw
fcofrbnm
bmnrygtb
rqsqsqio
rnlntwxa
cxjqqfyl
jxjnxchb
kfgutxmi
cbciszxd
irakoonu
pcgfnycg
fgeivexo
ujxdaehw
ejkvrych
nhlklbgr
etjuhgry
mkgkmykm
teuhrfto
juqfslbn
tbwxabzi
ngdnwsey
amcibkyo
xlvxwqpj
vdbzuvkh
gkagbzep
kqxzkeip
bxccztho
vqrywqlc
jbzhecjc
ozkulgxo
uiwbofuk
vfwhdnao
tycxucwd
jvhuljfs
xxhqhruc
upnndiiz
andxywil
lowofbqv
iroqzrry
nmkkqqjb
daijrfna
jmcstxlq
jdefvuaa
nkbmowfi
agotazda
kufoymrn
yijwfjyi
hyqvaouj
soueuhln
oomsbkmh
buadtssf
rvgpeeza
hjiymcmd
ebgivdap
xzieipbg
ttpudwqt
hndwuncw
wqypfkvf
jqxuaipm
fzwlgxxq
ddshbtya
ardlcgyi
soznvuyw
vyizuolp
ckfaxyvs
nbsjkibi
lsrkrdzp
oqoffwxa
bdugjlsm
rtcsylfd
fezoiliq
zwpaphcb
sdlouhyf
cfejwvls
xehddxku
edhrtdcv
ehouagvy
hoyxjfsj
quggpnpx
muqbijbe
rcnniddd
kzfeiaui
sywienef
xpxftuvq
dtbhnslt
mpcpkmfa
wysutlci
fmqomicz
mhshprxr
uxwfcftt
ehbonsrl
pjobilxx
chiebfox
lqfxgyqg
vupcjatm
wfljafhc
iygojeny
gqxmgneu
nhlwllak
xnkqpulv
awijbvef
pbcrrwqo
dobsejtb
dqdoapkc
hngrxdtx
dodsxysb
bmtyelak
cctuwwvt
rytlmoyr
fqnbuxdi
irrqladc
wnvtsneg
ugqqdmlj
nljnjiod
knidxxzh
dfymoqgt
fwgtjafh
fpdioivz
tqbewmti
mcqtbbee
pivfrpou
tdyguuos
eldmvvmi
oaiqnizz
fyqpxgwa
lzcxsazq
zhsoljwz
qnzafmjl
oopnnndl
cozehoor
bspuwzxm
ubtunnep
smdhpvxr
nsvxiwje
mmqcklsm
hhxaciaq
zzgoxhws
fvntouun
skxzmzyg
znptwuqu
aknwvojo
wftmjrsf
gahrordj
oegnykag
lvlqswph
qsowvoem
sjspasfp
ygjohzfd
jeuxigsi
lgxdtudx
qadlkrel
lpfxosdq
sgaoqkzr
rtlvuhfv
ftbbsgbn
kjxttiqu
gylikswu
lquhgmrs
hxrjagjm
epxxekgx
uwwlcbrx
feincdjp
uyxhfhsc
nojuykoh
psjuuqwu
gtlohqkz
sbzsbgrw
nbhwuxfb
phmtunrh
zmfbkvgv
mjumfpia
gkubcshe
jmavrhyd
cgffkftg
msurhdct
bvchukal
psxaluvg
tvgwjhhp
chyizcxv
dumebzkd
cjpzbkzk
ngrgseyn
xmwcmaaz
puyrbiup
xxkpznis
rguwrpua
jmolhvnn
kpeqtlan
zzgvoxlp
erbintcn
kcykvysv
ixildajc
tnvgihwe
iqwgozpj
txkgyflb
vsyzebrw
ehnbcjef
hfevkbhf
wihlqtmp
vmrmnygo
ulvsuvsn
wgxnwihd
lexgbpsv
kxqcjoeb
daodpsbb
azyqmyhv
mvzcatwb
jtvqkjrv
rtdsaqqd
xrhzmnzl
wgfiwjrh
hgrgqqxm
nwwcxoyq
qlqyhpzs
ovujfily
pzvyeryk
strswprn
nrxclypc
sfusjxzi
pclbdadw
sjhggndb
xjcutuyt
qjjjeytj
qqjrkdlb
pyzodjdh
brnmlkmi
lgipidfp
ttrfbjry
iidwekro
vnwlnyma
ylxatduo
eiokdbqr
laezjjte
kkjhfsvp
buaegtpg
vzgqletc
pkdseade
nvpyxokq
yiysgxpe
xqhtubam
lcstpvke
nnskqssg
mkrbdovg
camkeppm
iqjvotay
bodlfgkj
jiigwvzc
ixpghywy
qlzyjgue
ugyjqtzn
odeuuiir
yfhianfx
seewayqj
lstpeuja
paqqnxsr
guwkidny
susussgu
ezcayehr
tdzgvcqf
vckcnsio
obawbapm
ipebazzk
tmcpmiou
hpdlfwor
ygxlfzzr
ltyxhtbx
olzqonbx
grsxreqs
bvkjcoux
fxtuxuub
fcbxdenm
smilcfvz
ewbndkiz
httsnfqu
ghorvefw
anevvqir
sajdzwho
becdemdn
vxktmxsj
xyawkeuw
pdefbxmh
yejymgfr
mipvhnsc
tjdyqpzd
rbvqirmd
mscuflvd
draqqcda
xfegqcjg
auypywpb
gitgzstq
zveqbzgt
wxrpedre
haptyecu
tkeexmhe
ujijprbd
xjiyczwq
ehpygnrr
guvejwyt
zmtsftky
wqtklwiz
lwlessio
lrknmhzd
pkdkwevt
ncryoeth
hjsqtpxu
ivmqrwok
qozgijgu
ueujvbbe
nfxgrmsd
zeetrgdl
drfbcgxo
rjjeraeb
hshozlgv
sfgvrnez
zaoctlsa
hebtzqvy
qckvuyif
wxyszmev
ddxfwklt
jqlzpfvu
wimoefwx
kabvtrno
pbebkvkm
govfwjof
xfjkvoup
fuzxcese
zbavvmyy
mwvkrnjg
gtkyelff
bffyzhnt
vlffqryw
ofncqcqw
cnzzrjjj
txpzvykz
ukkgeavq
wdnieioq
avosnedk
ipaavrqp
eeuurfat
sfhhwqzw
vjzopzad
kdbjonqz
uaksjfuc
lumpaomf
ysebmwel
dobryhxj
oaymjqwh
qjfflojj
zqmfgwre
uimjngfs
ihwelccg
yetrodjy
aifvwtws
xiyruzqr
anuvhykm
lelbjsno
csjwqotd
pptsysey
joptcdmq
tghbxpmq
jduwbxiy
obcdlahg
dxwrzytc
axfrxlgz
gepnmvel
ztmcynch
otnicgga
bdzobaoe
vkljxwnm
qvhmitgh
yflyxbjn
qshihqki
debaxqpw
fhfcjogj
huwpnaxx
jpwnrjbc
waylsrcm
aurdpcqc
yanpouht
ybwbpcak
uzvvspnj
tftluckv
uwmditoa
wsndxybi
dotcxasi
lxgmptwn
bpdmcbgt
dpjqvvck
jmgwudli
rimvxcoa
vdlacqbl
qtzwuqny
olzuzuuq
grlyyegi
mhgtadti
yrfdffzj
wbxadryy
bhaniozq
jdishqcx
kmiatkjj
asmxdrmv
riqdknna
fsuetmeg
iikajhgb
ioswsaws
yygpvtfb
egjoltik
bypcbzpk
zaumpggx
sdizezlv
xoyallwy
gicvajdl
qzowhuxa
iyftbzns
srzjxhve
xwasqzay
qznuxpqj
mlnjztxf
rxkcymao
huvxpllx
fmnrqasq
mwwigmka
yovjkmou
kvdrltte
nymvepew
vnrjykzc
unoegpvv
trrejbob
zwsdnqnb
ljsztmgl
tiznomfv
zxtxholt
csufzpiw
jgbjpucz
mpakkeil
ixmbvvbi
ejkhcxjj
zaokljpl
oeocaxdv
ytlpsbcx
hpfserxf
nzregysc
etevckof
bcqkqdvb
xzdhhick
gystpgoo
ciiyzxxr
kwstdxnn
ztregxhx
qhvkjoqe
ugirgwax
nhukpdut
yfiibmmd
cwkayjcp
ebmlabrp
kvjhyrag
wbphpfkc
ucqvhibs
dwuavsyy
jwrdsobl
hytijctt
plcumjhv
hwexsihm
ppmfzgqt
moumyuiw
zvgbsabj
yraygmws
vopzuhor
hafhljwp
gmqpchdg
yyahpihs
xvqakyyp
deamarun
yunihcvw
gcdjqqmu
kctibuxy
gcvlcfhc
ydwoxfvg
epszfvuh
xjjvwpbz
gzpdnthj
mnkrjgwz
ldfwvvfq
tydqesvl
envwzaqv
xvwyzkpe
rmpgcjeo
pkupgxup
ekqizsjl
agvenhgu
vscaqtri
rwfjrjpg
imthkcta
sjpmwqmg
fptfgekn
ohbwdbjm
ccfrphaj
gyeaqkog
onybscve
qztmoant
abjnbrpd
zompdzuf
bamomvbw
kzmmgexu
wzoxohtn
wvgmvwdt
nlgkxmbu
vyoddxyf
phmrizhk
zhksysjf
atcfvzlx
iyabqkly
rnwidjpm
cgwddumw
fcoylnzw
lsxosfra
vbcdgfiw
aenlmdgh
fvtmormn
rllxkznc
asocydmo
zcltimlr
hrqmccpt
dfmlsvtz
ntuhkbws
oziqleds
wkzbguis
coapfihl
irzpsuql
uxaowrls
tdbefhcf
wsyusuph
lpbdrmyn
slrzkkms
wqvzwiyq
vinahrsd
thsnmqjr
kwrzmakz
ifhclifl
wkqahikb
rwnchlkr
rkhpdbbk
vqnzigbf
olzziafs
qcylpbtk
fzhtmgji
qvnyctmb
ouolgwup
xkbrykjx
apbamszk
mlrlmpoh
kdneakuk
rrhhrtfk
cbgzlbgz
mfxencal
bkctqwpe
rjdxhqof
ogcbntmp
bbftqdfk
kikdidvm
mnjgwven
yurxwsge
qlrdtzad
jalffvnu
tayfycwr
jhivnvaw
yuvffepz
mwhczdkv
xltzklis
iellkyqk
krpktxhh
rkawdywu
pqqitomj
nrhhtvtv
gwerzhwc
qlsgifir
ssvyspem
udnnmvxk
albkdbsh
obxcrucu
dnyytrcx

File diff suppressed because it is too large Load Diff

@ -1,173 +0,0 @@
rect 1x1
rotate row y=0 by 20
rect 1x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 3
rect 2x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 3
rect 2x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 4
rect 2x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 3
rect 2x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 5
rect 1x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 6
rect 5x1
rotate row y=0 by 2
rect 1x3
rotate row y=2 by 8
rotate row y=0 by 8
rotate column x=0 by 1
rect 7x1
rotate row y=2 by 24
rotate row y=0 by 20
rotate column x=5 by 1
rotate column x=4 by 2
rotate column x=2 by 2
rotate column x=0 by 1
rect 7x1
rotate column x=34 by 2
rotate column x=22 by 1
rotate column x=15 by 1
rotate row y=2 by 18
rotate row y=0 by 12
rotate column x=8 by 2
rotate column x=7 by 1
rotate column x=5 by 2
rotate column x=2 by 1
rotate column x=0 by 1
rect 9x1
rotate row y=3 by 28
rotate row y=1 by 28
rotate row y=0 by 20
rotate column x=18 by 1
rotate column x=15 by 1
rotate column x=14 by 1
rotate column x=13 by 1
rotate column x=12 by 2
rotate column x=10 by 3
rotate column x=8 by 1
rotate column x=7 by 2
rotate column x=6 by 1
rotate column x=5 by 1
rotate column x=3 by 1
rotate column x=2 by 2
rotate column x=0 by 1
rect 19x1
rotate column x=34 by 2
rotate column x=24 by 1
rotate column x=23 by 1
rotate column x=14 by 1
rotate column x=9 by 2
rotate column x=4 by 2
rotate row y=3 by 5
rotate row y=2 by 3
rotate row y=1 by 7
rotate row y=0 by 5
rotate column x=0 by 2
rect 3x2
rotate column x=16 by 2
rotate row y=3 by 27
rotate row y=2 by 5
rotate row y=0 by 20
rotate column x=8 by 2
rotate column x=7 by 1
rotate column x=5 by 1
rotate column x=3 by 3
rotate column x=2 by 1
rotate column x=1 by 2
rotate column x=0 by 1
rect 9x1
rotate row y=4 by 42
rotate row y=3 by 40
rotate row y=1 by 30
rotate row y=0 by 40
rotate column x=37 by 2
rotate column x=36 by 3
rotate column x=35 by 1
rotate column x=33 by 1
rotate column x=32 by 1
rotate column x=31 by 3
rotate column x=30 by 1
rotate column x=28 by 1
rotate column x=27 by 1
rotate column x=25 by 1
rotate column x=23 by 3
rotate column x=22 by 1
rotate column x=21 by 1
rotate column x=20 by 1
rotate column x=18 by 1
rotate column x=17 by 1
rotate column x=16 by 3
rotate column x=15 by 1
rotate column x=13 by 1
rotate column x=12 by 1
rotate column x=11 by 2
rotate column x=10 by 1
rotate column x=8 by 1
rotate column x=7 by 2
rotate column x=5 by 1
rotate column x=3 by 3
rotate column x=2 by 1
rotate column x=1 by 1
rotate column x=0 by 1
rect 39x1
rotate column x=44 by 2
rotate column x=42 by 2
rotate column x=35 by 5
rotate column x=34 by 2
rotate column x=32 by 2
rotate column x=29 by 2
rotate column x=25 by 5
rotate column x=24 by 2
rotate column x=19 by 2
rotate column x=15 by 4
rotate column x=14 by 2
rotate column x=12 by 3
rotate column x=9 by 2
rotate column x=5 by 5
rotate column x=4 by 2
rotate row y=5 by 5
rotate row y=4 by 38
rotate row y=3 by 10
rotate row y=2 by 46
rotate row y=1 by 10
rotate column x=48 by 4
rotate column x=47 by 3
rotate column x=46 by 3
rotate column x=45 by 1
rotate column x=43 by 1
rotate column x=37 by 5
rotate column x=36 by 5
rotate column x=35 by 4
rotate column x=33 by 1
rotate column x=32 by 5
rotate column x=31 by 5
rotate column x=28 by 5
rotate column x=27 by 5
rotate column x=26 by 3
rotate column x=25 by 4
rotate column x=23 by 1
rotate column x=17 by 5
rotate column x=16 by 5
rotate column x=13 by 1
rotate column x=12 by 5
rotate column x=11 by 5
rotate column x=3 by 1
rotate column x=0 by 1

File diff suppressed because one or more lines are too long

@ -1,4 +0,0 @@
The first floor contains a promethium generator and a promethium-compatible microchip.
The second floor contains a cobalt generator, a curium generator, a ruthenium generator, and a plutonium generator.
The third floor contains a cobalt-compatible microchip, a curium-compatible microchip, a ruthenium-compatible microchip, and a plutonium-compatible microchip.
The fourth floor contains nothing relevant.

@ -1,23 +0,0 @@
cpy 1 a
cpy 1 b
cpy 26 d
jnz c 2
jnz 1 5
cpy 7 c
inc d
dec c
jnz c -2
cpy a c
inc a
dec b
jnz b -2
cpy c b
dec d
jnz d -6
cpy 16 c
cpy 17 d
inc a
dec d
jnz d -2
dec c
jnz c -5

File diff suppressed because it is too large Load Diff

@ -1,100 +0,0 @@
move position 0 to position 3
rotate right 0 steps
rotate right 1 step
move position 1 to position 5
swap letter h with letter b
reverse positions 1 through 3
swap letter a with letter g
swap letter b with letter h
rotate based on position of letter c
swap letter d with letter c
rotate based on position of letter c
swap position 6 with position 5
rotate right 7 steps
swap letter b with letter h
move position 4 to position 3
swap position 1 with position 0
swap position 7 with position 5
move position 7 to position 1
swap letter c with letter a
move position 7 to position 5
rotate right 4 steps
swap position 0 with position 5
move position 3 to position 1
swap letter c with letter h
rotate based on position of letter d
reverse positions 0 through 2
rotate based on position of letter g
move position 6 to position 7
move position 2 to position 5
swap position 1 with position 0
swap letter f with letter c
rotate right 1 step
reverse positions 2 through 4
rotate left 1 step
rotate based on position of letter h
rotate right 1 step
rotate right 5 steps
swap position 6 with position 3
move position 0 to position 5
swap letter g with letter f
reverse positions 2 through 7
reverse positions 4 through 6
swap position 4 with position 1
move position 2 to position 1
move position 3 to position 1
swap letter b with letter a
rotate based on position of letter b
reverse positions 3 through 5
move position 0 to position 2
rotate based on position of letter b
reverse positions 4 through 5
rotate based on position of letter g
reverse positions 0 through 5
swap letter h with letter c
reverse positions 2 through 5
swap position 7 with position 5
swap letter g with letter d
swap letter d with letter e
move position 1 to position 2
move position 3 to position 2
swap letter d with letter g
swap position 3 with position 7
swap letter b with letter f
rotate right 3 steps
move position 5 to position 3
move position 1 to position 2
rotate based on position of letter b
rotate based on position of letter c
reverse positions 2 through 3
move position 2 to position 3
rotate right 1 step
move position 7 to position 0
rotate right 3 steps
move position 6 to position 3
rotate based on position of letter e
swap letter c with letter b
swap letter f with letter d
swap position 2 with position 5
swap letter f with letter g
rotate based on position of letter a
reverse positions 3 through 4
rotate left 7 steps
rotate left 6 steps
swap letter g with letter b
reverse positions 3 through 6
rotate right 6 steps
rotate based on position of letter c
rotate based on position of letter b
rotate left 1 step
reverse positions 3 through 7
swap letter f with letter g
swap position 4 with position 1
rotate based on position of letter d
move position 0 to position 4
swap position 7 with position 6
rotate right 6 steps
rotate based on position of letter e
move position 7 to position 3
rotate right 3 steps
swap position 1 with position 2

@ -1,927 +0,0 @@
root@ebhq-gridcenter# df -h
Filesystem Size Used Avail Use%
/dev/grid/node-x0-y0 87T 71T 16T 81%
/dev/grid/node-x0-y1 93T 72T 21T 77%
/dev/grid/node-x0-y2 87T 67T 20T 77%
/dev/grid/node-x0-y3 89T 65T 24T 73%
/dev/grid/node-x0-y4 93T 67T 26T 72%
/dev/grid/node-x0-y5 94T 65T 29T 69%
/dev/grid/node-x0-y6 85T 64T 21T 75%
/dev/grid/node-x0-y7 85T 69T 16T 81%
/dev/grid/node-x0-y8 85T 71T 14T 83%
/dev/grid/node-x0-y9 91T 68T 23T 74%
/dev/grid/node-x0-y10 88T 65T 23T 73%
/dev/grid/node-x0-y11 89T 66T 23T 74%
/dev/grid/node-x0-y12 93T 68T 25T 73%
/dev/grid/node-x0-y13 90T 67T 23T 74%
/dev/grid/node-x0-y14 88T 69T 19T 78%
/dev/grid/node-x0-y15 94T 69T 25T 73%
/dev/grid/node-x0-y16 89T 67T 22T 75%
/dev/grid/node-x0-y17 85T 69T 16T 81%
/dev/grid/node-x0-y18 87T 64T 23T 73%
/dev/grid/node-x0-y19 92T 66T 26T 71%
/dev/grid/node-x0-y20 94T 69T 25T 73%
/dev/grid/node-x0-y21 88T 65T 23T 73%
/dev/grid/node-x0-y22 87T 72T 15T 82%
/dev/grid/node-x0-y23 92T 66T 26T 71%
/dev/grid/node-x0-y24 89T 72T 17T 80%
/dev/grid/node-x1-y0 86T 66T 20T 76%
/dev/grid/node-x1-y1 93T 64T 29T 68%
/dev/grid/node-x1-y2 92T 65T 27T 70%
/dev/grid/node-x1-y3 92T 70T 22T 76%
/dev/grid/node-x1-y4 87T 72T 15T 82%
/dev/grid/node-x1-y5 87T 69T 18T 79%
/dev/grid/node-x1-y6 88T 72T 16T 81%
/dev/grid/node-x1-y7 94T 68T 26T 72%
/dev/grid/node-x1-y8 93T 70T 23T 75%
/dev/grid/node-x1-y9 87T 69T 18T 79%
/dev/grid/node-x1-y10 90T 66T 24T 73%
/dev/grid/node-x1-y11 87T 67T 20T 77%
/dev/grid/node-x1-y12 86T 66T 20T 76%
/dev/grid/node-x1-y13 89T 67T 22T 75%
/dev/grid/node-x1-y14 88T 73T 15T 82%
/dev/grid/node-x1-y15 86T 71T 15T 82%
/dev/grid/node-x1-y16 94T 68T 26T 72%
/dev/grid/node-x1-y17 94T 66T 28T 70%
/dev/grid/node-x1-y18 91T 73T 18T 80%
/dev/grid/node-x1-y19 86T 64T 22T 74%
/dev/grid/node-x1-y20 86T 66T 20T 76%
/dev/grid/node-x1-y21 90T 70T 20T 77%
/dev/grid/node-x1-y22 89T 69T 20T 77%
/dev/grid/node-x1-y23 90T 67T 23T 74%
/dev/grid/node-x1-y24 90T 64T 26T 71%
/dev/grid/node-x2-y0 85T 69T 16T 81%
/dev/grid/node-x2-y1 89T 68T 21T 76%
/dev/grid/node-x2-y2 94T 65T 29T 69%
/dev/grid/node-x2-y3 92T 70T 22T 76%
/dev/grid/node-x2-y4 91T 71T 20T 78%
/dev/grid/node-x2-y5 86T 73T 13T 84%
/dev/grid/node-x2-y6 85T 73T 12T 85%
/dev/grid/node-x2-y7 91T 71T 20T 78%
/dev/grid/node-x2-y8 90T 71T 19T 78%
/dev/grid/node-x2-y9 89T 68T 21T 76%
/dev/grid/node-x2-y10 85T 65T 20T 76%
/dev/grid/node-x2-y11 90T 68T 22T 75%
/dev/grid/node-x2-y12 86T 66T 20T 76%
/dev/grid/node-x2-y13 91T 70T 21T 76%
/dev/grid/node-x2-y14 93T 68T 25T 73%
/dev/grid/node-x2-y15 94T 64T 30T 68%
/dev/grid/node-x2-y16 85T 65T 20T 76%
/dev/grid/node-x2-y17 92T 68T 24T 73%
/dev/grid/node-x2-y18 94T 67T 27T 71%
/dev/grid/node-x2-y19 94T 69T 25T 73%
/dev/grid/node-x2-y20 86T 65T 21T 75%
/dev/grid/node-x2-y21 86T 67T 19T 77%
/dev/grid/node-x2-y22 90T 68T 22T 75%
/dev/grid/node-x2-y23 94T 69T 25T 73%
/dev/grid/node-x2-y24 91T 72T 19T 79%
/dev/grid/node-x3-y0 93T 71T 22T 76%
/dev/grid/node-x3-y1 86T 67T 19T 77%
/dev/grid/node-x3-y2 87T 68T 19T 78%
/dev/grid/node-x3-y3 85T 73T 12T 85%
/dev/grid/node-x3-y4 91T 73T 18T 80%
/dev/grid/node-x3-y5 89T 65T 24T 73%
/dev/grid/node-x3-y6 91T 72T 19T 79%
/dev/grid/node-x3-y7 92T 67T 25T 72%
/dev/grid/node-x3-y8 90T 71T 19T 78%
/dev/grid/node-x3-y9 86T 67T 19T 77%
/dev/grid/node-x3-y10 90T 67T 23T 74%
/dev/grid/node-x3-y11 85T 71T 14T 83%
/dev/grid/node-x3-y12 93T 64T 29T 68%
/dev/grid/node-x3-y13 85T 71T 14T 83%
/dev/grid/node-x3-y14 93T 64T 29T 68%
/dev/grid/node-x3-y15 89T 64T 25T 71%
/dev/grid/node-x3-y16 89T 72T 17T 80%
/dev/grid/node-x3-y17 91T 65T 26T 71%
/dev/grid/node-x3-y18 93T 65T 28T 69%
/dev/grid/node-x3-y19 85T 65T 20T 76%
/dev/grid/node-x3-y20 94T 72T 22T 76%
/dev/grid/node-x3-y21 90T 66T 24T 73%
/dev/grid/node-x3-y22 88T 67T 21T 76%
/dev/grid/node-x3-y23 90T 72T 18T 80%
/dev/grid/node-x3-y24 94T 68T 26T 72%
/dev/grid/node-x4-y0 88T 67T 21T 76%
/dev/grid/node-x4-y1 94T 67T 27T 71%
/dev/grid/node-x4-y2 92T 66T 26T 71%
/dev/grid/node-x4-y3 93T 66T 27T 70%
/dev/grid/node-x4-y4 86T 66T 20T 76%
/dev/grid/node-x4-y5 87T 68T 19T 78%
/dev/grid/node-x4-y6 92T 68T 24T 73%
/dev/grid/node-x4-y7 92T 66T 26T 71%
/dev/grid/node-x4-y8 94T 66T 28T 70%
/dev/grid/node-x4-y9 87T 73T 14T 83%
/dev/grid/node-x4-y10 87T 69T 18T 79%
/dev/grid/node-x4-y11 88T 68T 20T 77%
/dev/grid/node-x4-y12 92T 73T 19T 79%
/dev/grid/node-x4-y13 89T 73T 16T 82%
/dev/grid/node-x4-y14 87T 66T 21T 75%
/dev/grid/node-x4-y15 86T 68T 18T 79%
/dev/grid/node-x4-y16 86T 70T 16T 81%
/dev/grid/node-x4-y17 94T 64T 30T 68%
/dev/grid/node-x4-y18 91T 69T 22T 75%
/dev/grid/node-x4-y19 86T 67T 19T 77%
/dev/grid/node-x4-y20 85T 64T 21T 75%
/dev/grid/node-x4-y21 89T 69T 20T 77%
/dev/grid/node-x4-y22 85T 68T 17T 80%
/dev/grid/node-x4-y23 87T 70T 17T 80%
/dev/grid/node-x4-y24 91T 65T 26T 71%
/dev/grid/node-x5-y0 85T 66T 19T 77%
/dev/grid/node-x5-y1 93T 65T 28T 69%
/dev/grid/node-x5-y2 93T 64T 29T 68%
/dev/grid/node-x5-y3 87T 65T 22T 74%
/dev/grid/node-x5-y4 85T 69T 16T 81%
/dev/grid/node-x5-y5 93T 73T 20T 78%
/dev/grid/node-x5-y6 89T 66T 23T 74%
/dev/grid/node-x5-y7 505T 493T 12T 97%
/dev/grid/node-x5-y8 85T 72T 13T 84%
/dev/grid/node-x5-y9 85T 66T 19T 77%
/dev/grid/node-x5-y10 88T 70T 18T 79%
/dev/grid/node-x5-y11 89T 69T 20T 77%
/dev/grid/node-x5-y12 90T 69T 21T 76%
/dev/grid/node-x5-y13 87T 64T 23T 73%
/dev/grid/node-x5-y14 93T 64T 29T 68%
/dev/grid/node-x5-y15 92T 64T 28T 69%
/dev/grid/node-x5-y16 90T 66T 24T 73%
/dev/grid/node-x5-y17 88T 64T 24T 72%
/dev/grid/node-x5-y18 87T 67T 20T 77%
/dev/grid/node-x5-y19 92T 71T 21T 77%
/dev/grid/node-x5-y20 90T 68T 22T 75%
/dev/grid/node-x5-y21 86T 69T 17T 80%
/dev/grid/node-x5-y22 86T 70T 16T 81%
/dev/grid/node-x5-y23 85T 73T 12T 85%
/dev/grid/node-x5-y24 93T 65T 28T 69%
/dev/grid/node-x6-y0 88T 69T 19T 78%
/dev/grid/node-x6-y1 92T 71T 21T 77%
/dev/grid/node-x6-y2 85T 70T 15T 82%
/dev/grid/node-x6-y3 94T 70T 24T 74%
/dev/grid/node-x6-y4 92T 70T 22T 76%
/dev/grid/node-x6-y5 85T 71T 14T 83%
/dev/grid/node-x6-y6 90T 66T 24T 73%
/dev/grid/node-x6-y7 507T 497T 10T 98%
/dev/grid/node-x6-y8 85T 64T 21T 75%
/dev/grid/node-x6-y9 90T 64T 26T 71%
/dev/grid/node-x6-y10 86T 69T 17T 80%
/dev/grid/node-x6-y11 91T 67T 24T 73%
/dev/grid/node-x6-y12 93T 66T 27T 70%
/dev/grid/node-x6-y13 87T 73T 14T 83%
/dev/grid/node-x6-y14 86T 64T 22T 74%
/dev/grid/node-x6-y15 92T 73T 19T 79%
/dev/grid/node-x6-y16 92T 66T 26T 71%
/dev/grid/node-x6-y17 94T 69T 25T 73%
/dev/grid/node-x6-y18 87T 69T 18T 79%
/dev/grid/node-x6-y19 89T 66T 23T 74%
/dev/grid/node-x6-y20 93T 70T 23T 75%
/dev/grid/node-x6-y21 86T 70T 16T 81%
/dev/grid/node-x6-y22 93T 65T 28T 69%
/dev/grid/node-x6-y23 85T 73T 12T 85%
/dev/grid/node-x6-y24 92T 71T 21T 77%
/dev/grid/node-x7-y0 85T 65T 20T 76%
/dev/grid/node-x7-y1 93T 64T 29T 68%
/dev/grid/node-x7-y2 94T 72T 22T 76%
/dev/grid/node-x7-y3 90T 70T 20T 77%
/dev/grid/node-x7-y4 85T 67T 18T 78%
/dev/grid/node-x7-y5 91T 70T 21T 76%
/dev/grid/node-x7-y6 85T 65T 20T 76%
/dev/grid/node-x7-y7 507T 492T 15T 97%
/dev/grid/node-x7-y8 88T 66T 22T 75%
/dev/grid/node-x7-y9 86T 72T 14T 83%
/dev/grid/node-x7-y10 91T 66T 25T 72%
/dev/grid/node-x7-y11 91T 65T 26T 71%
/dev/grid/node-x7-y12 91T 67T 24T 73%
/dev/grid/node-x7-y13 85T 64T 21T 75%
/dev/grid/node-x7-y14 91T 65T 26T 71%
/dev/grid/node-x7-y15 91T 66T 25T 72%
/dev/grid/node-x7-y16 89T 65T 24T 73%
/dev/grid/node-x7-y17 92T 0T 92T 0%
/dev/grid/node-x7-y18 92T 71T 21T 77%
/dev/grid/node-x7-y19 90T 67T 23T 74%
/dev/grid/node-x7-y20 88T 66T 22T 75%
/dev/grid/node-x7-y21 85T 64T 21T 75%
/dev/grid/node-x7-y22 94T 65T 29T 69%
/dev/grid/node-x7-y23 93T 70T 23T 75%
/dev/grid/node-x7-y24 88T 67T 21T 76%
/dev/grid/node-x8-y0 88T 73T 15T 82%
/dev/grid/node-x8-y1 94T 69T 25T 73%
/dev/grid/node-x8-y2 87T 72T 15T 82%
/dev/grid/node-x8-y3 93T 73T 20T 78%
/dev/grid/node-x8-y4 86T 66T 20T 76%
/dev/grid/node-x8-y5 85T 72T 13T 84%
/dev/grid/node-x8-y6 93T 67T 26T 72%
/dev/grid/node-x8-y7 501T 499T 2T 99%
/dev/grid/node-x8-y8 89T 65T 24T 73%
/dev/grid/node-x8-y9 93T 70T 23T 75%
/dev/grid/node-x8-y10 94T 72T 22T 76%
/dev/grid/node-x8-y11 85T 65T 20T 76%
/dev/grid/node-x8-y12 93T 68T 25T 73%
/dev/grid/node-x8-y13 85T 65T 20T 76%
/dev/grid/node-x8-y14 92T 73T 19T 79%
/dev/grid/node-x8-y15 86T 67T 19T 77%
/dev/grid/node-x8-y16 87T 65T 22T 74%
/dev/grid/node-x8-y17 93T 64T 29T 68%
/dev/grid/node-x8-y18 85T 69T 16T 81%
/dev/grid/node-x8-y19 87T 64T 23T 73%
/dev/grid/node-x8-y20 85T 65T 20T 76%
/dev/grid/node-x8-y21 89T 72T 17T 80%
/dev/grid/node-x8-y22 86T 66T 20T 76%
/dev/grid/node-x8-y23 88T 70T 18T 79%
/dev/grid/node-x8-y24 91T 66T 25T 72%
/dev/grid/node-x9-y0 89T 69T 20T 77%
/dev/grid/node-x9-y1 85T 68T 17T 80%
/dev/grid/node-x9-y2 91T 66T 25T 72%
/dev/grid/node-x9-y3 87T 68T 19T 78%
/dev/grid/node-x9-y4 91T 66T 25T 72%
/dev/grid/node-x9-y5 92T 64T 28T 69%
/dev/grid/node-x9-y6 89T 66T 23T 74%
/dev/grid/node-x9-y7 506T 490T 16T 96%
/dev/grid/node-x9-y8 89T 73T 16T 82%
/dev/grid/node-x9-y9 92T 68T 24T 73%
/dev/grid/node-x9-y10 85T 71T 14T 83%
/dev/grid/node-x9-y11 93T 64T 29T 68%
/dev/grid/node-x9-y12 88T 71T 17T 80%
/dev/grid/node-x9-y13 94T 65T 29T 69%
/dev/grid/node-x9-y14 90T 66T 24T 73%
/dev/grid/node-x9-y15 94T 70T 24T 74%
/dev/grid/node-x9-y16 92T 72T 20T 78%
/dev/grid/node-x9-y17 89T 69T 20T 77%
/dev/grid/node-x9-y18 87T 65T 22T 74%
/dev/grid/node-x9-y19 93T 70T 23T 75%
/dev/grid/node-x9-y20 89T 71T 18T 79%
/dev/grid/node-x9-y21 89T 73T 16T 82%
/dev/grid/node-x9-y22 91T 66T 25T 72%
/dev/grid/node-x9-y23 90T 67T 23T 74%
/dev/grid/node-x9-y24 92T 72T 20T 78%
/dev/grid/node-x10-y0 94T 70T 24T 74%
/dev/grid/node-x10-y1 92T 73T 19T 79%
/dev/grid/node-x10-y2 86T 68T 18T 79%
/dev/grid/node-x10-y3 94T 69T 25T 73%
/dev/grid/node-x10-y4 87T 72T 15T 82%
/dev/grid/node-x10-y5 90T 69T 21T 76%
/dev/grid/node-x10-y6 87T 65T 22T 74%
/dev/grid/node-x10-y7 510T 494T 16T 96%
/dev/grid/node-x10-y8 94T 72T 22T 76%
/dev/grid/node-x10-y9 93T 71T 22T 76%
/dev/grid/node-x10-y10 87T 70T 17T 80%
/dev/grid/node-x10-y11 94T 66T 28T 70%
/dev/grid/node-x10-y12 89T 68T 21T 76%
/dev/grid/node-x10-y13 92T 71T 21T 77%
/dev/grid/node-x10-y14 94T 70T 24T 74%
/dev/grid/node-x10-y15 94T 67T 27T 71%
/dev/grid/node-x10-y16 89T 73T 16T 82%
/dev/grid/node-x10-y17 92T 72T 20T 78%
/dev/grid/node-x10-y18 91T 71T 20T 78%
/dev/grid/node-x10-y19 93T 69T 24T 74%
/dev/grid/node-x10-y20 94T 67T 27T 71%
/dev/grid/node-x10-y21 85T 68T 17T 80%
/dev/grid/node-x10-y22 85T 70T 15T 82%
/dev/grid/node-x10-y23 93T 68T 25T 73%
/dev/grid/node-x10-y24 94T 64T 30T 68%
/dev/grid/node-x11-y0 85T 72T 13T 84%
/dev/grid/node-x11-y1 92T 72T 20T 78%
/dev/grid/node-x11-y2 88T 65T 23T 73%
/dev/grid/node-x11-y3 89T 70T 19T 78%
/dev/grid/node-x11-y4 90T 66T 24T 73%
/dev/grid/node-x11-y5 89T 65T 24T 73%
/dev/grid/node-x11-y6 87T 65T 22T 74%
/dev/grid/node-x11-y7 501T 490T 11T 97%
/dev/grid/node-x11-y8 87T 72T 15T 82%
/dev/grid/node-x11-y9 92T 65T 27T 70%
/dev/grid/node-x11-y10 89T 71T 18T 79%
/dev/grid/node-x11-y11 88T 64T 24T 72%
/dev/grid/node-x11-y12 94T 67T 27T 71%
/dev/grid/node-x11-y13 91T 66T 25T 72%
/dev/grid/node-x11-y14 86T 67T 19T 77%
/dev/grid/node-x11-y15 88T 65T 23T 73%
/dev/grid/node-x11-y16 88T 68T 20T 77%
/dev/grid/node-x11-y17 87T 72T 15T 82%
/dev/grid/node-x11-y18 93T 64T 29T 68%
/dev/grid/node-x11-y19 90T 65T 25T 72%
/dev/grid/node-x11-y20 92T 68T 24T 73%
/dev/grid/node-x11-y21 90T 73T 17T 81%
/dev/grid/node-x11-y22 87T 71T 16T 81%
/dev/grid/node-x11-y23 89T 67T 22T 75%
/dev/grid/node-x11-y24 92T 68T 24T 73%
/dev/grid/node-x12-y0 86T 69T 17T 80%
/dev/grid/node-x12-y1 87T 70T 17T 80%
/dev/grid/node-x12-y2 86T 70T 16T 81%
/dev/grid/node-x12-y3 87T 67T 20T 77%
/dev/grid/node-x12-y4 89T 71T 18T 79%
/dev/grid/node-x12-y5 94T 71T 23T 75%
/dev/grid/node-x12-y6 94T 72T 22T 76%
/dev/grid/node-x12-y7 505T 493T 12T 97%
/dev/grid/node-x12-y8 88T 72T 16T 81%
/dev/grid/node-x12-y9 87T 66T 21T 75%
/dev/grid/node-x12-y10 93T 65T 28T 69%
/dev/grid/node-x12-y11 87T 67T 20T 77%
/dev/grid/node-x12-y12 86T 69T 17T 80%
/dev/grid/node-x12-y13 90T 67T 23T 74%
/dev/grid/node-x12-y14 93T 68T 25T 73%
/dev/grid/node-x12-y15 92T 65T 27T 70%
/dev/grid/node-x12-y16 94T 70T 24T 74%
/dev/grid/node-x12-y17 86T 69T 17T 80%
/dev/grid/node-x12-y18 87T 70T 17T 80%
/dev/grid/node-x12-y19 93T 73T 20T 78%
/dev/grid/node-x12-y20 92T 72T 20T 78%
/dev/grid/node-x12-y21 91T 68T 23T 74%
/dev/grid/node-x12-y22 86T 65T 21T 75%
/dev/grid/node-x12-y23 87T 65T 22T 74%
/dev/grid/node-x12-y24 94T 64T 30T 68%
/dev/grid/node-x13-y0 85T 72T 13T 84%
/dev/grid/node-x13-y1 93T 72T 21T 77%
/dev/grid/node-x13-y2 89T 66T 23T 74%
/dev/grid/node-x13-y3 89T 67T 22T 75%
/dev/grid/node-x13-y4 85T 69T 16T 81%
/dev/grid/node-x13-y5 86T 70T 16T 81%
/dev/grid/node-x13-y6 90T 71T 19T 78%
/dev/grid/node-x13-y7 510T 496T 14T 97%
/dev/grid/node-x13-y8 89T 70T 19T 78%
/dev/grid/node-x13-y9 94T 67T 27T 71%
/dev/grid/node-x13-y10 90T 70T 20T 77%
/dev/grid/node-x13-y11 85T 67T 18T 78%
/dev/grid/node-x13-y12 94T 65T 29T 69%
/dev/grid/node-x13-y13 91T 72T 19T 79%
/dev/grid/node-x13-y14 94T 73T 21T 77%
/dev/grid/node-x13-y15 87T 72T 15T 82%
/dev/grid/node-x13-y16 94T 68T 26T 72%
/dev/grid/node-x13-y17 89T 72T 17T 80%
/dev/grid/node-x13-y18 94T 70T 24T 74%
/dev/grid/node-x13-y19 87T 68T 19T 78%
/dev/grid/node-x13-y20 94T 73T 21T 77%
/dev/grid/node-x13-y21 87T 64T 23T 73%
/dev/grid/node-x13-y22 89T 67T 22T 75%
/dev/grid/node-x13-y23 85T 70T 15T 82%
/dev/grid/node-x13-y24 90T 65T 25T 72%
/dev/grid/node-x14-y0 85T 69T 16T 81%
/dev/grid/node-x14-y1 92T 73T 19T 79%
/dev/grid/node-x14-y2 90T 70T 20T 77%
/dev/grid/node-x14-y3 91T 68T 23T 74%
/dev/grid/node-x14-y4 85T 73T 12T 85%
/dev/grid/node-x14-y5 90T 67T 23T 74%
/dev/grid/node-x14-y6 86T 70T 16T 81%
/dev/grid/node-x14-y7 507T 494T 13T 97%
/dev/grid/node-x14-y8 85T 69T 16T 81%
/dev/grid/node-x14-y9 88T 69T 19T 78%
/dev/grid/node-x14-y10 90T 70T 20T 77%
/dev/grid/node-x14-y11 87T 70T 17T 80%
/dev/grid/node-x14-y12 88T 66T 22T 75%
/dev/grid/node-x14-y13 92T 65T 27T 70%
/dev/grid/node-x14-y14 94T 64T 30T 68%
/dev/grid/node-x14-y15 92T 68T 24T 73%
/dev/grid/node-x14-y16 89T 68T 21T 76%
/dev/grid/node-x14-y17 91T 66T 25T 72%
/dev/grid/node-x14-y18 93T 64T 29T 68%
/dev/grid/node-x14-y19 93T 68T 25T 73%
/dev/grid/node-x14-y20 88T 64T 24T 72%
/dev/grid/node-x14-y21 88T 68T 20T 77%
/dev/grid/node-x14-y22 93T 72T 21T 77%
/dev/grid/node-x14-y23 86T 64T 22T 74%
/dev/grid/node-x14-y24 94T 66T 28T 70%
/dev/grid/node-x15-y0 88T 73T 15T 82%
/dev/grid/node-x15-y1 85T 65T 20T 76%
/dev/grid/node-x15-y2 93T 68T 25T 73%
/dev/grid/node-x15-y3 91T 69T 22T 75%
/dev/grid/node-x15-y4 94T 65T 29T 69%
/dev/grid/node-x15-y5 92T 65T 27T 70%
/dev/grid/node-x15-y6 87T 65T 22T 74%
/dev/grid/node-x15-y7 503T 492T 11T 97%
/dev/grid/node-x15-y8 94T 64T 30T 68%
/dev/grid/node-x15-y9 92T 64T 28T 69%
/dev/grid/node-x15-y10 94T 72T 22T 76%
/dev/grid/node-x15-y11 94T 66T 28T 70%
/dev/grid/node-x15-y12 90T 68T 22T 75%
/dev/grid/node-x15-y13 91T 69T 22T 75%
/dev/grid/node-x15-y14 89T 68T 21T 76%
/dev/grid/node-x15-y15 89T 68T 21T 76%
/dev/grid/node-x15-y16 91T 70T 21T 76%
/dev/grid/node-x15-y17 94T 68T 26T 72%
/dev/grid/node-x15-y18 92T 69T 23T 75%
/dev/grid/node-x15-y19 93T 72T 21T 77%
/dev/grid/node-x15-y20 88T 73T 15T 82%
/dev/grid/node-x15-y21 94T 64T 30T 68%
/dev/grid/node-x15-y22 85T 70T 15T 82%
/dev/grid/node-x15-y23 91T 73T 18T 80%
/dev/grid/node-x15-y24 85T 71T 14T 83%
/dev/grid/node-x16-y0 86T 65T 21T 75%
/dev/grid/node-x16-y1 87T 67T 20T 77%
/dev/grid/node-x16-y2 92T 73T 19T 79%
/dev/grid/node-x16-y3 88T 70T 18T 79%
/dev/grid/node-x16-y4 89T 67T 22T 75%
/dev/grid/node-x16-y5 86T 68T 18T 79%
/dev/grid/node-x16-y6 89T 67T 22T 75%
/dev/grid/node-x16-y7 510T 493T 17T 96%
/dev/grid/node-x16-y8 86T 67T 19T 77%
/dev/grid/node-x16-y9 90T 64T 26T 71%
/dev/grid/node-x16-y10 90T 72T 18T 80%
/dev/grid/node-x16-y11 94T 64T 30T 68%
/dev/grid/node-x16-y12 94T 65T 29T 69%
/dev/grid/node-x16-y13 87T 71T 16T 81%
/dev/grid/node-x16-y14 89T 68T 21T 76%
/dev/grid/node-x16-y15 93T 67T 26T 72%
/dev/grid/node-x16-y16 89T 71T 18T 79%
/dev/grid/node-x16-y17 91T 73T 18T 80%
/dev/grid/node-x16-y18 90T 68T 22T 75%
/dev/grid/node-x16-y19 85T 66T 19T 77%
/dev/grid/node-x16-y20 87T 68T 19T 78%
/dev/grid/node-x16-y21 89T 69T 20T 77%
/dev/grid/node-x16-y22 88T 71T 17T 80%
/dev/grid/node-x16-y23 94T 72T 22T 76%
/dev/grid/node-x16-y24 88T 64T 24T 72%
/dev/grid/node-x17-y0 85T 70T 15T 82%
/dev/grid/node-x17-y1 90T 73T 17T 81%
/dev/grid/node-x17-y2 93T 68T 25T 73%
/dev/grid/node-x17-y3 85T 72T 13T 84%
/dev/grid/node-x17-y4 88T 70T 18T 79%
/dev/grid/node-x17-y5 85T 64T 21T 75%
/dev/grid/node-x17-y6 89T 64T 25T 71%
/dev/grid/node-x17-y7 509T 492T 17T 96%
/dev/grid/node-x17-y8 86T 72T 14T 83%
/dev/grid/node-x17-y9 92T 67T 25T 72%
/dev/grid/node-x17-y10 91T 71T 20T 78%
/dev/grid/node-x17-y11 91T 67T 24T 73%
/dev/grid/node-x17-y12 91T 72T 19T 79%
/dev/grid/node-x17-y13 92T 73T 19T 79%
/dev/grid/node-x17-y14 93T 67T 26T 72%
/dev/grid/node-x17-y15 87T 71T 16T 81%
/dev/grid/node-x17-y16 90T 65T 25T 72%
/dev/grid/node-x17-y17 88T 71T 17T 80%
/dev/grid/node-x17-y18 87T 69T 18T 79%
/dev/grid/node-x17-y19 90T 65T 25T 72%
/dev/grid/node-x17-y20 93T 67T 26T 72%
/dev/grid/node-x17-y21 91T 69T 22T 75%
/dev/grid/node-x17-y22 89T 71T 18T 79%
/dev/grid/node-x17-y23 85T 73T 12T 85%
/dev/grid/node-x17-y24 90T 68T 22T 75%
/dev/grid/node-x18-y0 87T 72T 15T 82%
/dev/grid/node-x18-y1 93T 71T 22T 76%
/dev/grid/node-x18-y2 94T 67T 27T 71%
/dev/grid/node-x18-y3 87T 67T 20T 77%
/dev/grid/node-x18-y4 94T 71T 23T 75%
/dev/grid/node-x18-y5 87T 70T 17T 80%
/dev/grid/node-x18-y6 89T 64T 25T 71%
/dev/grid/node-x18-y7 504T 498T 6T 98%
/dev/grid/node-x18-y8 85T 72T 13T 84%
/dev/grid/node-x18-y9 91T 71T 20T 78%
/dev/grid/node-x18-y10 90T 69T 21T 76%
/dev/grid/node-x18-y11 87T 71T 16T 81%
/dev/grid/node-x18-y12 94T 69T 25T 73%
/dev/grid/node-x18-y13 90T 70T 20T 77%
/dev/grid/node-x18-y14 93T 65T 28T 69%
/dev/grid/node-x18-y15 87T 67T 20T 77%
/dev/grid/node-x18-y16 88T 64T 24T 72%
/dev/grid/node-x18-y17 88T 71T 17T 80%
/dev/grid/node-x18-y18 90T 66T 24T 73%
/dev/grid/node-x18-y19 90T 65T 25T 72%
/dev/grid/node-x18-y20 86T 71T 15T 82%
/dev/grid/node-x18-y21 87T 73T 14T 83%
/dev/grid/node-x18-y22 89T 69T 20T 77%
/dev/grid/node-x18-y23 90T 67T 23T 74%
/dev/grid/node-x18-y24 88T 72T 16T 81%
/dev/grid/node-x19-y0 87T 71T 16T 81%
/dev/grid/node-x19-y1 94T 71T 23T 75%
/dev/grid/node-x19-y2 85T 68T 17T 80%
/dev/grid/node-x19-y3 88T 65T 23T 73%
/dev/grid/node-x19-y4 93T 66T 27T 70%
/dev/grid/node-x19-y5 88T 67T 21T 76%
/dev/grid/node-x19-y6 89T 70T 19T 78%
/dev/grid/node-x19-y7 509T 496T 13T 97%
/dev/grid/node-x19-y8 89T 67T 22T 75%
/dev/grid/node-x19-y9 92T 71T 21T 77%
/dev/grid/node-x19-y10 85T 64T 21T 75%
/dev/grid/node-x19-y11 89T 67T 22T 75%
/dev/grid/node-x19-y12 91T 72T 19T 79%
/dev/grid/node-x19-y13 88T 72T 16T 81%
/dev/grid/node-x19-y14 88T 67T 21T 76%
/dev/grid/node-x19-y15 87T 65T 22T 74%
/dev/grid/node-x19-y16 90T 65T 25T 72%
/dev/grid/node-x19-y17 94T 71T 23T 75%
/dev/grid/node-x19-y18 86T 64T 22T 74%
/dev/grid/node-x19-y19 85T 65T 20T 76%
/dev/grid/node-x19-y20 93T 67T 26T 72%
/dev/grid/node-x19-y21 85T 65T 20T 76%
/dev/grid/node-x19-y22 88T 70T 18T 79%
/dev/grid/node-x19-y23 93T 73T 20T 78%
/dev/grid/node-x19-y24 93T 66T 27T 70%
/dev/grid/node-x20-y0 88T 71T 17T 80%
/dev/grid/node-x20-y1 94T 67T 27T 71%
/dev/grid/node-x20-y2 94T 71T 23T 75%
/dev/grid/node-x20-y3 91T 67T 24T 73%
/dev/grid/node-x20-y4 88T 73T 15T 82%
/dev/grid/node-x20-y5 90T 65T 25T 72%
/dev/grid/node-x20-y6 85T 64T 21T 75%
/dev/grid/node-x20-y7 502T 497T 5T 99%
/dev/grid/node-x20-y8 94T 72T 22T 76%
/dev/grid/node-x20-y9 85T 72T 13T 84%
/dev/grid/node-x20-y10 92T 65T 27T 70%
/dev/grid/node-x20-y11 89T 65T 24T 73%
/dev/grid/node-x20-y12 87T 71T 16T 81%
/dev/grid/node-x20-y13 92T 70T 22T 76%
/dev/grid/node-x20-y14 91T 67T 24T 73%
/dev/grid/node-x20-y15 91T 65T 26T 71%
/dev/grid/node-x20-y16 89T 72T 17T 80%
/dev/grid/node-x20-y17 92T 66T 26T 71%
/dev/grid/node-x20-y18 91T 71T 20T 78%
/dev/grid/node-x20-y19 91T 69T 22T 75%
/dev/grid/node-x20-y20 89T 73T 16T 82%
/dev/grid/node-x20-y21 87T 72T 15T 82%
/dev/grid/node-x20-y22 86T 64T 22T 74%
/dev/grid/node-x20-y23 86T 67T 19T 77%
/dev/grid/node-x20-y24 94T 71T 23T 75%
/dev/grid/node-x21-y0 87T 70T 17T 80%
/dev/grid/node-x21-y1 90T 67T 23T 74%
/dev/grid/node-x21-y2 86T 72T 14T 83%
/dev/grid/node-x21-y3 90T 68T 22T 75%
/dev/grid/node-x21-y4 92T 69T 23T 75%
/dev/grid/node-x21-y5 90T 68T 22T 75%
/dev/grid/node-x21-y6 93T 72T 21T 77%
/dev/grid/node-x21-y7 507T 490T 17T 96%
/dev/grid/node-x21-y8 85T 64T 21T 75%
/dev/grid/node-x21-y9 85T 67T 18T 78%
/dev/grid/node-x21-y10 94T 73T 21T 77%
/dev/grid/node-x21-y11 87T 64T 23T 73%
/dev/grid/node-x21-y12 89T 64T 25T 71%
/dev/grid/node-x21-y13 92T 69T 23T 75%
/dev/grid/node-x21-y14 87T 72T 15T 82%
/dev/grid/node-x21-y15 92T 67T 25T 72%
/dev/grid/node-x21-y16 86T 72T 14T 83%
/dev/grid/node-x21-y17 94T 67T 27T 71%
/dev/grid/node-x21-y18 85T 71T 14T 83%
/dev/grid/node-x21-y19 88T 70T 18T 79%
/dev/grid/node-x21-y20 94T 72T 22T 76%
/dev/grid/node-x21-y21 86T 68T 18T 79%
/dev/grid/node-x21-y22 94T 65T 29T 69%
/dev/grid/node-x21-y23 86T 72T 14T 83%
/dev/grid/node-x21-y24 92T 65T 27T 70%
/dev/grid/node-x22-y0 85T 71T 14T 83%
/dev/grid/node-x22-y1 89T 71T 18T 79%
/dev/grid/node-x22-y2 91T 72T 19T 79%
/dev/grid/node-x22-y3 90T 70T 20T 77%
/dev/grid/node-x22-y4 86T 67T 19T 77%
/dev/grid/node-x22-y5 90T 66T 24T 73%
/dev/grid/node-x22-y6 93T 67T 26T 72%
/dev/grid/node-x22-y7 501T 490T 11T 97%
/dev/grid/node-x22-y8 89T 67T 22T 75%
/dev/grid/node-x22-y9 89T 71T 18T 79%
/dev/grid/node-x22-y10 90T 70T 20T 77%
/dev/grid/node-x22-y11 89T 67T 22T 75%
/dev/grid/node-x22-y12 85T 64T 21T 75%
/dev/grid/node-x22-y13 87T 68T 19T 78%
/dev/grid/node-x22-y14 88T 67T 21T 76%
/dev/grid/node-x22-y15 89T 68T 21T 76%
/dev/grid/node-x22-y16 88T 73T 15T 82%
/dev/grid/node-x22-y17 86T 69T 17T 80%
/dev/grid/node-x22-y18 88T 73T 15T 82%
/dev/grid/node-x22-y19 85T 68T 17T 80%
/dev/grid/node-x22-y20 85T 68T 17T 80%
/dev/grid/node-x22-y21 88T 68T 20T 77%
/dev/grid/node-x22-y22 85T 71T 14T 83%
/dev/grid/node-x22-y23 94T 65T 29T 69%
/dev/grid/node-x22-y24 90T 65T 25T 72%
/dev/grid/node-x23-y0 91T 64T 27T 70%
/dev/grid/node-x23-y1 92T 72T 20T 78%
/dev/grid/node-x23-y2 94T 69T 25T 73%
/dev/grid/node-x23-y3 90T 66T 24T 73%
/dev/grid/node-x23-y4 92T 71T 21T 77%
/dev/grid/node-x23-y5 90T 70T 20T 77%
/dev/grid/node-x23-y6 91T 66T 25T 72%
/dev/grid/node-x23-y7 506T 497T 9T 98%
/dev/grid/node-x23-y8 92T 70T 22T 76%
/dev/grid/node-x23-y9 90T 71T 19T 78%
/dev/grid/node-x23-y10 94T 70T 24T 74%
/dev/grid/node-x23-y11 86T 65T 21T 75%
/dev/grid/node-x23-y12 87T 65T 22T 74%
/dev/grid/node-x23-y13 93T 67T 26T 72%
/dev/grid/node-x23-y14 87T 66T 21T 75%
/dev/grid/node-x23-y15 87T 72T 15T 82%
/dev/grid/node-x23-y16 89T 65T 24T 73%
/dev/grid/node-x23-y17 87T 65T 22T 74%
/dev/grid/node-x23-y18 86T 70T 16T 81%
/dev/grid/node-x23-y19 89T 66T 23T 74%
/dev/grid/node-x23-y20 88T 68T 20T 77%
/dev/grid/node-x23-y21 94T 64T 30T 68%
/dev/grid/node-x23-y22 85T 66T 19T 77%
/dev/grid/node-x23-y23 85T 70T 15T 82%
/dev/grid/node-x23-y24 87T 69T 18T 79%
/dev/grid/node-x24-y0 87T 70T 17T 80%
/dev/grid/node-x24-y1 92T 64T 28T 69%
/dev/grid/node-x24-y2 86T 68T 18T 79%
/dev/grid/node-x24-y3 87T 70T 17T 80%
/dev/grid/node-x24-y4 90T 73T 17T 81%
/dev/grid/node-x24-y5 88T 69T 19T 78%
/dev/grid/node-x24-y6 93T 71T 22T 76%
/dev/grid/node-x24-y7 504T 497T 7T 98%
/dev/grid/node-x24-y8 87T 67T 20T 77%
/dev/grid/node-x24-y9 86T 68T 18T 79%
/dev/grid/node-x24-y10 91T 73T 18T 80%
/dev/grid/node-x24-y11 94T 65T 29T 69%
/dev/grid/node-x24-y12 93T 65T 28T 69%
/dev/grid/node-x24-y13 87T 70T 17T 80%
/dev/grid/node-x24-y14 90T 68T 22T 75%
/dev/grid/node-x24-y15 89T 72T 17T 80%
/dev/grid/node-x24-y16 93T 64T 29T 68%
/dev/grid/node-x24-y17 93T 70T 23T 75%
/dev/grid/node-x24-y18 91T 71T 20T 78%
/dev/grid/node-x24-y19 86T 71T 15T 82%
/dev/grid/node-x24-y20 87T 64T 23T 73%
/dev/grid/node-x24-y21 88T 66T 22T 75%
/dev/grid/node-x24-y22 92T 69T 23T 75%
/dev/grid/node-x24-y23 94T 73T 21T 77%
/dev/grid/node-x24-y24 92T 70T 22T 76%
/dev/grid/node-x25-y0 93T 64T 29T 68%
/dev/grid/node-x25-y1 91T 66T 25T 72%
/dev/grid/node-x25-y2 93T 64T 29T 68%
/dev/grid/node-x25-y3 93T 66T 27T 70%
/dev/grid/node-x25-y4 92T 71T 21T 77%
/dev/grid/node-x25-y5 90T 66T 24T 73%
/dev/grid/node-x25-y6 94T 73T 21T 77%
/dev/grid/node-x25-y7 504T 499T 5T 99%
/dev/grid/node-x25-y8 87T 72T 15T 82%
/dev/grid/node-x25-y9 86T 69T 17T 80%
/dev/grid/node-x25-y10 88T 73T 15T 82%
/dev/grid/node-x25-y11 86T 65T 21T 75%
/dev/grid/node-x25-y12 88T 72T 16T 81%
/dev/grid/node-x25-y13 93T 68T 25T 73%
/dev/grid/node-x25-y14 87T 72T 15T 82%
/dev/grid/node-x25-y15 86T 67T 19T 77%
/dev/grid/node-x25-y16 88T 67T 21T 76%
/dev/grid/node-x25-y17 94T 68T 26T 72%
/dev/grid/node-x25-y18 85T 73T 12T 85%
/dev/grid/node-x25-y19 87T 66T 21T 75%
/dev/grid/node-x25-y20 93T 65T 28T 69%
/dev/grid/node-x25-y21 86T 73T 13T 84%
/dev/grid/node-x25-y22 85T 68T 17T 80%
/dev/grid/node-x25-y23 93T 69T 24T 74%
/dev/grid/node-x25-y24 94T 64T 30T 68%
/dev/grid/node-x26-y0 88T 68T 20T 77%
/dev/grid/node-x26-y1 90T 65T 25T 72%
/dev/grid/node-x26-y2 93T 65T 28T 69%
/dev/grid/node-x26-y3 87T 72T 15T 82%
/dev/grid/node-x26-y4 94T 73T 21T 77%
/dev/grid/node-x26-y5 86T 68T 18T 79%
/dev/grid/node-x26-y6 91T 65T 26T 71%
/dev/grid/node-x26-y7 510T 496T 14T 97%
/dev/grid/node-x26-y8 91T 64T 27T 70%
/dev/grid/node-x26-y9 90T 68T 22T 75%
/dev/grid/node-x26-y10 91T 73T 18T 80%
/dev/grid/node-x26-y11 86T 64T 22T 74%
/dev/grid/node-x26-y12 90T 67T 23T 74%
/dev/grid/node-x26-y13 85T 64T 21T 75%
/dev/grid/node-x26-y14 89T 72T 17T 80%
/dev/grid/node-x26-y15 91T 66T 25T 72%
/dev/grid/node-x26-y16 86T 68T 18T 79%
/dev/grid/node-x26-y17 85T 73T 12T 85%
/dev/grid/node-x26-y18 94T 69T 25T 73%
/dev/grid/node-x26-y19 85T 71T 14T 83%
/dev/grid/node-x26-y20 86T 67T 19T 77%
/dev/grid/node-x26-y21 94T 64T 30T 68%
/dev/grid/node-x26-y22 89T 64T 25T 71%
/dev/grid/node-x26-y23 90T 68T 22T 75%
/dev/grid/node-x26-y24 89T 64T 25T 71%
/dev/grid/node-x27-y0 85T 72T 13T 84%
/dev/grid/node-x27-y1 94T 65T 29T 69%
/dev/grid/node-x27-y2 86T 68T 18T 79%
/dev/grid/node-x27-y3 87T 64T 23T 73%
/dev/grid/node-x27-y4 93T 67T 26T 72%
/dev/grid/node-x27-y5 85T 67T 18T 78%
/dev/grid/node-x27-y6 86T 69T 17T 80%
/dev/grid/node-x27-y7 505T 490T 15T 97%
/dev/grid/node-x27-y8 85T 71T 14T 83%
/dev/grid/node-x27-y9 85T 65T 20T 76%
/dev/grid/node-x27-y10 89T 68T 21T 76%
/dev/grid/node-x27-y11 85T 72T 13T 84%
/dev/grid/node-x27-y12 89T 72T 17T 80%
/dev/grid/node-x27-y13 85T 71T 14T 83%
/dev/grid/node-x27-y14 94T 70T 24T 74%
/dev/grid/node-x27-y15 87T 67T 20T 77%
/dev/grid/node-x27-y16 92T 68T 24T 73%
/dev/grid/node-x27-y17 89T 72T 17T 80%
/dev/grid/node-x27-y18 91T 64T 27T 70%
/dev/grid/node-x27-y19 86T 66T 20T 76%
/dev/grid/node-x27-y20 86T 72T 14T 83%
/dev/grid/node-x27-y21 91T 64T 27T 70%
/dev/grid/node-x27-y22 92T 64T 28T 69%
/dev/grid/node-x27-y23 91T 70T 21T 76%
/dev/grid/node-x27-y24 91T 71T 20T 78%
/dev/grid/node-x28-y0 92T 68T 24T 73%
/dev/grid/node-x28-y1 86T 73T 13T 84%
/dev/grid/node-x28-y2 89T 70T 19T 78%
/dev/grid/node-x28-y3 85T 69T 16T 81%
/dev/grid/node-x28-y4 86T 69T 17T 80%
/dev/grid/node-x28-y5 89T 64T 25T 71%
/dev/grid/node-x28-y6 92T 71T 21T 77%
/dev/grid/node-x28-y7 501T 493T 8T 98%
/dev/grid/node-x28-y8 93T 68T 25T 73%
/dev/grid/node-x28-y9 88T 70T 18T 79%
/dev/grid/node-x28-y10 94T 65T 29T 69%
/dev/grid/node-x28-y11 93T 70T 23T 75%
/dev/grid/node-x28-y12 86T 68T 18T 79%
/dev/grid/node-x28-y13 85T 67T 18T 78%
/dev/grid/node-x28-y14 90T 64T 26T 71%
/dev/grid/node-x28-y15 87T 64T 23T 73%
/dev/grid/node-x28-y16 91T 66T 25T 72%
/dev/grid/node-x28-y17 91T 71T 20T 78%
/dev/grid/node-x28-y18 85T 70T 15T 82%
/dev/grid/node-x28-y19 92T 66T 26T 71%
/dev/grid/node-x28-y20 89T 71T 18T 79%
/dev/grid/node-x28-y21 86T 68T 18T 79%
/dev/grid/node-x28-y22 86T 72T 14T 83%
/dev/grid/node-x28-y23 92T 65T 27T 70%
/dev/grid/node-x28-y24 90T 70T 20T 77%
/dev/grid/node-x29-y0 91T 65T 26T 71%
/dev/grid/node-x29-y1 85T 66T 19T 77%
/dev/grid/node-x29-y2 88T 73T 15T 82%
/dev/grid/node-x29-y3 85T 66T 19T 77%
/dev/grid/node-x29-y4 91T 67T 24T 73%
/dev/grid/node-x29-y5 86T 72T 14T 83%
/dev/grid/node-x29-y6 92T 66T 26T 71%
/dev/grid/node-x29-y7 507T 493T 14T 97%
/dev/grid/node-x29-y8 85T 68T 17T 80%
/dev/grid/node-x29-y9 85T 70T 15T 82%
/dev/grid/node-x29-y10 86T 67T 19T 77%
/dev/grid/node-x29-y11 89T 73T 16T 82%
/dev/grid/node-x29-y12 89T 70T 19T 78%
/dev/grid/node-x29-y13 89T 73T 16T 82%
/dev/grid/node-x29-y14 89T 67T 22T 75%
/dev/grid/node-x29-y15 93T 71T 22T 76%
/dev/grid/node-x29-y16 94T 72T 22T 76%
/dev/grid/node-x29-y17 94T 71T 23T 75%
/dev/grid/node-x29-y18 86T 64T 22T 74%
/dev/grid/node-x29-y19 90T 70T 20T 77%
/dev/grid/node-x29-y20 89T 69T 20T 77%
/dev/grid/node-x29-y21 88T 73T 15T 82%
/dev/grid/node-x29-y22 88T 66T 22T 75%
/dev/grid/node-x29-y23 85T 66T 19T 77%
/dev/grid/node-x29-y24 85T 69T 16T 81%
/dev/grid/node-x30-y0 88T 64T 24T 72%
/dev/grid/node-x30-y1 91T 73T 18T 80%
/dev/grid/node-x30-y2 94T 71T 23T 75%
/dev/grid/node-x30-y3 91T 68T 23T 74%
/dev/grid/node-x30-y4 85T 72T 13T 84%
/dev/grid/node-x30-y5 91T 72T 19T 79%
/dev/grid/node-x30-y6 87T 70T 17T 80%
/dev/grid/node-x30-y7 510T 492T 18T 96%
/dev/grid/node-x30-y8 94T 64T 30T 68%
/dev/grid/node-x30-y9 86T 65T 21T 75%
/dev/grid/node-x30-y10 86T 64T 22T 74%
/dev/grid/node-x30-y11 87T 67T 20T 77%
/dev/grid/node-x30-y12 88T 69T 19T 78%
/dev/grid/node-x30-y13 92T 72T 20T 78%
/dev/grid/node-x30-y14 93T 65T 28T 69%
/dev/grid/node-x30-y15 92T 65T 27T 70%
/dev/grid/node-x30-y16 89T 72T 17T 80%
/dev/grid/node-x30-y17 91T 73T 18T 80%
/dev/grid/node-x30-y18 91T 72T 19T 79%
/dev/grid/node-x30-y19 92T 68T 24T 73%
/dev/grid/node-x30-y20 85T 72T 13T 84%
/dev/grid/node-x30-y21 89T 69T 20T 77%
/dev/grid/node-x30-y22 89T 64T 25T 71%
/dev/grid/node-x30-y23 93T 64T 29T 68%
/dev/grid/node-x30-y24 90T 64T 26T 71%
/dev/grid/node-x31-y0 93T 70T 23T 75%
/dev/grid/node-x31-y1 91T 64T 27T 70%
/dev/grid/node-x31-y2 92T 67T 25T 72%
/dev/grid/node-x31-y3 87T 72T 15T 82%
/dev/grid/node-x31-y4 85T 65T 20T 76%
/dev/grid/node-x31-y5 86T 68T 18T 79%
/dev/grid/node-x31-y6 87T 67T 20T 77%
/dev/grid/node-x31-y7 509T 499T 10T 98%
/dev/grid/node-x31-y8 91T 71T 20T 78%
/dev/grid/node-x31-y9 88T 72T 16T 81%
/dev/grid/node-x31-y10 86T 64T 22T 74%
/dev/grid/node-x31-y11 87T 68T 19T 78%
/dev/grid/node-x31-y12 87T 71T 16T 81%
/dev/grid/node-x31-y13 93T 65T 28T 69%
/dev/grid/node-x31-y14 94T 68T 26T 72%
/dev/grid/node-x31-y15 94T 72T 22T 76%
/dev/grid/node-x31-y16 93T 69T 24T 74%
/dev/grid/node-x31-y17 87T 66T 21T 75%
/dev/grid/node-x31-y18 94T 71T 23T 75%
/dev/grid/node-x31-y19 86T 71T 15T 82%
/dev/grid/node-x31-y20 86T 67T 19T 77%
/dev/grid/node-x31-y21 89T 65T 24T 73%
/dev/grid/node-x31-y22 86T 64T 22T 74%
/dev/grid/node-x31-y23 94T 71T 23T 75%
/dev/grid/node-x31-y24 89T 73T 16T 82%
/dev/grid/node-x32-y0 93T 69T 24T 74%
/dev/grid/node-x32-y1 86T 68T 18T 79%
/dev/grid/node-x32-y2 90T 68T 22T 75%
/dev/grid/node-x32-y3 90T 64T 26T 71%
/dev/grid/node-x32-y4 88T 66T 22T 75%
/dev/grid/node-x32-y5 90T 67T 23T 74%
/dev/grid/node-x32-y6 94T 73T 21T 77%
/dev/grid/node-x32-y7 509T 493T 16T 96%
/dev/grid/node-x32-y8 91T 73T 18T 80%
/dev/grid/node-x32-y9 89T 71T 18T 79%
/dev/grid/node-x32-y10 92T 73T 19T 79%
/dev/grid/node-x32-y11 92T 65T 27T 70%
/dev/grid/node-x32-y12 94T 68T 26T 72%
/dev/grid/node-x32-y13 85T 69T 16T 81%
/dev/grid/node-x32-y14 93T 69T 24T 74%
/dev/grid/node-x32-y15 90T 72T 18T 80%
/dev/grid/node-x32-y16 87T 71T 16T 81%
/dev/grid/node-x32-y17 92T 66T 26T 71%
/dev/grid/node-x32-y18 85T 64T 21T 75%
/dev/grid/node-x32-y19 88T 72T 16T 81%
/dev/grid/node-x32-y20 86T 69T 17T 80%
/dev/grid/node-x32-y21 94T 69T 25T 73%
/dev/grid/node-x32-y22 87T 70T 17T 80%
/dev/grid/node-x32-y23 94T 72T 22T 76%
/dev/grid/node-x32-y24 87T 72T 15T 82%
/dev/grid/node-x33-y0 94T 64T 30T 68%
/dev/grid/node-x33-y1 94T 64T 30T 68%
/dev/grid/node-x33-y2 86T 66T 20T 76%
/dev/grid/node-x33-y3 90T 69T 21T 76%
/dev/grid/node-x33-y4 92T 71T 21T 77%
/dev/grid/node-x33-y5 85T 71T 14T 83%
/dev/grid/node-x33-y6 87T 72T 15T 82%
/dev/grid/node-x33-y7 510T 491T 19T 96%
/dev/grid/node-x33-y8 94T 70T 24T 74%
/dev/grid/node-x33-y9 93T 65T 28T 69%
/dev/grid/node-x33-y10 89T 66T 23T 74%
/dev/grid/node-x33-y11 90T 73T 17T 81%
/dev/grid/node-x33-y12 85T 69T 16T 81%
/dev/grid/node-x33-y13 87T 70T 17T 80%
/dev/grid/node-x33-y14 91T 70T 21T 76%
/dev/grid/node-x33-y15 90T 69T 21T 76%
/dev/grid/node-x33-y16 87T 68T 19T 78%
/dev/grid/node-x33-y17 93T 72T 21T 77%
/dev/grid/node-x33-y18 86T 67T 19T 77%
/dev/grid/node-x33-y19 88T 72T 16T 81%
/dev/grid/node-x33-y20 91T 66T 25T 72%
/dev/grid/node-x33-y21 92T 65T 27T 70%
/dev/grid/node-x33-y22 87T 69T 18T 79%
/dev/grid/node-x33-y23 93T 67T 26T 72%
/dev/grid/node-x33-y24 86T 65T 21T 75%
/dev/grid/node-x34-y0 86T 64T 22T 74%
/dev/grid/node-x34-y1 86T 65T 21T 75%
/dev/grid/node-x34-y2 94T 68T 26T 72%
/dev/grid/node-x34-y3 87T 72T 15T 82%
/dev/grid/node-x34-y4 86T 66T 20T 76%
/dev/grid/node-x34-y5 88T 67T 21T 76%
/dev/grid/node-x34-y6 90T 72T 18T 80%
/dev/grid/node-x34-y7 502T 495T 7T 98%
/dev/grid/node-x34-y8 93T 65T 28T 69%
/dev/grid/node-x34-y9 91T 71T 20T 78%
/dev/grid/node-x34-y10 91T 64T 27T 70%
/dev/grid/node-x34-y11 89T 68T 21T 76%
/dev/grid/node-x34-y12 93T 70T 23T 75%
/dev/grid/node-x34-y13 91T 71T 20T 78%
/dev/grid/node-x34-y14 87T 69T 18T 79%
/dev/grid/node-x34-y15 93T 72T 21T 77%
/dev/grid/node-x34-y16 86T 72T 14T 83%
/dev/grid/node-x34-y17 88T 68T 20T 77%
/dev/grid/node-x34-y18 88T 72T 16T 81%
/dev/grid/node-x34-y19 91T 68T 23T 74%
/dev/grid/node-x34-y20 89T 64T 25T 71%
/dev/grid/node-x34-y21 91T 67T 24T 73%
/dev/grid/node-x34-y22 89T 65T 24T 73%
/dev/grid/node-x34-y23 85T 67T 18T 78%
/dev/grid/node-x34-y24 88T 70T 18T 79%
/dev/grid/node-x35-y0 91T 71T 20T 78%
/dev/grid/node-x35-y1 92T 73T 19T 79%
/dev/grid/node-x35-y2 94T 67T 27T 71%
/dev/grid/node-x35-y3 88T 69T 19T 78%
/dev/grid/node-x35-y4 91T 69T 22T 75%
/dev/grid/node-x35-y5 90T 73T 17T 81%
/dev/grid/node-x35-y6 88T 65T 23T 73%
/dev/grid/node-x35-y7 506T 497T 9T 98%
/dev/grid/node-x35-y8 88T 71T 17T 80%
/dev/grid/node-x35-y9 85T 65T 20T 76%
/dev/grid/node-x35-y10 94T 66T 28T 70%
/dev/grid/node-x35-y11 88T 66T 22T 75%
/dev/grid/node-x35-y12 91T 64T 27T 70%
/dev/grid/node-x35-y13 85T 64T 21T 75%
/dev/grid/node-x35-y14 87T 71T 16T 81%
/dev/grid/node-x35-y15 93T 66T 27T 70%
/dev/grid/node-x35-y16 89T 64T 25T 71%
/dev/grid/node-x35-y17 93T 64T 29T 68%
/dev/grid/node-x35-y18 90T 66T 24T 73%
/dev/grid/node-x35-y19 91T 73T 18T 80%
/dev/grid/node-x35-y20 93T 69T 24T 74%
/dev/grid/node-x35-y21 94T 70T 24T 74%
/dev/grid/node-x35-y22 90T 73T 17T 81%
/dev/grid/node-x35-y23 89T 70T 19T 78%
/dev/grid/node-x35-y24 92T 72T 20T 78%
/dev/grid/node-x36-y0 94T 64T 30T 68%
/dev/grid/node-x36-y1 87T 67T 20T 77%
/dev/grid/node-x36-y2 93T 65T 28T 69%
/dev/grid/node-x36-y3 90T 72T 18T 80%
/dev/grid/node-x36-y4 85T 73T 12T 85%
/dev/grid/node-x36-y5 91T 64T 27T 70%
/dev/grid/node-x36-y6 87T 73T 14T 83%
/dev/grid/node-x36-y7 504T 499T 5T 99%
/dev/grid/node-x36-y8 90T 73T 17T 81%
/dev/grid/node-x36-y9 92T 70T 22T 76%
/dev/grid/node-x36-y10 89T 72T 17T 80%
/dev/grid/node-x36-y11 93T 70T 23T 75%
/dev/grid/node-x36-y12 85T 67T 18T 78%
/dev/grid/node-x36-y13 89T 67T 22T 75%
/dev/grid/node-x36-y14 94T 68T 26T 72%
/dev/grid/node-x36-y15 91T 72T 19T 79%
/dev/grid/node-x36-y16 87T 66T 21T 75%
/dev/grid/node-x36-y17 85T 65T 20T 76%
/dev/grid/node-x36-y18 90T 66T 24T 73%
/dev/grid/node-x36-y19 89T 69T 20T 77%
/dev/grid/node-x36-y20 88T 64T 24T 72%
/dev/grid/node-x36-y21 90T 66T 24T 73%
/dev/grid/node-x36-y22 93T 70T 23T 75%
/dev/grid/node-x36-y23 85T 71T 14T 83%
/dev/grid/node-x36-y24 89T 64T 25T 71%

@ -1,26 +0,0 @@
cpy a b
dec b
cpy a d
cpy 0 a
cpy b c
inc a
dec c
jnz c -2
dec d
jnz d -5
dec b
cpy b c
cpy c d
dec d
inc c
jnz d -2
tgl c
cpy -16 c
jnz 1 c
cpy 94 c
jnz 82 d
inc a
inc d
jnz d -2
inc c
jnz c -5

@ -1,39 +0,0 @@
#########################################################################################################################################################################################
#...#...............#.#...#.#.......#.....#.....#.....#...............#.....#.#.....#.....#.......#.........#.#.....#.....#.#.#...#...........#.................#.#...#.....#.....#...#.#
#.###.#.###.###.###.#.###.#.###.#####.###.#.#.#.#.#.#.#.#.###.#.#####.#.#.#.#.#.#.###.###.#.#.#.#.###.###.#.#.#.#.###.###.#.#.#.#.#####.#####.#.#.###########.###.#.#.#.###.#.###.#.#.#.#
#.#...#.....#.....#.#.#...#.#.....#.#.#...#.....#.#.#.....#.............#...#.....#...#.#.........#.#.....#.......#...#.#.#.#.#.........#.....#.#.#...#...#...#...#...#.....#.....#...#.#
#.#.###.#.#.#.#.###.#.#.###.#.#####.#.#.#.#.#####.#.#.#.###.#.#.#.#.###.#.#.###.#.#.#.#.###.###.#.#.###.#.#.#.###.###.#.#.#.#.###########.#.###.#.###.#.#.#.#.#.#.#.#.###.#.#.#.###.#.#.#
#...........#.#.#...#.#.....#.....#...........#...........#.....#.............#.......#.#...............#.....#.......#.....#...............#1....#.......#.#.....#.......#...#.....#...#
#.###.#.#.#.#.#.#.#.#########.#.#.#.#.#.###.#.#.#####.#.#.#.###.#.###.#########.#######.#.#.#.#.#############.#####.#.###.#.#.#.#.#####.#.#######.#####.#.#.#.#.#.#####.#.#.#.#.###.#.###
#...#.....#.....#.#.#.#.................#.#.#...#.......#...#...#.#...........#.#...#.......#.#.#...#...#.......#...#.#.#.#.#.....#.....#.....#.......#...#...#...#.......#...#.....#...#
#.#.#####.#.#####.#.#.#.#.###.###.#.#.###.#.#.#.#.#######.#.#.#.#.###.#.###.#####.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#######.#.#####.#.#.#.#######.#.#.#.#.#.#######.#.###.#.#.#.###.###.#.#.#
#...#.....#.......#.#...#.#...#...........#...#...#.#.....#...#.......#.......#.#.#.#...#.#.....#.#...#...#.....#.........#...#.........#.#.....#.....#...#.#.#...#...#.....#.#3#.#.....#
#.#.###.#.#.###.#######.#.#.#.#.###.###.#####.#.#.#.#.#.#.#.#.#.#####.#.###.###.###.#.#.#.#.#.#.#.###.#.#######.###.#.###.#.#.#.###.#.#.#.#.#.#.#.#.###.###.#.#.###.#.#.###.#.#.#.###.#.#
#.......#.#...#.#.#.....#...#...#0..#.#.....#.#.....#.#.#...#...#.....#.....#.#.....#...#.#...#.#...#.#.#...#...#...#...#.#.#.............#.#...#.......#...#...#...#.#.#.....#...#.#...#
#####.#####.#.###.#.#.#.#.#.#.#.###.#.#.#.#.#.#.###.#.###.#.#.#.#.#.#.###.###.###.#.#####.#####.#.#.#.#.#.#.#.#.#.#.#.###.#.###.###########.#.#.#########.#.#.#.#.###.#.###.#.###.#.#.#.#
#...#...#.......#.#.#...#.......#...#...#.#...#.#...#.....#.....#.....#.#.#.........#.#.......#...#.#...#.#.........#...#.........#...#...#.#.....#.....#...#.#.......#.#.....#.........#
#.#.###.#.#####.###.###.#.#.###.###.#.###.#.#.#.#.#.#.#####.#.###.#.#.#.###.###.#####.#.#.#.#.#.###.###.#.#########.#.###.#.#.#.#.#.#.#.#.#.#####.###.#.#.#.#.#.#.#.#.#####.#.###.#.###.#
#.....#.#.#...#.#...#.#.....#.#...........#.....#...#.#...#.#.....#.#.#.....#.......#...#.#.#.......#.......#.........#.........#.#.#.#...#...#.#...#...#.......#.....#.....#.......#...#
###.#.#.#####.#.#.#.#.#.#.#.#.#.#.#.#.#.#######.###.#.#####.#####.###.#.#.#.###.#.#.###.#.#.#.#.#####.#.###.#.#.#.#########.#.###.#.#.#.#.#####.###.#.#.#.###.#####.#.#.#.#.#.#.#.#.#.###
#.#...#.#.......#.#.#...#.......#.#.....#.#.........#...#.....#.................#.........#...#...#.#...#.....#...#...#.#...#...#...#.....#...#.......#.......#.....#...#...#...#...#.#.#
#.#.#####.#.#####.###.#.###.#.###.#.#.#.#.#######.#.###.###.#.#.#########.#.###.#########.###.###.#.###.#.#####.#.###.#.#.#.#.#.#.#.#.###.#.#.#.#########.#####.#.#.###.#.#.#.#.#####.#.#
#.............#2#.#.....#.#.#...#...#.#...........#.........#...#.#.......#.#.........#.#.#.....#.#.......#...#.....#...#.#.#.......#...#.#.......#.......#...#.........#...#...#.....#.#
#.#.###.#.#.#.#.#.#.#.###.#.###.#.#####.###.###.#.#.#.#.#.#.#####.#.#.#.#.###.#.#####.#.#.#.#.#####.#.#####.###.###.#.#.#.#.#.#.#.#.#.#.#.#.###.#.###.#####.#######.#.#.#####.###.###.#.#
#...#...#...#...#.#.#.#...#.#.........#.#.#...............#.#...#...#.....#...#.#...#...#...........#.#.....#.....#...#.#.#...#...#.#.....#.....#...........#...#.....#.....#.#6#.....#.#
#####.#.#####.###.#.#.#.#.#.###.###.#.###.#.#########.#.###.#.#.#.###.###.#####.#####.###.###.#.#.#.###.#.#.#.#.###.#.###.#.#.#.#.###.#.#.#.###.#.#.#.#.#.###.#.#####.#.###.#.#.#.###.#.#
#...#...#.....#.....#...#...#...#.....#.....................#...#.....#.........#.....#.#.#...#.#.........#.....................#...#...#.....#...#...#.....#...#...#.....#.#.......#...#
#.###.#.#.#.#.###.#.###.#.#####.#.###.#.#####.#.#######.#.#.#.###.#.#.#.#.#.#.#.#.#.#.#.#.#.#.###.#####.###.#####.#######.###.#.#.#######.###.#.###.###.#.#.###.#.#.#.#####.#.#.#######.#
#.#...#.........#...#.....#.......#.....#.#.....#.#...#.#...#.#...#.........#.....#.......#.......#.......#.......#...#...#.......#.....#.#...........#.........#.#.#...#.#.#.....#...#.#
#.#.#.#.#.#.#.#.#.#.#########.#####.#.###.#.#####.#.###.#.#.#.#.#########.#.#.#.#.###.###.#####.###.###.#.#.#.#####.#.#.#########.###.#.###.###.###.#.#######.#.###.###.#.###.###.#.###.#
#.....#.....#...#.#.........#...#.....#...#.............#.....#.#.........#...#.......#.................#...#.........#...#...........#.........#.....#.......#.....#.....#.#.#.#...#.#.#
#.###.#.###.#.#.#.#.#.#.#.###.###.#.#######.#.###.#####.#.###.#.#.#.#.#.#.#.#.#######.###.###.#######.#.###.###.#####.#.#.#.#.#.#.#.###.#.###.###.###.#.###.#.###.###.#####.#.#.###.#.###
#.....#...#.#.....#.#...#.....#.....#.#...#...#...........#.#.#...........#.#.#.....#.....#...#...#...#...#.....#.......#.......#.#.........#.....#.....#.#...#.......#.........#.......#
#.#.#.###.#.#.#.###.###.#.###.#####.#.#.#.#.#.#######.###.#.#.#.#####.###.#.#.###.###.#.#.#.#.#.###.#####.###.###.#######.###.#.#.#.#.#.#.#####.#########.#.#.#.#.#.###.#######.###.#.#.#
#.......#.#.#.....#.....#.#...#.....#...#.#.....#...#.#...#.....#.......#...#.#.#...#.....#.......#.......#...#.#.......#...#...#.#.#...#.......#.....#.#...#.#.#...#...#.......#.......#
#.###.###.#.#.###.#.#.#.#.#.#.#.#.#.###.###.#.#.###.#.###.###.#.#.#.#.#.#####.#.#.#.#.#.#########.#.###.#.#.#.#.#.#.#.#.#.#####.###.###.#.#.#.#.#.#.#.#.#.#.###.#.###.#.#####.#######.#.#
#.....#.#5......#.......#...#.#.#...#.#.#.#.....#.....#.#.....#.......#.#...#...#.....#.....#...........#...#.......#.#...#.........#.........#.........#...........#.#.#.....#7....#.#.#
#.#.#.#.###.#####.#####.#.###.#.#.#.#.###.#.#.#.#####.#.#.#.#.#.###.#.###.###.###.#.#.###.#.#.#.#.#######.#.#.#####.#.#.###.#.#####.#.#.#.#.#.#.#.#####.#.#.#.#.#####.#.#.#.#.#####.#.#.#
#...........#.#...#.........#...#.#.#.#.......#.#.....#...#...#.#.....#...#...#.......#.................................#...#...#.#.....#.....#...#...#.#...#...#.#.......#.........#.#.#
###.###.#.###.#.###.#.#.#.#.#.#.#.#.#.#.###.#.#.#.#.#.#.###.###.###.###.#.###.#.###.#####.#.#.###.###.#.#####.#.#.#.#####.#.###.#.#.#.#.###.#.###.###.#.#######.#.#.#.#.###.###.#.#.#.#.#
#.......#.#.........#...#.#.#.................#.......#...#.....#...............#...#.#...#...#.......#.#.#.......#.......#...............#4#.......#.....#...#...#.#...#.......#.....#.#
#########################################################################################################################################################################################

@ -1,30 +0,0 @@
cpy a d
cpy 7 c
cpy 365 b
inc d
dec b
jnz b -2
dec c
jnz c -5
cpy d a
jnz 0 0
cpy a b
cpy 0 a
cpy 2 c
jnz b 2
jnz 1 6
dec b
dec c
jnz c -4
inc a
jnz 1 -7
cpy 2 b
jnz c 2
jnz 1 4
dec b
dec c
jnz 1 -4
jnz 0 0
out b
jnz a -19
jnz 1 -21

@ -1,3 +0,0 @@
source 'https://rubygems.org'
gem 'minitest'

@ -1,13 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
minitest (5.10.0)
PLATFORMS
ruby
DEPENDENCIES
minitest
BUNDLED WITH
1.13.6

@ -1,72 +0,0 @@
include Math
Instruction = Struct.new(:direction, :blocks) do
def initialize(direction, blocks)
super(direction, blocks.to_i)
end
end
Turtle = Struct.new(:orientation, :location) do
def self.run(input)
instructions = parse(input)
turtles = [Turtle.new(-PI/2, [0,0])]
instructions.each.with_object(turtles) do |instruction, turtles|
turtles << turtles.last.turn(instruction.direction).step
(instruction.blocks - 1).times do
turtles << turtles.last.step
end
end
turtles
end
def self.parse(input)
input.split(', ').map {|step|
Instruction.new(*step.scan(/(?<turn>\w)(?<blocks>\d+)/)[0])
}
end
def turn(direction)
angle = case direction
when ?R
PI/2
when ?L
-PI/2
else
raise "unexpected direction: #{direction}"
end
Turtle.new(orientation + angle, location)
end
def step
x = location[0] + cos(orientation).to_i
y = location[1] + sin(orientation).to_i
Turtle.new(orientation, [x, y])
end
end
require 'minitest'
# require 'minitest/autorun'
class TestInstructions < Minitest::Test
def test_instructions
assert_distance 5, 'R2, L3'
assert_distance 2, 'R2, R2, R2'
assert_distance 12, 'R5, L5, R5, R3'
end
def assert_distance(expected, instructions)
assert_equal expected, Turtle.run(instructions).last.location.map(&:abs).inject(:+)
end
end
if __FILE__ == $0
turtles = Turtle.run(DATA.read)
p turtles.last
locations = turtles.map(&:location)
p locations.find {|location| locations.count(location) > 1 }
end
__END__
R4, R3, L3, L2, L1, R1, L1, R2, R3, L5, L5, R4, L4, R2, R4, L3, R3, L3, R3, R4, R2, L1, R2, L3, L2, L1, R3, R5, L1, L4, R2, L4, R3, R1, R2, L5, R2, L189, R5, L5, R52, R3, L1, R4, R5, R1, R4, L1, L3, R2, L2, L3, R4, R3, L2, L5, R4, R5, L2, R2, L1, L3, R3, L4, R4, R5, L1, L1, R3, L5, L2, R76, R2, R2, L1, L3, R189, L3, L4, L1, L3, R5, R4, L1, R1, L1, L1, R2, L4, R2, L5, L5, L5, R2, L4, L5, R4, R4, R5, L5, R3, L1, L3, L1, L1, L3, L4, R5, L3, R5, R3, R3, L5, L5, R3, R4, L3, R3, R1, R3, R2, R2, L1, R1, L3, L3, L3, L1, R2, L1, R4, R4, L1, L1, R3, R3, R4, R1, L5, L2, R2, R3, R2, L3, R4, L5, R1, R4, R5, R4, L4, R1, L3, R1, R3, L2, L3, R1, L2, R3, L3, L1, L3, R4, L4, L5, R3, R5, R4, R1, L2, R3, R5, L5, L4, L1, L1

@ -1,87 +0,0 @@
class Keypad
MAP = [%w[ . . 1 . . ],
%w[ . 2 3 4 . ],
%w[ 5 6 7 8 9 ],
%w[ . A B C . ],
%w[ . . D . . ]]
attr_reader :x, :y
def initialize
@x, @y = 0, 2
end
def button
MAP[y][x]
end
def <<(dir)
delta = case dir
when ?U
[0, 1]
when ?D
[0, -1]
when ?L
[-1, 0]
when ?R
[1, 0]
else
raise "unexpected direction: '#{dir}'"
end
next_x = x + delta[0]
next_y = y - delta[1]
next_x = [[4, next_x].min, 0].max
next_y = [[4, next_y].min, 0].max
@x, @y = next_x, next_y if MAP[next_y][next_x] != ?.
end
end
if __FILE__ == $0
keypad = Keypad.new
code = DATA.read.lines.map {|line|
line.strip.chars.each do |char|
keypad << char
end
keypad.button
}
puts code.join
end
require 'minitest'
# require 'minitest/autorun'
class TestDay2 < Minitest::Test
def test_day2
keypad = Keypad.new
assert_equal ?5, keypad.button
'ULL'.chars.each do |char|
keypad << char
end
assert_equal ?5, keypad.button
'RRDDD'.chars.each do |char|
keypad << char
end
assert_equal ?D, keypad.button
'LURDL'.chars.each do |char|
keypad << char
end
assert_equal ?B, keypad.button
'UUUUD'.chars.each do |char|
keypad << char
end
assert_equal ?3, keypad.button
end
end
__END__
RDRRDLRRUDRUUUULDDRDUULLDUULDURDDUDRULDLUDDRLRDUDDURRRRURDURLLRDRUUULDLLLURDRLLULLUULULLLDLLLRRURRLRDUULRURRUDRRDRLURLRURLLULRUURRUURDDLDRDLDLLUDUULLLUUUUDULLDRRUURLDURDDDDDRLLRRURDLUDRRUUDLRRLLRDURDUDDDLRDDRDLRULLUULRULRLLULDDRURUUDLDDULDRLLURDDUDDUDRDUDLDRRRDURRLDRDRLDLLDUDDDULULRRULRLLURDRRDDUUUUUULRUDLRRDURDLRDLUDLDURUDDUUURUDLUUULDLRDURDLDUUDLDDDURUUDUUDRLRDULLDUULUDRUDRLRRRDLLDRUDULRRUDDURLDRURRLLRRRDRLLDLULULRRUURRURLLUDRRLRULURLDDDDDURUDRRRRULLUUDLDDLUUL
ULURUDLULDULDLLDDLLLDRRLLUDRRDRDUDURUDLRRRRUDRDDURLRRULLDLURLDULLUDDLUDURDUURRRRLDLRLDDULLRURLULLDDRUDLRRRLDRRRDLDRLLDDRRDDLUUDRUDDLULRURLDURRLLDLRUDLLRRUULUDRLLLRLDULURRRRRDDUURDRRUUDULRUULDDULRLUDLUDDULLRLRDDLRLLURRRULDLRRRUURRLDDRDLRDLRRDRDLDRDUDRDURUUDRLRRULRDLLDLLRRRDRLDRLRLRLLLURURDULUUDDRLLDDDRURRURLRDDULLRURUDRRDRLRRRLDLRLRULDRLUURRUUULRLDLLURLLLDLLLDRRDULRURRRRLUDLLRRUDLRUDRURDRRDLUUURRDLRLRUUUDURDLUDURRUUDURLUDDDULLDRDLLDDDRLDDDRLDLDDDDUDUUDURUUDULRDDLULDRDRLURLUDRDLUULLULRLULRDDRULDUDDURUURULUDLUURLURU
URLURDDRLLURRRLDLDLUDUURDRUDLLLRRDLUUULRRLURRRLUDUDLRLDDRUDLRRRULUDUDLLLULULLLRUDULDDDLLLRRRLRURDULUDDDULDLULURRRDLURDLRLLDUDRUDURDRRURULDRDUDLLRDDDUDDURLUULLULRDRRLDDLDURLRRRLDRDLDULRULRRRLRLLDULRDLURLRUUDURRUUDLLUDRUDLRLDUUDLURRRDDUUDUDRLDLDDRURDDLLDDRDLRLRDLLLUDLUUDRLRLRDDRDLRDLLUULLLLUULLDLLDLRDLRLRRLUUDLLRLRUDRURULRLRLULUDRLLUDDUDDULRLDDRUUUURULDRRULLLDUURULUDRLLURLRRLDLRRLDDRRRDUDDUDLDDLULUDDUURDLLLRLDLRDRUUUUUDDDLDRDDRRRLRURRRRDURDRURUDLURRURDRLRUUDDLDRRULLDURDRLRRDURURUULRDUDLDRDDLULULRDRRUDDRLLRLULRLLUUDRDUUDDUDLRUUDLLUULLRUULUDDLURRRLLDRLRRLLRULLDUULURLLLLUUULDR
LDUURULLRLDRRUUDUUUURUUUDDDURRDDLRDLLRDDRULDDUURUDDURLLUDRDUDRDULDRRRLULUDRULLLLDRLLDRDLDLLRURULUDDDDURDDDRLLUDLDRULRDLDUDDDUUDLLRLLLDLRLRLRRUDDULDDDUDLDDLUDDULDLLLLULLLLDDURDDURRRDDRLRLLUDLLUDDDUDURUDRLRDRULULDDRULDLULULLRUULRLDULUURRDRDRRDLDDDRRLUULDLUDRDDUDLRURULLDDURLDDRULUDLDDDRDRLLRDLLUURRRURDRLRURLDDLURDRURDDURLLRLRUDUUDLDUDURRDDURDRDDUDDDUDUURURDDLLRUUDDRRDULDDLLDLRULUULRUUDLLDRLULDULDDUDLULRULDRLLDUULDDDLRLLRLULDDULDDRRRLDRRLURULRDDRDLRRDUDDRDRRRRUDUDLLRRDRRURRUURDRULDDUDURLUDDURDUDRDUULLDRURUURURDRRLDDLDLUURLULRUDURDRUUURRURRDRUDRUURDURLRULULLLULDLLDLRRLDRDLUULUDDDLRDRLRLDRUDUDRLLRL
LURLUURLURDUUDRUDLDLLURRRDLDRRRULDDRRDRDUUDRUDURDDDURLUDDLULUULRRLLRULUDRDDRRRLDURDUDDURDDDLRLDDLULLDRDDLUUDUURRRLULRUURRRRLLULDUDRDUURRRURRDRDUDUDLUDULLDLDDRLUDRURDULURLURRLLURLLLRLUURLRUDLUDDRLURRUULULRLURRURUDURDLDLDDUDDRDLLRLLRRULDDRUDURUDDDUDLLRDLRUDULLLRRRUURUDUUULLRDUDRURUDULLDLLUUUDRULRLLRRDDDDUDULDRDRLLDDLLDDDURRUDURLDLRDRUURDDURLRDRURLRRLLRLULDRRLRUDURDUURRLUUULUDDDLRLULRDRLLURRRDLURDUUDRRRLUURRLLUDLUDLUULLRRDLLRDDRURRUURLDDLRLRLRUDLDLRLRDRRDLLLRDLRDUDLLDDDRD

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,22 +0,0 @@
require 'digest/md5'
door_id = 'wtnhxymk'
password = Array.new(8, nil)
VALID = (0..7).map(&:to_s).to_a
index = 0
while password.any?(&:nil?)
puts index if index % 1000000 == 0
hash = Digest::MD5.hexdigest("#{door_id}#{index}")
if hash.start_with?('00000')
i = hash[5]
if VALID.include?(i) && password[i.to_i].nil?
password[i.to_i] = hash[6]
p hash, password
end
end
index += 1
end
puts password.join

@ -1,607 +0,0 @@
counts = Array.new(8) { Hash.new(0) }
DATA.read.lines.each.with_object(counts) do |line, counts|
(0..7).each do |i|
counts[i][line[i]] += 1
end
end
p counts.map {|h| h.sort_by(&:last).first.first }.join
__END__
eqvmfqnf
jvkezmqt
zcssqwlw
cuacncgg
ikmpzpoh
dzpzobdl
qlsnuhuq
fwqnoklz
cibgplfq
ktsqfcrv
vcknjnnx
upaiaprz
bpqmolbq
dflhnpnk
heqjflch
cmewgodc
aaorgxkn
plekphpw
fcofrbnm
bmnrygtb
rqsqsqio
rnlntwxa
cxjqqfyl
jxjnxchb
kfgutxmi
cbciszxd
irakoonu
pcgfnycg
fgeivexo
ujxdaehw
ejkvrych
nhlklbgr
etjuhgry
mkgkmykm
teuhrfto
juqfslbn
tbwxabzi
ngdnwsey
amcibkyo
xlvxwqpj
vdbzuvkh
gkagbzep
kqxzkeip
bxccztho
vqrywqlc
jbzhecjc
ozkulgxo
uiwbofuk
vfwhdnao
tycxucwd
jvhuljfs
xxhqhruc
upnndiiz
andxywil
lowofbqv
iroqzrry
nmkkqqjb
daijrfna
jmcstxlq
jdefvuaa
nkbmowfi
agotazda
kufoymrn
yijwfjyi
hyqvaouj
soueuhln
oomsbkmh
buadtssf
rvgpeeza
hjiymcmd
ebgivdap
xzieipbg
ttpudwqt
hndwuncw
wqypfkvf
jqxuaipm
fzwlgxxq
ddshbtya
ardlcgyi
soznvuyw
vyizuolp
ckfaxyvs
nbsjkibi
lsrkrdzp
oqoffwxa
bdugjlsm
rtcsylfd
fezoiliq
zwpaphcb
sdlouhyf
cfejwvls
xehddxku
edhrtdcv
ehouagvy
hoyxjfsj
quggpnpx
muqbijbe
rcnniddd
kzfeiaui
sywienef
xpxftuvq
dtbhnslt
mpcpkmfa
wysutlci
fmqomicz
mhshprxr
uxwfcftt
ehbonsrl
pjobilxx
chiebfox
lqfxgyqg
vupcjatm
wfljafhc
iygojeny
gqxmgneu
nhlwllak
xnkqpulv
awijbvef
pbcrrwqo
dobsejtb
dqdoapkc
hngrxdtx
dodsxysb
bmtyelak
cctuwwvt
rytlmoyr
fqnbuxdi
irrqladc
wnvtsneg
ugqqdmlj
nljnjiod
knidxxzh
dfymoqgt
fwgtjafh
fpdioivz
tqbewmti
mcqtbbee
pivfrpou
tdyguuos
eldmvvmi
oaiqnizz
fyqpxgwa
lzcxsazq
zhsoljwz
qnzafmjl
oopnnndl
cozehoor
bspuwzxm
ubtunnep
smdhpvxr
nsvxiwje
mmqcklsm
hhxaciaq
zzgoxhws
fvntouun
skxzmzyg
znptwuqu
aknwvojo
wftmjrsf
gahrordj
oegnykag
lvlqswph
qsowvoem
sjspasfp
ygjohzfd
jeuxigsi
lgxdtudx
qadlkrel
lpfxosdq
sgaoqkzr
rtlvuhfv
ftbbsgbn
kjxttiqu
gylikswu
lquhgmrs
hxrjagjm
epxxekgx
uwwlcbrx
feincdjp
uyxhfhsc
nojuykoh
psjuuqwu
gtlohqkz
sbzsbgrw
nbhwuxfb
phmtunrh
zmfbkvgv
mjumfpia
gkubcshe
jmavrhyd
cgffkftg
msurhdct
bvchukal
psxaluvg
tvgwjhhp
chyizcxv
dumebzkd
cjpzbkzk
ngrgseyn
xmwcmaaz
puyrbiup
xxkpznis
rguwrpua
jmolhvnn
kpeqtlan
zzgvoxlp
erbintcn
kcykvysv
ixildajc
tnvgihwe
iqwgozpj
txkgyflb
vsyzebrw
ehnbcjef
hfevkbhf
wihlqtmp
vmrmnygo
ulvsuvsn
wgxnwihd
lexgbpsv
kxqcjoeb
daodpsbb
azyqmyhv
mvzcatwb
jtvqkjrv
rtdsaqqd
xrhzmnzl
wgfiwjrh
hgrgqqxm
nwwcxoyq
qlqyhpzs
ovujfily
pzvyeryk
strswprn
nrxclypc
sfusjxzi
pclbdadw
sjhggndb
xjcutuyt
qjjjeytj
qqjrkdlb
pyzodjdh
brnmlkmi
lgipidfp
ttrfbjry
iidwekro
vnwlnyma
ylxatduo
eiokdbqr
laezjjte
kkjhfsvp
buaegtpg
vzgqletc
pkdseade
nvpyxokq
yiysgxpe
xqhtubam
lcstpvke
nnskqssg
mkrbdovg
camkeppm
iqjvotay
bodlfgkj
jiigwvzc
ixpghywy
qlzyjgue
ugyjqtzn
odeuuiir
yfhianfx
seewayqj
lstpeuja
paqqnxsr
guwkidny
susussgu
ezcayehr
tdzgvcqf
vckcnsio
obawbapm
ipebazzk
tmcpmiou
hpdlfwor
ygxlfzzr
ltyxhtbx
olzqonbx
grsxreqs
bvkjcoux
fxtuxuub
fcbxdenm
smilcfvz
ewbndkiz
httsnfqu
ghorvefw
anevvqir
sajdzwho
becdemdn
vxktmxsj
xyawkeuw
pdefbxmh
yejymgfr
mipvhnsc
tjdyqpzd
rbvqirmd
mscuflvd
draqqcda
xfegqcjg
auypywpb
gitgzstq
zveqbzgt
wxrpedre
haptyecu
tkeexmhe
ujijprbd
xjiyczwq
ehpygnrr
guvejwyt
zmtsftky
wqtklwiz
lwlessio
lrknmhzd
pkdkwevt
ncryoeth
hjsqtpxu
ivmqrwok
qozgijgu
ueujvbbe
nfxgrmsd
zeetrgdl
drfbcgxo
rjjeraeb
hshozlgv
sfgvrnez
zaoctlsa
hebtzqvy
qckvuyif
wxyszmev
ddxfwklt
jqlzpfvu
wimoefwx
kabvtrno
pbebkvkm
govfwjof
xfjkvoup
fuzxcese
zbavvmyy
mwvkrnjg
gtkyelff
bffyzhnt
vlffqryw
ofncqcqw
cnzzrjjj
txpzvykz
ukkgeavq
wdnieioq
avosnedk
ipaavrqp
eeuurfat
sfhhwqzw
vjzopzad
kdbjonqz
uaksjfuc
lumpaomf
ysebmwel
dobryhxj
oaymjqwh
qjfflojj
zqmfgwre
uimjngfs
ihwelccg
yetrodjy
aifvwtws
xiyruzqr
anuvhykm
lelbjsno
csjwqotd
pptsysey
joptcdmq
tghbxpmq
jduwbxiy
obcdlahg
dxwrzytc
axfrxlgz
gepnmvel
ztmcynch
otnicgga
bdzobaoe
vkljxwnm
qvhmitgh
yflyxbjn
qshihqki
debaxqpw
fhfcjogj
huwpnaxx
jpwnrjbc
waylsrcm
aurdpcqc
yanpouht
ybwbpcak
uzvvspnj
tftluckv
uwmditoa
wsndxybi
dotcxasi
lxgmptwn
bpdmcbgt
dpjqvvck
jmgwudli
rimvxcoa
vdlacqbl
qtzwuqny
olzuzuuq
grlyyegi
mhgtadti
yrfdffzj
wbxadryy
bhaniozq
jdishqcx
kmiatkjj
asmxdrmv
riqdknna
fsuetmeg
iikajhgb
ioswsaws
yygpvtfb
egjoltik
bypcbzpk
zaumpggx
sdizezlv
xoyallwy
gicvajdl
qzowhuxa
iyftbzns
srzjxhve
xwasqzay
qznuxpqj
mlnjztxf
rxkcymao
huvxpllx
fmnrqasq
mwwigmka
yovjkmou
kvdrltte
nymvepew
vnrjykzc
unoegpvv
trrejbob
zwsdnqnb
ljsztmgl
tiznomfv
zxtxholt
csufzpiw
jgbjpucz
mpakkeil
ixmbvvbi
ejkhcxjj
zaokljpl
oeocaxdv
ytlpsbcx
hpfserxf
nzregysc
etevckof
bcqkqdvb
xzdhhick
gystpgoo
ciiyzxxr
kwstdxnn
ztregxhx
qhvkjoqe
ugirgwax
nhukpdut
yfiibmmd
cwkayjcp
ebmlabrp
kvjhyrag
wbphpfkc
ucqvhibs
dwuavsyy
jwrdsobl
hytijctt
plcumjhv
hwexsihm
ppmfzgqt
moumyuiw
zvgbsabj
yraygmws
vopzuhor
hafhljwp
gmqpchdg
yyahpihs
xvqakyyp
deamarun
yunihcvw
gcdjqqmu
kctibuxy
gcvlcfhc
ydwoxfvg
epszfvuh
xjjvwpbz
gzpdnthj
mnkrjgwz
ldfwvvfq
tydqesvl
envwzaqv
xvwyzkpe
rmpgcjeo
pkupgxup
ekqizsjl
agvenhgu
vscaqtri
rwfjrjpg
imthkcta
sjpmwqmg
fptfgekn
ohbwdbjm
ccfrphaj
gyeaqkog
onybscve
qztmoant
abjnbrpd
zompdzuf
bamomvbw
kzmmgexu
wzoxohtn
wvgmvwdt
nlgkxmbu
vyoddxyf
phmrizhk
zhksysjf
atcfvzlx
iyabqkly
rnwidjpm
cgwddumw
fcoylnzw
lsxosfra
vbcdgfiw
aenlmdgh
fvtmormn
rllxkznc
asocydmo
zcltimlr
hrqmccpt
dfmlsvtz
ntuhkbws
oziqleds
wkzbguis
coapfihl
irzpsuql
uxaowrls
tdbefhcf
wsyusuph
lpbdrmyn
slrzkkms
wqvzwiyq
vinahrsd
thsnmqjr
kwrzmakz
ifhclifl
wkqahikb
rwnchlkr
rkhpdbbk
vqnzigbf
olzziafs
qcylpbtk
fzhtmgji
qvnyctmb
ouolgwup
xkbrykjx
apbamszk
mlrlmpoh
kdneakuk
rrhhrtfk
cbgzlbgz
mfxencal
bkctqwpe
rjdxhqof
ogcbntmp
bbftqdfk
kikdidvm
mnjgwven
yurxwsge
qlrdtzad
jalffvnu
tayfycwr
jhivnvaw
yuvffepz
mwhczdkv
xltzklis
iellkyqk
krpktxhh
rkawdywu
pqqitomj
nrhhtvtv
gwerzhwc
qlsgifir
ssvyspem
udnnmvxk
albkdbsh
obxcrucu
dnyytrcx

File diff suppressed because it is too large Load Diff

@ -1,258 +0,0 @@
class Screen
attr_reader :width, :height, :pixels
def initialize(width, height)
@width, @height = width, height
@pixels = Array.new(height) { Array.new(width, false) }
end
def to_s
pixels.map {|row| row.map {|pixel| pixel ? ?# : ?. }.join }.join("\n")
end
def <<(instruction)
case instruction
when /rect (\d+)x(\d+)/
$1.to_i.times do |x|
$2.to_i.times do |y|
pixels[y][x] = true
end
end
when /rotate column x=(\d+) by (\d+)/
col = pixels.map {|row| row[$1.to_i] }.rotate(-$2.to_i)
pixels.each do |row|
row[$1.to_i] = col.shift
end
when /rotate row y=(\d+) by (\d+)/
row = pixels[$1.to_i].rotate(-$2.to_i)
pixels[$1.to_i] = row
end
end
end
if __FILE__ == $0
screen = Screen.new(50, 6)
DATA.lines.each do |line|
screen << line
end
puts screen
puts screen.pixels.map {|row| row.count {|pixel| pixel }}.inject(:+)
end
require 'minitest'
# require 'minitest/autorun'
class TestScreen < Minitest::Test
def test_screen
screen = Screen.new(7, 3)
assert_equal <<-PIXELS.chomp, screen.to_s
.......
.......
.......
PIXELS
screen << 'rect 3x2'
assert_equal <<-PIXELS.chomp, screen.to_s
###....
###....
.......
PIXELS
screen << 'rotate column x=1 by 1'
assert_equal <<-PIXELS.chomp, screen.to_s
#.#....
###....
.#.....
PIXELS
screen << 'rotate row y=0 by 4'
assert_equal <<-PIXELS.chomp, screen.to_s
....#.#
###....
.#.....
PIXELS
screen << 'rotate column x=1 by 1'
assert_equal <<-PIXELS.chomp, screen.to_s
.#..#.#
#.#....
.#.....
PIXELS
end
end
__END__
rect 1x1
rotate row y=0 by 20
rect 1x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 3
rect 2x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 3
rect 2x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 4
rect 2x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 3
rect 2x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 5
rect 1x1
rotate row y=0 by 2
rect 1x1
rotate row y=0 by 6
rect 5x1
rotate row y=0 by 2
rect 1x3
rotate row y=2 by 8
rotate row y=0 by 8
rotate column x=0 by 1
rect 7x1
rotate row y=2 by 24
rotate row y=0 by 20
rotate column x=5 by 1
rotate column x=4 by 2
rotate column x=2 by 2
rotate column x=0 by 1
rect 7x1
rotate column x=34 by 2
rotate column x=22 by 1
rotate column x=15 by 1
rotate row y=2 by 18
rotate row y=0 by 12
rotate column x=8 by 2
rotate column x=7 by 1
rotate column x=5 by 2
rotate column x=2 by 1
rotate column x=0 by 1
rect 9x1
rotate row y=3 by 28
rotate row y=1 by 28
rotate row y=0 by 20
rotate column x=18 by 1
rotate column x=15 by 1
rotate column x=14 by 1
rotate column x=13 by 1
rotate column x=12 by 2
rotate column x=10 by 3
rotate column x=8 by 1
rotate column x=7 by 2
rotate column x=6 by 1
rotate column x=5 by 1
rotate column x=3 by 1
rotate column x=2 by 2
rotate column x=0 by 1
rect 19x1
rotate column x=34 by 2
rotate column x=24 by 1
rotate column x=23 by 1
rotate column x=14 by 1
rotate column x=9 by 2
rotate column x=4 by 2
rotate row y=3 by 5
rotate row y=2 by 3
rotate row y=1 by 7
rotate row y=0 by 5
rotate column x=0 by 2
rect 3x2
rotate column x=16 by 2
rotate row y=3 by 27
rotate row y=2 by 5
rotate row y=0 by 20
rotate column x=8 by 2
rotate column x=7 by 1
rotate column x=5 by 1
rotate column x=3 by 3
rotate column x=2 by 1
rotate column x=1 by 2
rotate column x=0 by 1
rect 9x1
rotate row y=4 by 42
rotate row y=3 by 40
rotate row y=1 by 30
rotate row y=0 by 40
rotate column x=37 by 2
rotate column x=36 by 3
rotate column x=35 by 1
rotate column x=33 by 1
rotate column x=32 by 1
rotate column x=31 by 3
rotate column x=30 by 1
rotate column x=28 by 1
rotate column x=27 by 1
rotate column x=25 by 1
rotate column x=23 by 3
rotate column x=22 by 1
rotate column x=21 by 1
rotate column x=20 by 1
rotate column x=18 by 1
rotate column x=17 by 1
rotate column x=16 by 3
rotate column x=15 by 1
rotate column x=13 by 1
rotate column x=12 by 1
rotate column x=11 by 2
rotate column x=10 by 1
rotate column x=8 by 1
rotate column x=7 by 2
rotate column x=5 by 1
rotate column x=3 by 3
rotate column x=2 by 1
rotate column x=1 by 1
rotate column x=0 by 1
rect 39x1
rotate column x=44 by 2
rotate column x=42 by 2
rotate column x=35 by 5
rotate column x=34 by 2
rotate column x=32 by 2
rotate column x=29 by 2
rotate column x=25 by 5
rotate column x=24 by 2
rotate column x=19 by 2
rotate column x=15 by 4
rotate column x=14 by 2
rotate column x=12 by 3
rotate column x=9 by 2
rotate column x=5 by 5
rotate column x=4 by 2
rotate row y=5 by 5
rotate row y=4 by 38
rotate row y=3 by 10
rotate row y=2 by 46
rotate row y=1 by 10
rotate column x=48 by 4
rotate column x=47 by 3
rotate column x=46 by 3
rotate column x=45 by 1
rotate column x=43 by 1
rotate column x=37 by 5
rotate column x=36 by 5
rotate column x=35 by 4
rotate column x=33 by 1
rotate column x=32 by 5
rotate column x=31 by 5
rotate column x=28 by 5
rotate column x=27 by 5
rotate column x=26 by 3
rotate column x=25 by 4
rotate column x=23 by 1
rotate column x=17 by 5
rotate column x=16 by 5
rotate column x=13 by 1
rotate column x=12 by 5
rotate column x=11 by 5
rotate column x=3 by 1
rotate column x=0 by 1

File diff suppressed because one or more lines are too long

@ -1,341 +0,0 @@
class Factory
attr_reader :bots, :bins
def initialize
@bots = Hash.new {|h,k| h[k] = Bot.new(self) }
@bins = Hash.new {|h,k| h[k] = Bin.new }
end
def <<(instruction)
case instruction
when /value (\d+) goes to bot (\d+)/
bots[$2.to_i] << $1.to_i
when /bot (\d+) gives low to (.+) (\d+) and high to (.+) (\d+)/
bot = bots[$1.to_i]
bot.outs = [out($2, $3.to_i),
out($4, $5.to_i)]
else
raise "invalid instruction: #{instruction}"
end
end
private
def out(type, id)
case type
when 'bot'
bots[id]
when 'output'
bins[id]
else
raise "invalid type: #{type}"
end
end
end
class Bot
attr_reader :factory, :values, :outs, :log
def initialize(factory)
@factory = factory
@values = []
@log = []
end
def <<(value)
values << value
try_run
end
def outs=(outs)
@outs = outs
try_run
end
private
def try_run
return unless outs && values.size == 2
log << values.sort
low, high = values.sort
values.clear
outs[0] << low
outs[1] << high
end
end
class Bin
attr_reader :value
def <<(value)
@value = value
end
end
if __FILE__ == $0
factory = Factory.new
DATA.each_line do |line|
factory << line
end
p factory.bins.values_at(0, 1, 2).map(&:value).inject(:*)
end
require 'minitest'
# require 'minitest/autorun'
class TestDay10 < Minitest::Test
def test_day_10
instructions = <<INSTRUCTIONS
value 5 goes to bot 2
bot 2 gives low to bot 1 and high to bot 0
value 3 goes to bot 1
bot 1 gives low to output 1 and high to bot 0
bot 0 gives low to output 2 and high to output 0
value 2 goes to bot 2
INSTRUCTIONS
factory = Factory.new
instructions.lines.each do |line|
factory << line
end
assert_equal [5, 2, 3], factory.bins.sort_by {|k,_| k }.map(&:last).map(&:value)
end
end
__END__
bot 135 gives low to bot 27 and high to bot 166
bot 57 gives low to bot 4 and high to bot 186
bot 115 gives low to output 2 and high to bot 80
bot 44 gives low to bot 175 and high to bot 88
bot 167 gives low to bot 42 and high to bot 168
bot 18 gives low to bot 32 and high to bot 89
bot 199 gives low to bot 75 and high to bot 40
bot 129 gives low to bot 178 and high to bot 147
bot 163 gives low to bot 49 and high to bot 160
value 2 goes to bot 143
bot 176 gives low to bot 139 and high to bot 117
bot 194 gives low to bot 11 and high to bot 37
bot 99 gives low to bot 163 and high to bot 138
value 53 goes to bot 9
bot 159 gives low to output 1 and high to bot 207
bot 0 gives low to bot 105 and high to bot 13
bot 6 gives low to bot 66 and high to bot 116
bot 81 gives low to bot 54 and high to bot 10
bot 27 gives low to bot 188 and high to bot 199
bot 186 gives low to bot 84 and high to bot 123
bot 154 gives low to bot 21 and high to bot 107
bot 188 gives low to bot 92 and high to bot 75
bot 164 gives low to bot 115 and high to bot 28
bot 106 gives low to bot 48 and high to bot 155
bot 193 gives low to bot 101 and high to bot 110
bot 136 gives low to bot 166 and high to bot 152
bot 7 gives low to bot 156 and high to bot 24
bot 103 gives low to bot 182 and high to bot 0
bot 101 gives low to bot 16 and high to bot 72
bot 86 gives low to bot 102 and high to bot 48
bot 78 gives low to bot 177 and high to bot 113
value 17 goes to bot 198
bot 54 gives low to bot 161 and high to bot 111
bot 46 gives low to bot 74 and high to bot 39
bot 22 gives low to bot 56 and high to bot 161
bot 5 gives low to bot 186 and high to bot 123
bot 137 gives low to bot 202 and high to bot 85
bot 202 gives low to bot 108 and high to bot 118
bot 174 gives low to bot 0 and high to bot 21
bot 119 gives low to bot 68 and high to bot 53
bot 151 gives low to bot 83 and high to bot 164
bot 160 gives low to bot 33 and high to bot 97
bot 76 gives low to bot 40 and high to bot 120
bot 60 gives low to bot 103 and high to bot 174
bot 203 gives low to bot 120 and high to bot 132
bot 157 gives low to bot 116 and high to bot 11
bot 98 gives low to bot 208 and high to bot 16
bot 142 gives low to bot 114 and high to bot 71
bot 143 gives low to bot 198 and high to bot 146
bot 30 gives low to bot 59 and high to bot 135
bot 87 gives low to bot 39 and high to bot 104
bot 161 gives low to bot 173 and high to bot 125
bot 104 gives low to bot 34 and high to bot 68
bot 70 gives low to bot 112 and high to bot 176
bot 92 gives low to bot 122 and high to bot 46
bot 148 gives low to bot 28 and high to bot 58
bot 49 gives low to output 0 and high to bot 33
bot 140 gives low to bot 136 and high to bot 134
bot 16 gives low to bot 170 and high to bot 79
bot 13 gives low to bot 204 and high to bot 22
bot 189 gives low to bot 148 and high to bot 45
bot 89 gives low to bot 73 and high to bot 86
value 31 goes to bot 50
bot 166 gives low to bot 199 and high to bot 76
bot 178 gives low to output 5 and high to bot 159
bot 58 gives low to bot 167 and high to bot 126
bot 149 gives low to bot 180 and high to bot 153
bot 131 gives low to bot 97 and high to bot 66
bot 64 gives low to bot 192 and high to bot 44
bot 117 gives low to bot 140 and high to bot 134
bot 156 gives low to bot 174 and high to bot 154
value 11 goes to bot 19
bot 1 gives low to bot 26 and high to bot 144
bot 171 gives low to output 7 and high to bot 150
bot 31 gives low to bot 110 and high to bot 127
value 5 goes to bot 162
bot 9 gives low to bot 8 and high to bot 128
bot 93 gives low to bot 109 and high to bot 188
value 47 goes to bot 184
bot 80 gives low to output 19 and high to bot 42
bot 155 gives low to bot 149 and high to bot 52
bot 108 gives low to output 14 and high to bot 47
bot 165 gives low to bot 200 and high to bot 141
bot 184 gives low to bot 162 and high to bot 20
bot 50 gives low to bot 143 and high to bot 4
bot 28 gives low to bot 80 and high to bot 167
bot 66 gives low to bot 151 and high to bot 55
bot 201 gives low to bot 124 and high to bot 41
bot 204 gives low to bot 94 and high to bot 56
bot 134 gives low to bot 152 and high to bot 203
bot 51 gives low to bot 36 and high to bot 142
bot 2 gives low to bot 52 and high to bot 201
bot 183 gives low to bot 38 and high to bot 78
bot 26 gives low to bot 142 and high to bot 69
bot 182 gives low to bot 3 and high to bot 105
bot 72 gives low to bot 79 and high to bot 209
bot 8 gives low to bot 185 and high to bot 65
bot 75 gives low to bot 46 and high to bot 87
bot 38 gives low to bot 82 and high to bot 177
bot 147 gives low to bot 159 and high to bot 207
bot 195 gives low to bot 104 and high to bot 119
bot 63 gives low to bot 126 and high to bot 172
bot 144 gives low to bot 69 and high to bot 82
bot 83 gives low to output 3 and high to bot 115
bot 43 gives low to bot 194 and high to bot 91
value 37 goes to bot 8
bot 82 gives low to bot 193 and high to bot 31
bot 150 gives low to output 18 and high to bot 49
value 23 goes to bot 182
bot 67 gives low to bot 61 and high to bot 165
bot 77 gives low to bot 107 and high to bot 122
bot 130 gives low to bot 141 and high to bot 30
value 73 goes to bot 12
bot 41 gives low to bot 99 and high to bot 208
bot 170 gives low to bot 131 and high to bot 6
bot 120 gives low to bot 195 and high to bot 132
bot 118 gives low to bot 47 and high to bot 129
bot 100 gives low to bot 150 and high to bot 163
value 67 goes to bot 185
bot 152 gives low to bot 76 and high to bot 203
bot 162 gives low to bot 67 and high to bot 205
value 7 goes to bot 32
bot 121 gives low to bot 172 and high to bot 158
bot 65 gives low to bot 57 and high to bot 5
bot 122 gives low to bot 81 and high to bot 74
bot 21 gives low to bot 13 and high to bot 17
bot 23 gives low to bot 133 and high to bot 1
bot 36 gives low to bot 201 and high to bot 114
bot 138 gives low to bot 160 and high to bot 131
bot 55 gives low to bot 164 and high to bot 148
bot 123 gives low to bot 70 and high to bot 176
value 61 goes to bot 61
bot 107 gives low to bot 17 and high to bot 81
bot 19 gives low to bot 60 and high to bot 156
value 41 goes to bot 12
value 29 goes to bot 18
value 13 goes to bot 60
bot 62 gives low to bot 20 and high to bot 64
bot 40 gives low to bot 87 and high to bot 195
bot 90 gives low to bot 64 and high to bot 112
bot 69 gives low to bot 71 and high to bot 193
bot 35 gives low to output 4 and high to bot 108
bot 177 gives low to bot 31 and high to bot 113
bot 59 gives low to bot 93 and high to bot 27
bot 187 gives low to bot 89 and high to bot 94
bot 73 gives low to output 9 and high to bot 102
bot 45 gives low to bot 58 and high to bot 63
bot 39 gives low to bot 23 and high to bot 34
bot 110 gives low to bot 72 and high to bot 190
bot 181 gives low to bot 15 and high to bot 93
bot 95 gives low to bot 7 and high to bot 15
bot 33 gives low to output 13 and high to bot 169
bot 20 gives low to bot 205 and high to bot 192
bot 158 gives low to bot 85 and high to bot 29
bot 61 gives low to bot 14 and high to bot 200
value 71 goes to bot 103
bot 192 gives low to bot 130 and high to bot 175
bot 112 gives low to bot 44 and high to bot 139
bot 96 gives low to bot 144 and high to bot 38
bot 32 gives low to output 11 and high to bot 73
bot 180 gives low to output 10 and high to bot 171
value 59 goes to bot 3
bot 208 gives low to bot 138 and high to bot 170
bot 198 gives low to bot 184 and high to bot 62
bot 207 gives low to output 16 and high to output 8
bot 196 gives low to bot 43 and high to bot 91
bot 10 gives low to bot 111 and high to bot 133
bot 168 gives low to bot 35 and high to bot 202
bot 113 gives low to bot 127 and high to bot 196
bot 169 gives low to output 20 and high to bot 83
bot 3 gives low to bot 18 and high to bot 187
bot 52 gives low to bot 153 and high to bot 124
bot 190 gives low to bot 209 and high to bot 43
bot 125 gives low to bot 2 and high to bot 36
bot 173 gives low to bot 155 and high to bot 2
bot 153 gives low to bot 171 and high to bot 100
bot 34 gives low to bot 1 and high to bot 96
bot 84 gives low to bot 90 and high to bot 70
bot 12 gives low to bot 9 and high to bot 128
bot 24 gives low to bot 154 and high to bot 77
bot 179 gives low to bot 63 and high to bot 121
bot 85 gives low to bot 118 and high to bot 29
bot 11 gives low to bot 189 and high to bot 145
bot 116 gives low to bot 55 and high to bot 189
bot 132 gives low to bot 119 and high to bot 53
bot 15 gives low to bot 24 and high to bot 109
bot 102 gives low to output 15 and high to bot 197
value 43 goes to bot 206
bot 37 gives low to bot 145 and high to bot 25
bot 53 gives low to bot 183 and high to bot 78
bot 197 gives low to output 12 and high to bot 180
bot 47 gives low to output 17 and high to bot 178
bot 17 gives low to bot 22 and high to bot 54
bot 56 gives low to bot 106 and high to bot 173
bot 191 gives low to bot 135 and high to bot 136
bot 127 gives low to bot 190 and high to bot 196
bot 172 gives low to bot 137 and high to bot 158
bot 4 gives low to bot 146 and high to bot 84
bot 42 gives low to output 6 and high to bot 35
bot 145 gives low to bot 45 and high to bot 179
bot 133 gives low to bot 51 and high to bot 26
bot 139 gives low to bot 88 and high to bot 117
bot 105 gives low to bot 187 and high to bot 204
bot 126 gives low to bot 168 and high to bot 137
bot 128 gives low to bot 65 and high to bot 5
bot 114 gives low to bot 41 and high to bot 98
bot 14 gives low to bot 206 and high to bot 95
bot 91 gives low to bot 37 and high to bot 25
bot 206 gives low to bot 19 and high to bot 7
value 19 goes to bot 14
bot 185 gives low to bot 50 and high to bot 57
bot 205 gives low to bot 165 and high to bot 130
bot 109 gives low to bot 77 and high to bot 92
bot 175 gives low to bot 30 and high to bot 191
bot 29 gives low to bot 129 and high to bot 147
bot 74 gives low to bot 10 and high to bot 23
bot 94 gives low to bot 86 and high to bot 106
bot 25 gives low to bot 179 and high to bot 121
bot 71 gives low to bot 98 and high to bot 101
bot 209 gives low to bot 157 and high to bot 194
bot 88 gives low to bot 191 and high to bot 140
bot 124 gives low to bot 100 and high to bot 99
bot 97 gives low to bot 169 and high to bot 151
bot 141 gives low to bot 181 and high to bot 59
bot 146 gives low to bot 62 and high to bot 90
bot 200 gives low to bot 95 and high to bot 181
bot 79 gives low to bot 6 and high to bot 157
bot 48 gives low to bot 197 and high to bot 149
value 3 goes to bot 67
bot 68 gives low to bot 96 and high to bot 183
bot 111 gives low to bot 125 and high to bot 51

@ -1,203 +0,0 @@
require 'delegate'
State = Struct.new(:floors, :elevator) do
def self.from_s(input)
elevator = nil
floors = input.lines.reverse.map.with_index {|line, index|
_, e, *items = line.split(/\s+/)
elevator = index if e == ?E
Floor.new(items.reject {|item| item == ?. })
}
new(floors, elevator)
end
def ==(state)
eql?(state)
end
def eql?(state)
elevator == state.elevator && floors.zip(state.floors).all? {|a,b| a.eql?(b) }
end
def candidates
[-1, 1].flat_map {|delta|
next_floor = elevator + delta
next [] unless (0...floors.size).cover?(next_floor)
elevator_items = [1, 2].flat_map {|n| current_floor.to_a.combination(n).to_a }
elevator_items.map {|items| move(items, elevator, next_floor) }
}
end
def irradiated?
floors.any?(&:irradiated?)
end
def to_s
floors.map.with_index {|floor, index|
"#{elevator == index ??E:?.} #{floor.inspect}"
}.reverse.join("\n")
end
private
def current_floor
floors[elevator]
end
def move(items, from, to)
from_floor = Floor.new(floors[from] - items)
to_floor = Floor.new(floors[to] + items)
floors = self.floors.clone
floors[from] = from_floor
floors[to] = to_floor
self.class.new(floors, to)
end
end
class Floor < SimpleDelegator
attr_reader :source
def initialize(items)
@source = super(Set.new(items))
end
def microchips
source.select {|item| item.end_with?(?M) }.map {|item| item.chomp(?M) }
end
def generators
source.select {|item| item.end_with?(?G) }.map {|item| item.chomp(?G) }
end
def shielded
microchips & generators
end
def irradiated?
!(generators.empty? || (microchips - generators).empty?)
end
def hash
id.hash
end
def eql?(floor)
id == floor.id
end
def id
[shielded.size, (microchips - shielded).size, (generators - shielded).size]
end
end
if __FILE__ == $0
INPUT = <<-INPUT
F4 .
F3 . CoM CuM RM PlM
F2 . CoG CuG RG PlG
F1 E PrG PrM EG EM DG DM
INPUT
Step = Struct.new(:state, :count)
seen = Set.new
steps = [Step.new(State.from_s(INPUT), 0)]
until steps.empty? do
step = steps.shift
# puts
# puts "Steps: #{step.count}"
# puts step.state
if step.state.floors[0..-2].all?(&:empty?)
puts
puts "Steps: #{step.count}"
puts step.state
exit
end
step.state.candidates.each do |candidate|
next if seen.include?(candidate)
seen << candidate
next if candidate.irradiated?
steps << Step.new(candidate, step.count + 1)
end
end
end
require 'minitest/autorun'
class TestDay11 < Minitest::Test
INPUT = <<-INPUT
F4 . . . . .
F3 . . . LG .
F2 . HG . . .
F1 E . HM . LM
INPUT
def setup
@state = State.from_s(INPUT)
end
def test_initialize
assert_equal 4, @state.floors.size
assert_equal 0, @state.elevator
floor = @state.floors[0]
assert_equal 2, floor.size
assert_equal %w[ H L ], floor.microchips
assert_empty floor.generators
end
def test_equality
state = State.from_s(<<-INPUT)
F4 . . . . .
F3 . . . HG .
F2 . LG . . .
F1 E . HM . LM
INPUT
assert_equal @state, state
assert_equal @state.hash, state.hash
assert @state.eql?(state)
set = Set.new
set << @state
assert_includes set, @state
assert_includes set, state
end
def test_candidates
candidates = @state.candidates
assert_equal 3, candidates.size
candidate = candidates[0]
assert_equal 1, candidate.elevator
assert_equal %W[ LM ], candidate.floors[0].to_a
assert_equal %W[ HG HM ], candidate.floors[1].to_a
candidate = candidates[1]
assert_equal 1, candidate.elevator
assert_equal %W[ HM ], candidate.floors[0].to_a
assert_equal %W[ HG LM ], candidate.floors[1].to_a
candidate = candidates[2]
assert_equal 1, candidate.elevator
assert_empty candidate.floors[0]
assert_equal %W[ HG HM LM ], candidate.floors[1].to_a
end
def test_irradiated
refute Floor.new(%w[]).irradiated?
refute Floor.new(%w[ BM ]).irradiated?
refute Floor.new(%w[ BG ]).irradiated?
refute Floor.new(%w[ BM BG ]).irradiated?
refute Floor.new(%w[ BM BG LG ]).irradiated?
assert Floor.new(%w[ BM LG ]).irradiated?
end
end

@ -1,51 +0,0 @@
registers = { ?a => 0, ?b => 0, ?c => 1, ?d => 0 }
pc = 0
data = DATA.each_line.to_a
while pc < data.size
line = data[pc]
case line
when /cpy ([a-d]|\d+) ([a-d])/
value = registers.fetch($1) { $1.to_i }
registers[$2] = value
pc += 1
when /inc ([a-d])/
registers[$1] += 1
pc += 1
when /dec ([a-d])/
registers[$1] -= 1
pc += 1
when /jnz ([a-d]|\d+) (-?\d+)/
value = registers.fetch($1) { $1.to_i }
pc += value.zero? ? 1 : $2.to_i
else
raise "invalid line: #{line}"
end
end
p registers
__END__
cpy 1 a
cpy 1 b
cpy 26 d
jnz c 2
jnz 1 5
cpy 7 c
inc d
dec c
jnz c -2
cpy a c
inc a
dec b
jnz b -2
cpy c b
dec d
jnz d -6
cpy 16 c
cpy 17 d
inc a
dec d
jnz d -2
dec c
jnz c -5

@ -1,87 +0,0 @@
class Maze
attr_reader :walls
def initialize(seed)
@walls = Hash.new {|h,(x,y)|
num = x*x + 3*x + 2*x*y + y + y*y + seed
h[[x,y]] = num.to_s(2).chars.count {|c| c == ?1 }.odd?
}
end
def [](x,y)
walls[[x, y]]
end
def solve(start)
Solver.new(self, start)
end
class Solver
attr_reader :maze, :seen, :current
def initialize(maze, start)
@maze = maze
@seen = Set.new
@current = [[start, 0]]
end
def walk
return enum_for(__method__) unless block_given?
loop do
pos, count = current.shift
seen << pos
x,y = pos
[[1,0], [-1,0], [0,1], [0,-1]].map {|dx, dy|
[x + dx, y + dy]
}.reject {|x,y|
x.negative? || y.negative?
}.reject {|x,y|
maze[x,y]
}.reject {|pos|
seen.include?(pos)
}.each do |pos|
current << [pos, count + 1]
end
yield [pos, count]
end
end
end
end
if __FILE__ == $0
maze = Maze.new(1358)
p maze.solve([1,1]).walk.take_while {|pos,count| count < 51 }.map(&:first).uniq.size
end
require 'minitest'
# require 'minitest/autorun'
class TestMaze < Minitest::Test
def setup
@maze = Maze.new(10)
end
def test_maze
maze_s = <<-MAZE.chomp.split("\n").map(&:chars)
.#.####.##
..#..#...#
#....##...
###.#.###.
.##..#..#.
..##....#.
#...##.###
MAZE
maze_s.each.with_index do |row, y|
row.each.with_index do |c, x|
assert_equal c, @maze[x,y] ??#:?.
end
end
end
def test_solve
assert_equal 11, @maze.solve([1,1], [7,4])
end
end

@ -1,33 +0,0 @@
require 'digest/md5'
class Keys
attr_reader :seed, :hash
def initialize(seed)
@seed = seed
@hash = Hash.new {|h,k|
hash = Digest::MD5.hexdigest("#{seed}#{k}")
2016.times do
hash = Digest::MD5.hexdigest(hash)
end
h[k] = hash
}
end
def each
return enum_for(__method__) unless block_given?
(0..Float::INFINITY).each do |index|
next unless /(.)\1\1/ =~ hash[index]
needle = $1 * 5
stream = (1..1000).map {|i| hash[index + i] }
next unless stream.any? {|h| h.include?(needle) }
yield [index, hash[index]]
end
end
end
keys = Keys.new('qzyelonm')
p keys.each.take(64).last

@ -1,25 +0,0 @@
Disc = Struct.new(:positions, :start_position) do
def position_at(time)
(start_position + time) % positions
end
end
discs = DATA.each_line.map {|line|
/Disc #\d has (?<positions>\d+) positions; at time=0, it is at position (?<position>\d+)./ =~ line
Disc.new(positions.to_i, position.to_i)
}
discs << Disc.new(11, 0)
p (0..Float::INFINITY).find {|t|
discs.each.with_index.all? {|disc, index|
disc.position_at(t + index) == 0
}
}
__END__
Disc #1 has 17 positions; at time=0, it is at position 15.
Disc #2 has 3 positions; at time=0, it is at position 2.
Disc #3 has 19 positions; at time=0, it is at position 4.
Disc #4 has 13 positions; at time=0, it is at position 2.
Disc #5 has 7 positions; at time=0, it is at position 2.
Disc #6 has 5 positions; at time=0, it is at position 0.

@ -1,24 +0,0 @@
def step(a)
b = a.reverse.tr('10', '01')
"#{a}0#{b}"
end
def checksum(data)
checksum = data.chars
loop do
checksum = checksum.each_slice(2).map {|a,b| (a == b) ??1:?0 }
break if checksum.length.odd?
end
checksum.join
end
seed = '10001110011110000'
target_length = 35651584
state = seed
while state.length < target_length
state = step(state)
end
data = state[0...target_length]
puts checksum(data)

@ -1,46 +0,0 @@
require 'digest/md5'
State = Struct.new(:location, :path)
Maze = Struct.new(:passcode, :size) do
def walk
return enum_for(__method__) unless block_given?
states = [State.new([0,0], '')]
until states.empty?
state = states.shift
yield state
next if state.location == [3,3]
hash = Digest::MD5.hexdigest("#{passcode}#{state.path}")[0,4]
open_doors = %i[ U D L R ].select.with_index {|_, index|
'bcdef'.include?(hash[index])
}
{
U: [ 0, -1],
D: [ 0, 1],
L: [-1, 0],
R: [ 1, 0],
}.select {|door, _|
open_doors.include?(door)
}.map {|door, (dx, dy)|
x = state.location[0] + dx
y = state.location[1] + dy
location = [x, y]
path = state.path + door.to_s
State.new(location, path)
}.select {|state|
state.location.all? {|i| (0...size).cover?(i) }
}.each do |state|
states << state
end
end
end
end
p Maze.new('yjjvjgan', 4).walk.select {|state|
state.location == [3, 3]
}.map(&:path).map(&:length).max

@ -1,50 +0,0 @@
Row = Struct.new(:tiles) do
INPUT_MAP = { ?. => :safe, ?^ => :trap }
def self.from_s(input)
new(input.chars.map {|char| INPUT_MAP.fetch(char) })
end
def next
self.class.new(
%i[ safe safe ].insert(1, *tiles).each_cons(3).map {|l,c,r|
if l == :trap && c == :trap && r == :safe
:trap
elsif l == :safe && c == :trap && r == :trap
:trap
elsif l == :trap && c == :safe && r == :safe
:trap
elsif l == :safe && c == :safe && r == :trap
:trap
else
:safe
end
}
)
end
end
if __FILE__ == $0
row = Row.from_s(DATA.read.chomp)
count = 0
400_000.times do
count += row.tiles.count(:safe)
row = row.next
end
p count
end
require 'minitest'
# require 'minitest/autorun'
class TestRow < Minitest::Test
def test_row
row = Row.from_s('..^^.')
assert_equal %i[ safe safe trap trap safe ], row.tiles
assert_equal Row.from_s('.^^^^'), row.next
end
end
__END__
^^.^..^.....^..^..^^...^^.^....^^^.^.^^....^.^^^...^^^^.^^^^.^..^^^^.^^.^.^.^.^.^^...^^..^^^..^.^^^^

@ -1,35 +0,0 @@
def solve(n, debug: false)
elves = Array.new(n) {|i| i+1 }
until elves.size == 1
across = elves.size / 2
elves.delete_at(across)
elves.rotate!
end
elves.first
end
# This takes too long
# n = 3017957
# puts solve(n)
# So instead use this to find the pattern!
(1..100).each do |i|
puts "#{i}: #{solve(i)}"
end
# At 3**n, the counter resets
# At 2*3**n, the counter goes up by two instead of one
include Math
def formula(n)
x = log(n, 3).to_i
a = 3**x
b = 2*a
(n == a) ? a : n - a + [(n - b), 0].max
end
(1..100).each do |n|
puts "#{n}: #{solve(n)} #{formula(n)}"
end

@ -1,14 +0,0 @@
blacklist = ARGF.read.split("\n").map {|line| Range.new(*line.split(?-).map(&:to_i)) }
ip = 0
count = 0
until ip > 4294967295
range = blacklist.find {|range| range.cover?(ip) }
if range.nil?
count += 1
ip += 1
else
ip = range.end + 1
end
end
puts count

@ -1,48 +0,0 @@
INSTRUCTIONS = ARGF.read.split("\n")
def scramble(input)
INSTRUCTIONS.each do |instruction|
case instruction
when /swap position (\d+) with position (\d+)/
x = $1.to_i
y = $2.to_i
input[x], input[y] = input[y], input[x]
when /swap letter (\w+) with letter (\w+)/
x = $1
y = $2
input.tr!("#{x}#{y}", "#{y}#{x}")
when /rotate (left|right) (\d+) steps?/
steps = $2.to_i
steps = -steps if $1 == 'right'
input = input.chars.rotate(steps).join
when /rotate based on position of letter (\w+)/
index = input.index($1)
index += 1 if index >= 4
index += 1
index = -index
input = input.chars.rotate(index).join
when /reverse positions (\d+) through (\d+)/
x = $1.to_i
y = $2.to_i
input[x..y] = input[x..y].reverse
when /move position (\d+) to position (\d+)/
x = $1.to_i
x = input[x]
input[x] = ''
y = $2.to_i
input.insert(y, x)
else
raise "invalid instruction: '#{instruction}'"
end
end
input
end
input = 'abcdefgh'.chars
input.permutation.each do |candidate|
if scramble(candidate.join) == 'fbgdceah'
puts candidate.join
exit
end
end

@ -1,10 +0,0 @@
Node = Struct.new(*%i[x y size used avail use])
nodes = ARGF
.read
.scan(%r|/dev/grid/node-x(\d+)-y(\d+)\s+(\d+)T\s+(\d+)T\s+(\d+)T\s*(\d+)%|)
.map {|match| Node.new(*match.map(&:to_i)) }
p nodes.permutation(2).count {|a,b|
a.used != 0 && a.used <= b.avail
}

@ -1,81 +0,0 @@
registers = { ?a => 7, ?b => 0, ?c => 0, ?d => 0 }
pc = 0
data = DATA.each_line.map(&:chomp).to_a
while pc < data.size
line = data[pc]
puts "#{registers}"
puts "#{pc}: #{line}"
case line
when /cpy ([a-d]|-?\d+) ([a-d])/
value = registers.fetch($1) { $1.to_i }
registers[$2] = value
pc += 1
when /inc ([a-d])/
registers[$1] += 1
pc += 1
when /dec ([a-d])/
registers[$1] -= 1
pc += 1
when /jnz ([a-d]|\d+) ([a-d]|-?\d+)/
value = registers.fetch($1) { $1.to_i }
count = registers.fetch($2) { $2.to_i }
pc += value.zero? ? 1 : count
when /tgl ([a-d]|-?\d+)/
value = registers.fetch($1) { $1.to_i }
line = data[pc + value]
if line.nil?
pc +=1
next
end
instruction, *args = line.split(/\s+/)
case args.size
when 1
instruction = (instruction == 'inc') ? 'dec' : 'inc'
when 2
instruction = (instruction == 'jnz') ? 'cpy' : 'jnz'
else
raise 'omg'
end
data[pc + value] = "#{instruction} #{args.join(' ')}"
pc += 1
else
puts "skipping line: #{line}"
pc += 1
end
end
p registers
__END__
cpy a b
dec b
cpy a d
cpy 0 a
cpy b c
inc a
dec c
jnz c -2
dec d
jnz d -5
dec b
cpy b c
cpy c d
dec d
inc c
jnz d -2
tgl c
cpy -16 c
jnz 1 c
cpy 94 c
jnz 82 d
inc a
inc d
jnz d -2
inc c
jnz c -5

@ -1,136 +0,0 @@
class Solver
def initialize(maze)
@maze = maze
end
def solve(from, to)
seen = Set.new(from)
queue = [[from, 0]]
current = queue.shift
loop do
location = current[0]
break if location == to
if seen.include?(location)
current = queue.shift
next
end
seen << location
neighbors = maze
.open_neighbors(location[0], location[1])
.reject {|location| seen.include?(location) }
queue.concat(neighbors.map {|location| [location, current[1] + 1] })
return nil if queue.empty?
current = queue.shift
end
current[1]
end
private
attr_reader :maze
end
class Maze
attr_reader :locations
def initialize(input)
@maze = Hash.new
@locations = Hash.new
x, y = 0, 0
input.chars.each do |char|
case char
when /\d/
@locations[char.to_i] = [x,y]
char = ?.
when "\n"
x = -1
y += 1
else
# no-op
end
@maze[[x,y]] = char
x += 1
end
end
def [](x,y)
maze[[x,y]]
end
def open_neighbors(x, y)
[[-1, 0],
[ 1, 0],
[ 0, -1],
[ 0, 1]].map {|dx,dy|
[x+dx, y+dy]
}.select {|x,y|
self[x,y] == ?.
}
end
private
attr_reader :maze
end
if __FILE__ == $0
maze = Maze.new(ARGF.read)
solver = Solver.new(maze)
hash = maze.locations.to_a.combination(2).each.with_object({}) {|(a, b), hash|
steps = solver.solve(a[1], b[1])
hash[[a[0],b[0]]] = steps
hash[[b[0],a[0]]] = steps
}
p maze
.locations
.map(&:first)
.permutation
.select {|route| route[0] == 0 }
.map {|route| route + [0] }
.map {|route|
[route, route.each_cons(2).map {|a,b| hash[[a,b]] }.inject(:+)]
}.sort_by(&:last)
.first
end
require 'minitest'
# require 'minitest/autorun'
class TestMaze < Minitest::Test
def test_maze
maze = Maze.new(<<-MAZE)
###########
#0.1.....2#
#.#######.#
#4.......3#
###########
MAZE
assert_equal [1,1], maze.locations[0]
assert_equal [[2,1], [1,2]], maze.open_neighbors(1,1)
end
end
class TestSolver < Minitest::Test
def test_solver
maze = Maze.new(<<-MAZE)
###########
#0.1.....2#
#.#######.#
#4.......3#
###########
MAZE
solver = Solver.new(maze)
assert_equal 2, solver.solve(maze.locations[0], maze.locations[4])
end
end

@ -1,43 +0,0 @@
class Assembunny
attr_reader :data
def initialize(data)
@data = data
end
def run(input)
return enum_for(__method__, input) unless block_given?
registers = { ?a => input, ?b => 0, ?c => 0, ?d => 0 }
pc = 0
while pc < data.size
line = data[pc]
case line
when /cpy ([a-d]|\d+) ([a-d])/
value = registers.fetch($1) { $1.to_i }
registers[$2] = value
pc += 1
when /inc ([a-d])/
registers[$1] += 1
pc += 1
when /dec ([a-d])/
registers[$1] -= 1
pc += 1
when /jnz ([a-d]|\d+) (-?\d+)/
value = registers.fetch($1) { $1.to_i }
pc += value.zero? ? 1 : $2.to_i
when /out ([a-d])/
yield registers.fetch($1)
pc += 1
else
raise "invalid line: #{line}"
end
end
end
end
assembunny = Assembunny.new(ARGF.read.split("\n"))
needle = ('01' * 6).chars.map(&:to_i)
puts (1..Float::INFINITY).find {|i| assembunny.run(i).take(12) == needle }

@ -1 +0,0 @@
target

173
2016/rust/Cargo.lock generated

@ -1,173 +0,0 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "advent_of_code_2016"
version = "0.1.0"
dependencies = [
"error-chain",
"regex",
"rust-crypto",
]
[[package]]
name = "aho-corasick"
version = "0.7.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
dependencies = [
"memchr",
]
[[package]]
name = "backtrace"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80"
dependencies = [
"backtrace-sys",
"cfg-if",
"dbghelp-sys",
"kernel32-sys",
"libc",
"rustc-demangle",
"winapi",
]
[[package]]
name = "backtrace-sys"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3602e8d8c43336088a8505fa55cae2b3884a9be29440863a11528a42f46f6bb7"
dependencies = [
"gcc",
"libc",
]
[[package]]
name = "cfg-if"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"
[[package]]
name = "dbghelp-sys"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"
dependencies = [
"winapi",
"winapi-build",
]
[[package]]
name = "error-chain"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cd681735364a04cd5d69f01a4f6768e70473941f8d86d8c224faf6955a75799"
dependencies = [
"backtrace",
]
[[package]]
name = "gcc"
version = "0.3.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "771e4a97ff6f237cf0f7d5f5102f6e28bb9743814b6198d684da5c58b76c11e0"
[[package]]
name = "kernel32-sys"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
dependencies = [
"winapi",
"winapi-build",
]
[[package]]
name = "libc"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a51822fc847e7a8101514d1d44e354ba2ffa7d4c194dcab48870740e327cac70"
[[package]]
name = "memchr"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
[[package]]
name = "rand"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "022e0636ec2519ddae48154b028864bdce4eaf7d35226ab8e65c611be97b189d"
dependencies = [
"libc",
]
[[package]]
name = "regex"
version = "1.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.6.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64"
[[package]]
name = "rust-crypto"
version = "0.2.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a"
dependencies = [
"gcc",
"libc",
"rand",
"rustc-serialize",
"time",
]
[[package]]
name = "rustc-demangle"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1430d286cadb237c17c885e25447c982c97113926bb579f4379c0eca8d9586dc"
[[package]]
name = "rustc-serialize"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bff9fc1c79f2dec76b253273d07682e94a978bd8f132ded071188122b2af9818"
[[package]]
name = "time"
version = "0.1.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c7ec6d62a20df54e07ab3b78b9a3932972f4b7981de295563686849eb3989af"
dependencies = [
"kernel32-sys",
"libc",
"winapi",
]
[[package]]
name = "winapi"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"

@ -1,9 +0,0 @@
[package]
name = "advent_of_code_2016"
version = "0.1.0"
authors = ["Alpha Chen <alpha.chen@gmail.com>"]
[dependencies]
error-chain = "0.7"
regex = "1.5"
rust-crypto = "0.2"

@ -1,415 +0,0 @@
use std::fmt;
use std::ops;
use std::str;
use errors::*;
pub struct Assembunny {
pub registers: Registers,
pub instructions: Instructions,
}
impl Assembunny {
fn instruction(&self, i: usize) -> Option<Instruction> {
self.instructions.get(i).cloned()
}
fn value<V: Into<Variable>>(&self, v: V) -> isize {
let v: Variable = v.into();
match v {
Variable::Register(r) => self.registers[r],
Variable::Value(i) => i,
}
}
fn toggle(&mut self, i: usize) {
let instruction = match self.instruction(i) {
Some(x) => x,
None => return,
};
let replacement = match instruction {
Instruction::Cpy(a, b) => Instruction::Jnz(a, b),
Instruction::Inc(x) => Instruction::Dec(x),
Instruction::Dec(x) |
Instruction::Tgl(x) => Instruction::Inc(x),
Instruction::Jnz(a, b) => Instruction::Cpy(a, b),
};
self.instructions[i] = replacement;
}
}
impl Iterator for Assembunny {
type Item = Registers;
fn next(&mut self) -> Option<Registers> {
let pc = self.value(Register::PC) as usize;
let instruction = match self.instruction(pc) {
Some(i) => i,
None => {
return None;
}
};
self.registers[Register::PC] += 1;
match instruction {
Instruction::Cpy(v, Variable::Register(r)) => {
self.registers[r] = self.value(v);
}
Instruction::Inc(Variable::Register(r)) => {
self.registers[r] += 1;
}
Instruction::Dec(Variable::Register(r)) => {
self.registers[r] -= 1;
}
Instruction::Jnz(v, delta) if self.value(v) != 0 => {
self.registers[Register::PC] -= 1;
self.registers[Register::PC] += self.value(delta);
}
Instruction::Tgl(v) => {
let index = (pc as isize) + self.value(v);
self.toggle(index as usize);
}
_ => {}
}
Some(self.registers.clone())
}
}
#[derive(Clone, Debug)]
pub struct Registers([isize; 5]);
impl Registers {
pub fn new() -> Self {
Registers([0; 5])
}
}
impl ops::Index<Register> for Registers {
type Output = isize;
fn index(&self, _index: Register) -> &isize {
self.0.index(usize::from(_index))
}
}
impl ops::IndexMut<Register> for Registers {
fn index_mut(&mut self, _index: Register) -> &mut isize {
self.0.index_mut(usize::from(_index))
}
}
pub struct Instructions(Vec<Instruction>);
impl Instructions {
fn get(&self, i: usize) -> Option<&Instruction> {
self.0.get(i)
}
}
impl ops::Index<usize> for Instructions {
type Output = Instruction;
fn index(&self, _index: usize) -> &Instruction {
self.0.index(_index)
}
}
impl ops::IndexMut<usize> for Instructions {
fn index_mut(&mut self, _index: usize) -> &mut Instruction {
self.0.index_mut(_index)
}
}
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq)]
pub enum Register {
PC,
A,
B,
C,
D,
}
impl From<Register> for usize {
fn from(r: Register) -> usize {
match r {
Register::PC => 0,
Register::A => 1,
Register::B => 2,
Register::C => 3,
Register::D => 4,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Instruction {
Cpy(Variable, Variable),
Inc(Variable),
Dec(Variable),
Jnz(Variable, Variable),
Tgl(Variable),
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Variable {
Register(Register),
Value(isize),
}
impl From<Register> for Variable {
fn from(r: Register) -> Self {
Variable::Register(r)
}
}
impl From<isize> for Variable {
fn from(i: isize) -> Self {
Variable::Value(i)
}
}
// Display
impl fmt::Display for Instructions {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f,
"{}",
self.0
.iter()
.map(Instruction::to_string)
.collect::<Vec<_>>()
.join("\n"))
}
}
impl fmt::Display for Instruction {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
Instruction::Cpy(a, b) => write!(f, "cpy {} {}", a, b),
Instruction::Inc(a) => write!(f, "inc {}", a),
Instruction::Dec(a) => write!(f, "dec {}", a),
Instruction::Jnz(a, b) => write!(f, "jnz {} {}", a, b),
Instruction::Tgl(a) => write!(f, "tgl {}", a),
}
}
}
impl fmt::Display for Variable {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
Variable::Register(r) => {
write!(f, "{}", format!("{:?}", r).to_lowercase())
}
Variable::Value(v) => write!(f, "{:?}", v),
}
}
}
// Parsing
impl str::FromStr for Instructions {
type Err = Error;
fn from_str(s: &str) -> Result<Self> {
s.lines()
.map(|line| line.parse())
.collect::<Result<Vec<_>>>()
.map(Instructions)
}
}
impl str::FromStr for Register {
type Err = Error;
fn from_str(s: &str) -> Result<Self> {
match s {
"a" => Ok(Register::A),
"b" => Ok(Register::B),
"c" => Ok(Register::C),
"d" => Ok(Register::D),
_ => Err(format!("invalid register '{}'", s).into()),
}
}
}
impl str::FromStr for Instruction {
type Err = Error;
fn from_str(s: &str) -> Result<Self> {
let mut tokens = s.split_whitespace();
match tokens.next() {
Some("cpy") => {
let v = tokens.read_variable()?;
let r = tokens.read_variable()?;
Ok(Instruction::Cpy(v, r))
}
Some("inc") => {
let r = tokens.read_register()?;
Ok(Instruction::Inc(Variable::Register(r)))
}
Some("dec") => {
let r = tokens.read_register()?;
Ok(Instruction::Dec(Variable::Register(r)))
}
Some("jnz") => {
let var = tokens.read_variable()?;
let val = tokens.read_variable()?;
Ok(Instruction::Jnz(var, val))
}
Some("tgl") => {
let var = tokens.read_variable()?;
Ok(Instruction::Tgl(var))
}
Some(inst) => Err(format!("invalid instruction '{}'", inst).into()),
None => Err("no instruction".into()),
}
}
}
impl str::FromStr for Variable {
type Err = Error;
fn from_str(s: &str) -> Result<Self> {
s.parse::<Register>()
.map(Variable::Register)
.or_else(|_| s.parse::<isize>().map(Variable::Value))
.map_err(|_| format!("invalid variable '{}'", s).into())
}
}
trait SplitWhitespaceExt {
fn read_variable(&mut self) -> Result<Variable>;
fn read_register(&mut self) -> Result<Register>;
fn read_value(&mut self) -> Result<isize>;
}
impl<'a> SplitWhitespaceExt for str::SplitWhitespace<'a> {
fn read_variable(&mut self) -> Result<Variable> {
self.next()
.ok_or("missing variable".into())
.and_then(|v| v.parse::<Variable>())
}
fn read_register(&mut self) -> Result<Register> {
self.next()
.ok_or("missing register".into())
.and_then(|v| v.parse::<Register>())
}
fn read_value(&mut self) -> Result<isize> {
self.next()
.ok_or("missing value".into())
.and_then(|v| v.parse::<isize>().chain_err(|| ""))
}
}
#[cfg(test)]
mod tests {
use super::*;
use std::str::FromStr;
#[test]
fn test_assembunny() {
let instructions: Instructions = "cpy 41 a
inc a
inc a
dec a
jnz a 2
dec a"
.parse()
.unwrap();
let mut assembunny = Assembunny {
registers: Registers::new(),
instructions: instructions,
};
let registers = assembunny.next().unwrap();
assert_eq!(registers[Register::A], 41);
assert_eq!(registers[Register::B], 0);
let registers = assembunny.next().unwrap();
assert_eq!(registers[Register::A], 42);
assert_eq!(registers[Register::C], 0);
let registers = assembunny.last().unwrap();
assert_eq!(registers[Register::A], 42);
assert_eq!(registers[Register::PC], 6);
}
#[test]
fn test_toggle_integration() {
let instructions: Instructions = "cpy 2 a
tgl a
tgl a
tgl a
cpy 1 a
dec a
dec a"
.parse()
.unwrap();
let assembunny = Assembunny {
registers: Registers::new(),
instructions: instructions,
};
let registers = assembunny.last().unwrap();
assert_eq!(registers[Register::A], 3);
assert_eq!(registers[Register::PC], 7);
}
#[test]
fn test_toggle() {
let instructions: Instructions = "tgl a"
.parse()
.unwrap();
let mut assembunny = Assembunny {
registers: Registers::new(),
instructions: instructions,
};
assembunny.toggle(0);
assert_eq!(assembunny.instruction(0),
Some(Instruction::Inc(Variable::Register(Register::A))));
assembunny.toggle(0);
assert_eq!(assembunny.instruction(0),
Some(Instruction::Dec(Variable::Register(Register::A))));
assembunny.toggle(0);
assert_eq!(assembunny.instruction(0),
Some(Instruction::Inc(Variable::Register(Register::A))));
}
#[test]
fn test_instructions_from_str() {
let i: Instructions = "cpy 41 a
inc a
inc a
dec a
jnz a 2
dec a"
.parse()
.unwrap();
assert_eq!(i.0.len(), 6);
assert_eq!(i.0[0], Instruction::from_str("cpy 41 a").unwrap());
}
#[test]
fn test_instruction_from_str() {
assert!(Instruction::from_str("").is_err());
assert!(Instruction::from_str("omg").is_err());
assert!(Instruction::from_str("inc 5").is_err());
assert_eq!(Instruction::from_str("cpy 41 a").unwrap(),
Instruction::Cpy(Variable::Value(41),
Variable::Register(Register::A)));
assert_eq!(Instruction::from_str("inc a").unwrap(),
Instruction::Inc(Variable::Register(Register::A)));
assert_eq!(Instruction::from_str("dec b").unwrap(),
Instruction::Dec(Variable::Register(Register::B)));
assert_eq!(Instruction::from_str("jnz c 2").unwrap(),
Instruction::Jnz(Variable::Register(Register::C),
Variable::Value(2)));
assert_eq!(Instruction::from_str("tgl a").unwrap(),
Instruction::Tgl(Variable::Register(Register::A)));
}
}

@ -1,43 +0,0 @@
use std::collections::HashSet;
use std::f32::consts::PI;
pub fn solve(input: &str) -> String {
let mut turtle = (-PI / 2.0, (0, 0));
let mut visited: HashSet<(i32, i32)> = HashSet::new();
for step in input.split(", ") {
let mut chars = step.chars();
let dir = chars.next().unwrap();
let blocks = chars.collect::<String>().parse::<i32>().unwrap();
turtle.0 += match dir {
'R' => PI / 2.0,
'L' => -PI / 2.0,
_ => {
unreachable!();
}
};
for _ in 0..blocks {
let movement = turtle.0.sin_cos();
(turtle.1).0 += movement.1 as i32;
(turtle.1).1 += movement.0 as i32;
if visited.contains(&turtle.1) {
return ((turtle.1).0.abs() + (turtle.1).1.abs()).to_string()
} else {
visited.insert(turtle.1);
}
}
}
((turtle.1).0.abs() + (turtle.1).1.abs()).to_string()
}
#[test]
fn test_solve() {
// assert_eq!(solve("R2, L3"), "5".to_string());
// assert_eq!(solve("R2, R2, R2"), "2".to_string());
// assert_eq!(solve("R5, L5, R5, R3"), "12".to_string());
assert_eq!(solve("R8, R4, R4, R8"), "4".to_string());
}

@ -1,115 +0,0 @@
use std::char;
pub fn solve(input: &str) -> String {
let arrangement = vec![
vec![None, None, Some('1'), None, None],
vec![None, Some('2'), Some('3'), Some('4'), None],
vec![Some('5'), Some('6'), Some('7'), Some('8'), Some('9')],
vec![None, Some('A'), Some('B'), Some('C'), None],
vec![None, None, Some('D'), None, None],
];
let mut keypad = Keypad {
arrangement: arrangement,
current: (0, 2),
};
let mut answer = String::new();
for c in input.chars() {
match c {
'U' => {
keypad.move_(Dir::Up);
}
'D' => {
keypad.move_(Dir::Down);
}
'L' => {
keypad.move_(Dir::Left);
}
'R' => {
keypad.move_(Dir::Right);
}
'\n' => {
answer.push(keypad.button());
}
_ => {
unreachable!();
}
}
}
answer.push(keypad.button());
answer
}
#[test]
fn test_solve() {
let instructions = "ULL
RRDDD
LURDL
UUUUD";
assert_eq!(solve(instructions), "5DB3".to_string());
}
struct Keypad {
arrangement: Vec<Vec<Option<char>>>,
current: (usize, usize),
}
impl Keypad {
fn move_(&mut self, dir: Dir) {
let (dx, dy): (isize, isize) = match dir {
Dir::Up => (0, -1),
Dir::Down => (0, 1),
Dir::Left => (-1, 0),
Dir::Right => (1, 0),
};
let x = (self.current.0 as isize + dx) as usize;
let y = (self.current.1 as isize + dy) as usize;
if self.button_at(x, y).is_some() {
self.current = (x, y);
}
}
fn button(&self) -> char {
let (x, y) = self.current;
self.arrangement[y][x].unwrap()
}
fn button_at(&self, x: usize, y: usize) -> Option<char> {
self.arrangement.get(y).and_then(|row| row.get(x).and_then(|c| *c))
}
}
enum Dir {
Up,
Down,
Left,
Right,
}
#[test]
fn test_keypad() {
let arrangement = vec![
vec!['1', '2', '3'],
vec!['4', '5', '6'],
vec!['7', '8', '9'],
]
.iter()
.map(|row| row.iter().map(|x| Some(*x)).collect())
.collect();
let mut keypad = Keypad {
arrangement: arrangement,
current: (1, 1),
};
assert_eq!(keypad.button_at(1, 1), Some('5'));
assert_eq!(keypad.button(), '5');
keypad.move_(Dir::Up);
assert_eq!(keypad.button(), '2');
keypad.move_(Dir::Up);
assert_eq!(keypad.button(), '2');
}

@ -1,33 +0,0 @@
pub fn solve(input: &str) -> String {
let parsed = input.lines()
.map(|line| {
line.split_whitespace().map(str::parse).collect::<Result<Vec<usize>, _>>()
})
.collect::<Result<Vec<_>, _>>()
.expect("couldn't parse input");
let count = parsed.chunks(3)
.flat_map(|chunk| {
vec![
Triangle(chunk[0][0], chunk[1][0], chunk[2][0]),
Triangle(chunk[0][1], chunk[1][1], chunk[2][1]),
Triangle(chunk[0][2], chunk[1][2], chunk[2][2]),
]
})
.filter(Triangle::is_valid)
.count();
count.to_string()
}
struct Triangle(usize, usize, usize);
impl Triangle {
fn is_valid(&self) -> bool {
self.0 + self.1 > self.2 && self.0 + self.2 > self.1 &&
self.1 + self.2 > self.0
}
}
#[test]
fn test_triangle() {
assert!(!Triangle(5, 10, 25).is_valid());
}

@ -1,104 +0,0 @@
use std::char;
use std::cmp::Ordering;
use std::collections::HashMap;
use errors::*;
use regex::Regex;
pub fn solve(input: &str) -> Result<String> {
let rooms: Vec<(Room, String)> = input.lines()
.map(|line| {
let re = Regex::new(r"(?P<room>.+)\[(?P<checksum>.+)\]").unwrap();
let caps = re.captures(line).ok_or("")?;
let room = caps.name("room").unwrap();
let checksum = caps.name("checksum").unwrap();
Room::new(room).map(|room| (room, checksum.into()))
})
.collect::<Result<_>>()?;
let mut real_rooms = rooms.iter()
.filter(|&&(ref room, ref checksum)| room.checksum() == *checksum)
.map(|&(ref room, _)| room);
let room = real_rooms.find(|room| room.name().contains("north")).ok_or("")?;
Ok(room.sector_id.to_string())
}
#[test]
fn test_solve() {}
struct Room {
encrypted_name: String,
sector_id: usize,
}
impl Room {
fn new(s: &str) -> Result<Self> {
let re = Regex::new(r"(?P<name>.+)-(?P<id>\d+)").unwrap();
let caps = re.captures(s).ok_or("")?;
let name = caps.name("name").unwrap();
let id = caps.name("id").unwrap().parse().chain_err(|| "")?;
Ok(Room {
encrypted_name: name.into(),
sector_id: id,
})
}
fn checksum(&self) -> String {
let mut counts = HashMap::new();
for c in self.encrypted_name.chars().filter(|c| c.is_alphabetic()) {
*counts.entry(c).or_insert(0) += 1;
}
let mut counts: Vec<_> = counts.iter().collect();
counts.sort_by(|a, b| {
match b.1.cmp(a.1) {
Ordering::Equal => a.0.cmp(b.0),
x => x,
}
});
counts.iter().take(5).map(|x| *x.0).collect()
}
fn name(&self) -> String {
self.encrypted_name.chars().map(|c| {
match c {
'-' => ' ',
c => {
let digit = c.to_digit(36).unwrap() - 10;
let shifted = (digit + self.sector_id as u32) % 26;
char::from_digit(shifted + 10, 36).unwrap()
},
}
}).collect()
}
}
#[test]
fn test_new() {
let room = Room::new("aaaaa-bbb-z-y-x-123").unwrap();
assert_eq!(room.encrypted_name, "aaaaa-bbb-z-y-x".to_string());
assert_eq!(room.sector_id, 123);
}
#[test]
fn test_checksum() {
let room = Room::new("aaaaa-bbb-z-y-x-123").unwrap();
assert_eq!(room.checksum(), "abxyz".to_string());
let room = Room::new("a-b-c-d-e-f-g-h-987").unwrap();
assert_eq!(room.checksum(), "abcde".to_string());
let room = Room::new("not-a-real-room-404").unwrap();
assert_eq!(room.checksum(), "oarel".to_string());
let room = Room::new("totally-real-room-200").unwrap();
assert_ne!(room.checksum(), "decoy".to_string());
}
#[test]
fn test_name() {
let room = Room::new("qzmt-zixmtkozy-ivhz-343").unwrap();
assert_eq!(room.name(), "very encrypted name");
}

@ -1,70 +0,0 @@
use std::char;
use std::collections::HashMap;
use crypto::digest::Digest;
use crypto::md5::Md5;
use errors::*;
pub fn solve(input: &str) -> Result<String> {
let mut pw = Password::new(input.trim());
let mut solution = HashMap::new();
while solution.len() < 8 {
let candidate = pw.next().unwrap();
if candidate.0 < 8 {
solution.entry(candidate.0).or_insert(candidate.1);
}
}
let mut v = solution.iter().collect::<Vec<_>>();
v.sort();
Ok(v.iter().map(|x| *x.1).collect::<String>())
}
struct Password {
id: String,
index: usize,
md5: Md5,
}
impl Password {
fn new(id: &str) -> Self {
Password{id: id.into(), index: 0, md5: Md5::new()}
}
}
impl Iterator for Password {
type Item = (usize, char);
fn next(&mut self) -> Option<(usize, char)> {
let mut result = None;
let mut hash = [0; 16];
while result.is_none() {
let input = format!("{}{}", self.id, self.index);
self.index += 1;
self.md5.input_str(&input);
self.md5.result(&mut hash);
self.md5.reset();
if hash[0] as u16 + hash[1] as u16 + (hash[2] >> 4) as u16 == 0 {
let pos = (hash[2] & 0b00001111) as usize;
let c = char::from_digit((hash[3] >> 4) as u32, 16).unwrap();
result = Some((pos, c));
break
}
}
result
}
}
#[test]
fn test_password() {
let mut pw = Password{id: "abc".into(), index: 3231928, md5: Md5::new()};
assert_eq!(pw.next(), Some((1, '5'.into())));
assert_eq!(pw.index, 3231930);
let mut pw = Password{id: "abc".into(), index: 5017308, md5: Md5::new()};
assert_eq!(pw.next(), Some((8, 'f'.into())));
// assert_eq!(pw.next(), Some((4, 'e'.into())));
}

@ -1,44 +0,0 @@
use std::collections::HashMap;
use errors::*;
pub fn solve(input: &str) -> Result<String> {
let mut counters = HashMap::new();
for line in input.lines() {
for (i, c) in line.chars().enumerate() {
let mut col = counters.entry(i).or_insert_with(HashMap::new);
*col.entry(c).or_insert(0) += 1
}
}
let mut counters: Vec<_> = counters.iter().collect();
counters.sort_by_key(|&(idx, _)| idx);
Ok(counters.iter()
.map(|&(_, col)| {
let mut v: Vec<_> = col.iter().collect();
v.sort_by_key(|&(_, count)| count);
v.iter().map(|&(chr, _)| *chr).last().unwrap()
})
.collect())
}
#[test]
fn test_solve() {
let input = "eedadn
drvtee
eandsr
raavrd
atevrs
tsrnev
sdttsa
rasrtv
nssdts
ntnada
svetve
tesnvt
vntsnd
vrdear
dvrsen
enarar";
assert_eq!(solve(input).unwrap(), "easter".to_string());
}

@ -1,113 +0,0 @@
use errors::*;
pub fn solve(input: &str) -> Result<String> {
Ok(input.lines()
.map(|x| IP7::new(x))
.filter(IP7::supports_ssl)
.count()
.to_string())
}
pub struct IP7 {
supernets: Vec<String>,
hypernets: Vec<String>,
}
impl IP7 {
fn new(s: &str) -> Self {
let mut current = String::new();
let mut supernets = Vec::new();
let mut hypernets = Vec::new();
for c in s.chars() {
match c {
'[' => {
supernets.push(current);
current = String::new();
}
']' => {
hypernets.push(current);
current = String::new();
}
c => current.push(c),
}
}
supernets.push(current);
IP7 {
supernets: supernets,
hypernets: hypernets,
}
}
pub fn supports_tls(&self) -> bool {
self.supernets.iter().any(|x| Self::abba(x)) &&
self.hypernets.iter().all(|x| !Self::abba(x))
}
fn supports_ssl(&self) -> bool {
let abas: Vec<String> =
self.supernets.iter().flat_map(|x| {
Self::abas(x).iter().map(|aba| {
let mut c = aba.chars();
let a = c.next().unwrap();
let b = c.next().unwrap();
format!("{}{}{}", b, a, b)
}).collect::<Vec<_>>()
}).collect();
self.hypernets.iter().any(|x| abas.iter().any(|y| x.contains(y)))
}
fn abba(s: &str) -> bool {
let v: Vec<_> = s.chars().collect();
v.windows(4).any(|w| (w[0] != w[1]) && (w[0] == w[3]) && (w[1] == w[2]))
}
fn abas(s: &str) -> Vec<String> {
let v: Vec<_> = s.chars().collect();
v.windows(3)
.filter(|w| (w[0] != w[1]) && (w[0] == w[2]))
.map(|w| w.iter().cloned().collect())
.collect()
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_new() {
let ip = IP7::new("abba[mnop]qrst");
assert_eq!(ip.supernets, vec!["abba".to_string(), "qrst".to_string()]);
assert_eq!(ip.hypernets, vec!["mnop".to_string()]);
}
#[test]
fn test_abba() {
assert!(IP7::abba("abba"));
assert!(!IP7::abba("abcd"));
}
#[test]
fn test_supports_tls() {
assert_eq!(IP7::new("abba[mnop]qrst").supports_tls(), true);
assert_eq!(IP7::new("abcd[bddb]xyyx").supports_tls(), false);
assert_eq!(IP7::new("aaaa[qwer]tyui").supports_tls(), false);
assert_eq!(IP7::new("ioxxoj[asdfgh]zxcvbn").supports_tls(), true);
}
#[test]
fn test_abas() {
assert_eq!(IP7::abas("zazbz"),
vec!["zaz".to_string(), "zbz".to_string()]);
}
#[test]
fn test_supports_ssl() {
assert!(IP7::new("aba[bab]xyz").supports_ssl());
assert!(!IP7::new("xyx[xyx]xyx").supports_ssl());
assert!(IP7::new("aaa[kek]eke").supports_ssl());
assert!(IP7::new("zazbz[bzb]cdb").supports_ssl());
}
}

@ -1,149 +0,0 @@
use std::collections::HashMap;
use std::fmt;
use regex::Regex;
use errors::*;
pub fn solve(input: &str) -> Result<String> {
let rect_re = Regex::new(r"rect (\d+)x(\d+)").unwrap();
let rotate_re = Regex::new(r"rotate (column x|row y)=(\d+) by (\d+)").unwrap();
let mut screen = Screen::new(50, 6);
for line in input.lines() {
if let Some(caps) = rect_re.captures(line) {
screen.rect(caps[1].parse().unwrap(), caps[2].parse().unwrap());
} else if let Some(caps) = rotate_re.captures(line) {
let index = caps[2].parse().unwrap();
let count = caps[3].parse().unwrap();
if &caps[1] == "column x" {
screen.rotate_col(index, count);
} else if &caps[1] == "row y" {
screen.rotate_row(index, count);
}
} else {
return Err(format!("unexpected input: '{}'", line).into());
}
}
Ok(format!("{}", screen.pixels.iter().filter(|&(_, &v)| v).count()))
// Ok(format!("{}", screen))
}
#[derive(Eq,Hash,PartialEq)]
struct Point(usize, usize);
type Pixel = bool;
pub struct Screen {
width: usize,
height: usize,
pixels: HashMap<Point, Pixel>,
}
impl Screen {
fn new(width: usize, height: usize) -> Self {
Screen {
width: width,
height: height,
pixels: HashMap::new(),
}
}
fn rect(&mut self, x: usize, y: usize) {
for x in 0..x {
for y in 0..y {
self.pixels.insert(Point(x, y), true);
}
}
}
fn rotate_col(&mut self, index: usize, count: usize) {
let count = count % self.height;
let mut col = (0..self.height)
.map(|y| self.pixels.get(&Point(index, y)).cloned().unwrap_or(false))
.collect::<Vec<_>>();
let col = Self::rotate(&mut col, count);
for (y, &pixel) in col.iter().enumerate() {
self.pixels.insert(Point(index, y), pixel);
}
}
fn rotate_row(&mut self, index: usize, count: usize) {
let count = count % self.width;
let mut row = (0..self.width)
.map(|x| self.pixels.get(&Point(x, index)).cloned().unwrap_or(false))
.collect::<Vec<_>>();
let row = Self::rotate(&mut row, count);
for (x, &pixel) in row.iter().enumerate() {
self.pixels.insert(Point(x, index), pixel);
}
}
fn rotate<T: Clone>(v: &mut Vec<T>, count: usize) -> Vec<T> {
let count = v.len() - count - 1;
v[(count + 1)..].iter().chain(v[0...count].iter()).cloned().collect()
}
}
impl fmt::Display for Screen {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let s = (0..self.height)
.map(|y| {
(0..self.width)
.map(|x| {
if self.pixels.get(&Point(x, y)).cloned().unwrap_or(false) {
'#'
} else {
'.'
}
})
.collect::<String>()
})
.collect::<Vec<_>>()
.join("\n");
write!(f, "{}", s)
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_screen() {
let mut screen = Screen::new(7, 3);
assert_eq!(format!("{}", screen),
".......
.......
.......");
screen.rect(3, 2);
assert_eq!(format!("{}", screen),
"###....
###....
.......");
screen.rotate_col(1, 1);
assert_eq!(format!("{}", screen),
"#.#....
###....
.#.....");
screen.rotate_row(0, 4);
assert_eq!(format!("{}", screen),
"....#.#
###....
.#.....");
screen.rotate_col(1, 1);
assert_eq!(format!("{}", screen),
".#..#.#
#.#....
.#.....");
}
}

@ -1,37 +0,0 @@
use std::str;
use errors::*;
pub fn solve(_: &str) -> Result<String> {
Ok("".into())
}
struct Decompress<'a> {
chars: str::Chars<'a>,
}
impl<'a> Decompress<'a> {
fn new(input: &'a str) -> Self {
Decompress{chars: input.chars()}
}
}
impl<'a> Iterator for Decompress<'a> {
type Item = char;
fn next(&mut self) -> Option<char> {
self.chars.next()
}
}
#[cfg(test)]
mod tests {
use super::Decompress;
#[test]
fn test_no_markers() {
let mut decompress = Decompress::new("ADVENT");
let output: String = decompress.collect();
assert_eq!(output, "ADVENT");
}
}

@ -1,64 +0,0 @@
use std::collections::HashMap;
use regex::Regex;
use errors::*;
pub fn solve(input: &str) -> Result<String> {
Ok("".into())
}
struct Factory {
bots: HashMap<usize, Bot>,
}
impl Factory {
fn parse(input: &str) -> Result<Self> {
let re =
Regex::new(r"bot (\d+) gives low to bot (\d+) and high to bot (\d+)")
.unwrap();
let mut bots = HashMap::new();
for line in input.lines() {
if let Some(caps) = re.captures(line) {
let id = caps[1].parse().unwrap();
bots.insert(id,
Bot {
id: id,
values: Vec::new(),
});
}
}
Ok(Factory { bots: bots })
}
}
struct Bot {
id: usize,
values: Vec<usize>,
}
impl Bot {
fn push(&mut self, value: usize) {
self.values.push(value);
}
}
#[test]
fn test_factory() {
let input = "value 5 goes to bot 2
bot 2 gives low to bot 1 and high to bot 0
value 3 goes to bot 1
bot 1 gives low to output 1 and high to bot 0
bot 0 gives low to output 2 and high to output 0
value 2 goes to bot 2";
let mut factory = Factory::parse(input).unwrap();
assert_eq!(factory.bots.len(), 1);
let mut bot = factory.bots.get_mut(&2).unwrap();
bot.push(2);
assert_eq!(bot.values, vec![2]);
// After running, outputs are 5, 2, 3.
}

@ -1,284 +0,0 @@
use regex;
use std::convert::TryFrom;
use std::str;
use errors::*;
// You come upon a column of four floors that have been entirely sealed off from the rest of the
// building except for a small dedicated lobby. There are some radiation warnings and a big sign
// which reads "Radioisotope Testing Facility".
struct Facility {
floors: Vec<Floor>,
}
#[derive(Debug, PartialEq)]
struct Floor {
items: Vec<Item>,
}
impl Floor {
fn generators(&self) -> Vec<String> {
self.items.iter().map(|item| {
match *item {
Item::Generator(ref s) => Some(s),
_ => None,
}
}).flat_map(|x| x).cloned().collect()
}
fn microchips(&self) -> Vec<String> {
self.items.iter().map(|item| {
match *item {
Item::Microchip(ref s) => Some(s),
_ => None,
}
}).flat_map(|x| x).cloned().collect()
}
}
#[test]
fn test_generators_and_microchips() {
let items = vec![
Item::Generator("a".into()),
Item::Microchip("b".into()),
];
let floor = Floor{items};
assert_eq!(floor.generators(), vec!["a".to_string()]);
assert_eq!(floor.microchips(), vec!["b".to_string()]);
}
#[derive(Clone, Debug, PartialEq)]
enum Item {
Generator(String),
Microchip(String),
}
impl<'a> TryFrom<regex::Captures<'a>> for Item {
type Err = Error;
fn try_from(c: regex::Captures) -> Result<Item> {
let element = c.name("element").ok_or("missing element name")?;
let itemtype = c.name("itemtype").ok_or("missing item type")?;
match itemtype {
"generator" => { Ok(Item::Generator(element.into())) },
"microchip" => { Ok(Item::Microchip(element.into())) },
_ => { Err(format!("invalid item type: '{}", itemtype).into()) },
}
}
}
// According to the project status board, this facility is currently being used to experiment with
// Radioisotope Thermoelectric Generators (RTGs, or simply "generators") that are designed to be
// paired with specially-constructed microchips. Basically, an RTG is a highly radioactive rock
// that generates electricity through heat.
//
// The experimental RTGs have poor radiation containment, so they're dangerously radioactive. The
// chips are prototypes and don't have normal radiation shielding, but they do have the ability to
// generate an electromagnetic radiation shield when powered. Unfortunately, they can only be
// powered by their corresponding RTG. An RTG powering a microchip is still dangerous to other
// microchips.
//
// In other words, if a chip is ever left in the same area as another RTG, and it's not connected
// to its own RTG, the chip will be fried. Therefore, it is assumed that you will follow procedure
// and keep chips connected to their corresponding RTG when they're in the same room, and away from
// other RTGs otherwise.
impl Floor {
fn is_safe(&self) -> bool {
if self.generators().is_empty() {
return true;
}
let generators = self.generators();
let microchips = self.microchips();
let unpaired_chips = microchips.iter().filter(|microchip| {
!generators.contains(&microchip)
});
unpaired_chips.count() == 0
}
}
#[test]
fn test_is_safe() {
assert!(Floor{items: Vec::new()}.is_safe());
assert!(Floor{items: vec![Item::Generator("".into())]}.is_safe());
assert!(Floor{items: vec![Item::Microchip("a".into())]}.is_safe());
let items = vec![Item::Generator("a".into()), Item::Microchip("b".into())];
assert!(!Floor{items}.is_safe());
let items = vec![
Item::Generator("a".into()),
Item::Microchip("a".into()),
Item::Generator("b".into()),
];
assert!(Floor{items}.is_safe());
}
// These microchips sound very interesting and useful to your current activities, and you'd like to
// try to retrieve them. The fourth floor of the facility has an assembling machine which can make
// a self-contained, shielded computer for you to take with you - that is, if you can bring it all
// of the RTGs and microchips.
//
// Within the radiation-shielded part of the facility (in which it's safe to have these
// pre-assembly RTGs), there is an elevator that can move between the four floors. Its capacity
// rating means it can carry at most yourself and two RTGs or microchips in any combination.
// (They're rigged to some heavy diagnostic equipment - the assembling machine will detach it for
// you.) As a security measure, the elevator will only function if it contains at least one RTG or
// microchip. The elevator always stops on each floor to recharge, and this takes long enough that
// the items within it and the items on that floor can irradiate each other. (You can prevent this
// if a Microchip and its Generator end up on the same floor in this way, as they can be connected
// while the elevator is recharging.)
//
// You make some notes of the locations of each component of interest (your puzzle input). Before
// you don a hazmat suit and start moving things around, you'd like to have an idea of what you
// need to do.
//
// When you enter the containment area, you and the elevator will start on the first floor.
//
// For example, suppose the isolated area has the following arrangement:
//
// The first floor contains a hydrogen-compatible microchip and a lithium-compatible microchip.
// The second floor contains a hydrogen generator.
// The third floor contains a lithium generator.
// The fourth floor contains nothing relevant.
// As a diagram (F# for a Floor number, E for Elevator, H for Hydrogen, L for Lithium, M for Microchip, and G for Generator), the initial state looks like this:
impl str::FromStr for Facility {
type Err = Error;
fn from_str(input: &str) -> Result<Self> {
let floors = input.lines()
.map(|line| line.parse::<Floor>())
.collect::<Result<Vec<_>>>()?;
Ok(Facility{floors})
}
}
#[test]
fn test_facility_from_str() {
let input = "The first floor contains a hydrogen-compatible microchip and a lithium-compatible microchip.
The second floor contains a hydrogen generator.
The third floor contains a lithium generator.
The fourth floor contains nothing relevant.";
let facility: Facility = input.parse().unwrap();
assert_eq!(facility.floors.len(), 4);
assert_eq!(facility.floors[1], Floor{items: vec![Item::Generator("hydrogen".into())]});
}
impl str::FromStr for Floor {
type Err = Error;
fn from_str(input: &str) -> Result<Self> {
// Ok(Floor{items: Vec::new()})
let re = regex::Regex::new(r"(?P<element>\w+)(-compatible)? (?P<itemtype>generator|microchip)").unwrap();
re.captures_iter(input)
.map(|captures| Item::try_from(captures))
.collect::<Result<Vec<_>>>()
.map(|items| Floor{items} )
}
}
#[test]
fn test_floor_from_str() {
let input = "The first floor contains a hydrogen-compatible microchip and \
a lithium-compatible microchip.";
let floor: Floor = input.parse().unwrap();
assert_eq!(floor.items.len(), 2);
assert!(floor.items.contains(&Item::Microchip("hydrogen".into())));
assert!(floor.items.contains(&Item::Microchip("lithium".into())));
let input = "The first floor contains a hydrogen-compatible microchip and \
a lithium generator.";
let floor: Floor = input.parse().unwrap();
assert_eq!(floor.items.len(), 2);
assert!(floor.items.contains(&Item::Microchip("hydrogen".into())));
assert!(floor.items.contains(&Item::Generator("lithium".into())));
}
// F4 . . . . .
// F3 . . . LG .
// F2 . HG . . .
// F1 E . HM . LM
// Then, to get everything up to the assembling machine on the fourth floor, the following steps could be taken:
//
// Bring the Hydrogen-compatible Microchip to the second floor, which is safe because it can get power from the Hydrogen Generator:
//
// F4 . . . . .
// F3 . . . LG .
// F2 E HG HM . .
// F1 . . . . LM
// Bring both Hydrogen-related items to the third floor, which is safe because the Hydrogen-compatible microchip is getting power from its generator:
//
// F4 . . . . .
// F3 E HG HM LG .
// F2 . . . . .
// F1 . . . . LM
// Leave the Hydrogen Generator on floor three, but bring the Hydrogen-compatible Microchip back down with you so you can still use the elevator:
//
// F4 . . . . .
// F3 . HG . LG .
// F2 E . HM . .
// F1 . . . . LM
// At the first floor, grab the Lithium-compatible Microchip, which is safe because Microchips don't affect each other:
//
// F4 . . . . .
// F3 . HG . LG .
// F2 . . . . .
// F1 E . HM . LM
// Bring both Microchips up one floor, where there is nothing to fry them:
//
// F4 . . . . .
// F3 . HG . LG .
// F2 E . HM . LM
// F1 . . . . .
// Bring both Microchips up again to floor three, where they can be temporarily connected to their corresponding generators while the elevator recharges, preventing either of them from being fried:
//
// F4 . . . . .
// F3 E HG HM LG LM
// F2 . . . . .
// F1 . . . . .
// Bring both Microchips to the fourth floor:
//
// F4 E . HM . LM
// F3 . HG . LG .
// F2 . . . . .
// F1 . . . . .
// Leave the Lithium-compatible microchip on the fourth floor, but bring the Hydrogen-compatible one so you can still use the elevator; this is safe because although the Lithium Generator is on the destination floor, you can connect Hydrogen-compatible microchip to the Hydrogen Generator there:
//
// F4 . . . . LM
// F3 E HG HM LG .
// F2 . . . . .
// F1 . . . . .
// Bring both Generators up to the fourth floor, which is safe because you can connect the Lithium-compatible Microchip to the Lithium Generator upon arrival:
//
// F4 E HG . LG LM
// F3 . . HM . .
// F2 . . . . .
// F1 . . . . .
// Bring the Lithium Microchip with you to the third floor so you can use the elevator:
//
// F4 . HG . LG .
// F3 E . HM . LM
// F2 . . . . .
// F1 . . . . .
// Bring both Microchips to the fourth floor:
//
// F4 E HG HM LG LM
// F3 . . . . .
// F2 . . . . .
// F1 . . . . .
// In this arrangement, it takes 11 steps to collect all of the objects at the fourth floor for assembly. (Each elevator stop counts as one step, even if nothing is added to or removed from it.)
//
// In your situation, what is the minimum number of steps required to bring all of the objects to the fourth floor?
pub fn solve(input: &str) -> Result<String> {
return Ok("".into())
}
#[test]
fn test_solve() {
let input = "The first floor contains a hydrogen-compatible microchip and a lithium-compatible microchip.
The second floor contains a hydrogen generator.
The third floor contains a lithium generator.
The fourth floor contains nothing relevant.";
}

@ -1,13 +0,0 @@
use assembunny::*;
use errors::*;
pub fn solve(input: &str) -> Result<String> {
let instructions: Instructions = input.parse()?;
let mut registers = Registers::new();
registers[Register::C] = 1;
let assembunny = Assembunny{registers: registers, instructions: instructions};
let registers = assembunny.last().ok_or("")?;
let a = registers[Register::A];
Ok(a.to_string())
}

@ -1,13 +0,0 @@
use assembunny::*;
use errors::*;
pub fn solve(input: &str) -> Result<String> {
let instructions: Instructions = input.parse()?;
let mut registers = Registers::new();
registers[Register::A] = 12;
let assembunny = Assembunny{registers: registers, instructions: instructions};
let registers = assembunny.last().ok_or("")?;
let a = registers[Register::A];
Ok(a.to_string())
}

@ -1 +0,0 @@
error_chain!{}

@ -1,23 +0,0 @@
#![feature(field_init_shorthand, inclusive_range_syntax, try_from)]
#![recursion_limit = "1024"]
#[macro_use]
extern crate error_chain;
extern crate regex;
extern crate crypto;
mod assembunny;
pub mod errors;
pub mod day_01;
pub mod day_02;
pub mod day_03;
pub mod day_04;
pub mod day_05;
pub mod day_06;
pub mod day_07;
pub mod day_08;
// pub mod day_09;
// pub mod day_10;
pub mod day_11;
pub mod day_12;
pub mod day_23;

@ -1,29 +0,0 @@
use std::io;
use std::io::Read;
extern crate advent_of_code_2016;
use advent_of_code_2016::*;
use advent_of_code_2016::errors::*;
fn main() {
run(|| {
let mut input = String::new();
io::stdin().read_to_string(&mut input).ok();
let solution = day_11::solve(&input)?;
println!("{}", solution);
Ok(())
});
}
fn run<F>(f: F)
where F: Fn() -> Result<()>
{
if let Err(error) = f() {
for error in error.iter() {
println!("{}", error);
}
std::process::exit(1);
}
}

@ -1,2 +0,0 @@
3893445835429722678558456317563893861752455542588369533636585887178232467588827193173595918648538852463974393264428538856739259399322741844613957229674619566966921656443476317729968764183945899765294481327998956154956571467872487576314549468261122281384513266834769436913544431258253346374641589492728885222652146158261225296144835682556133922436438188211288458692217737145834468534829945993366314375465767468939773939978272968388546791547526366348163672162245585168892858977723516752284597322176349412485116173844733679871253985762643852151748396593275274582481295864991886985988427966155944392352248314629138972358467959614279553511247863869663526823326467571462371663396188951696286916979923587358992127741723727623235238531991996999181976664226274715591531566495345212849683589582225465555847312199122268773923175183128124556249916458878785361322713513153175157855597289482439449732469754748544437553251412476225415932478849961897299721228198262823515159848941742786272262236888514421279147329383465929358896761449135917829473321834267122759371247338155787774952626616791265889922959653887288735233291968146648533754958199821789499914763279869931218136266492627818972334549751282191883558361871277375851259751294611921756927694394977764633932938573132221389861617195291742156362494769521829599476753198422283287735888197584327719697758442462886311961723849326959213928195182293316227334998926839139915138472514686689887874559367524254175582135318545912361877139367538434683933333264146289842238921989275112323681356256979576948644489986951538689949884787173194457523474156229389465725473817651516136514446513436419126533875125645855223921197481833434658264655912731133356464193251635637423222227273192628825165993827511625956856754776849919858414375874943572889154281862749595896438581889424559988914658387293414662361364793844213298677236787998677166743945812899526292132465751582925131262933636228593134861363493849168168765261647652342891576445292462341171477487223253795935253493869317616741963486473

@ -1,17 +0,0 @@
157 564 120 495 194 520 510 618 244 443 471 473 612 149 506 138
1469 670 47 604 1500 238 1304 1426 54 749 1218 1409 60 51 1436 598
578 184 2760 3057 994 167 2149 191 2913 2404 213 1025 1815 588 2421 3138
935 850 726 155 178 170 275 791 1028 75 781 138 176 621 773 688
212 977 297 645 229 194 207 640 804 509 833 726 197 825 242 743
131 43 324 319 64 376 231 146 382 162 464 314 178 353 123 446
551 121 127 155 1197 288 1412 1285 557 137 145 1651 1549 1217 681 1649
1723 1789 5525 4890 3368 188 3369 4842 3259 2502 4825 163 146 2941 126 5594
311 2420 185 211 2659 2568 2461 231 2599 1369 821 506 2227 180 220 1372
197 4490 141 249 3615 3314 789 4407 169 352 4383 5070 5173 3115 132 3513
4228 2875 3717 504 114 2679 165 3568 3002 116 756 151 4027 261 4813 2760
651 3194 2975 2591 1019 835 3007 248 3028 1382 282 3242 296 270 3224 3304
1858 1650 1720 1848 95 313 500 1776 207 1186 72 259 281 1620 79 77
3841 3217 440 3481 3643 940 3794 4536 1994 4040 3527 202 193 1961 230 217
2837 2747 2856 426 72 78 2361 96 2784 2780 98 2041 2444 1267 2167 2480
411 178 4263 4690 3653 162 3201 4702 3129 2685 3716 147 3790 4888 79 165

@ -1,513 +0,0 @@
oaoe rxeq vssdqtu xrk cjv yaoqp loo
mveua dogbam szydvri hyzk lbega abzqw xwjn wniug kwbre
npaoy uivpxwd oynpa rcdk uixpvdw
yserir iikzcm ieuroca iuwcfov rvb giti crdpdcv mxpps
spyuhgo lucasl ucllsa bymnjig yflbv nxitmlf
xlxyhwz xla mpye fvjegwg fezlfrt inetrh vhg xpvstx ydhvq
xgue cvtmh myg ontvvyw ygm oqzrdrw
srdfsjf dli kccb kauk kauk apa doefc cdffkhh cdffkhh
msizb elqiov lqn epamk onmnlst baawab ncafwaf jrataml iyzhy svycuec
wdzqpcn dkgdumv wdzqpcn qxdmwib cjsigi bgcihgh fmua
kpvbzf kpvbzf svyq flg shwtgp
ywrynt cesjtgk hsvitr brpiul lxgvvrl cesjtgk cesjtgk xuflpfn
tik mrpht gkv unqp wypscc vmwiu ldrigk okbc wztc
zpy kyzvijv bilpf etbrgk edza vuz jzgn
yoa rgppd kzpopd cffjk murcb jmt raace iwt
aobgkja drc ztkd qskxxbv lve lev rhhoqex bmd eolf ybxjr yiiut
zhjcfms fpabnu aozp delsc mge yqi eovg pwefafe
gukf iys qztqxz xhsssz pfqq slg jdbp pfqq yabztc asow ygh
fmr ijgmjrc zbhwsmx ylgccz ycydcyx hjjset
zybsr iqisbs hffmij ikby lwufzvg gwd
ruk rku kur ydurp upmebe
baqide zdijcf ezqfe ovrldez delzrov szimd irmk busim ppv zepqk mlwpl
bxlvp dxumme byaada cgyn diz
xlxr jhili bmcke nkl vuhqsn lxzb zmyuxgk qcqr tyxe
wvth gyerrd yewrta kgri yewrta
fall jpyuusu lffybb ivmtmzx alfl yjupusu
lzvcg xwnt mjyiklh vwlz qejj mjyiklh dmcwq qejj
vgutb smc yvnsbgd bxmjd qmhia krxz luhgg emnrp
uuvhtia aiuutvh brstbr tsrbrb
howd japlq lhk qtsfdq htfufj qkyywy anxxxqw jtmryw cdtajh
pksswl jprpccl wpklss yyrbo
furp pfru bftha iekamfc bixwmr sslovex
nrqobo hyb byh hby
mugix kzlbtuq hmju ysstccs hmju btsuh
hsrlhw zilj jtvto zilj fjq
lvol xic hqqdeo gmsug yqe wue vhmrq buj juv wxexdot
lqeybb odpv mttm bxqy vqbqr ylbei wyjcxco urufsuz kyq
youbiz kvrea xsfcp zaz zybiou earvk qpf
bowsref ooobtic apiushu kplpyza
hxfhoyy ybbe ceebt recegzz ftnlv ukaf gpvx opvd lqnvk ybbe ygnwa
jpbgc aahm aahm aahm
qyvheb xyb elt oaksuj dvgpmel poiowc ykgbgpz dxpit ytg
vgsv yrjo vjss kyfvim izwo yrjo vgsv
hkk xmqx crlki dtp nuh okef okef xomktit viia nuh tplhrx
bmkjclx sbwe bwes bsbnqd nqbsbd
gfwrl vocwln hsuxkz zpclb qprrvlt bkcluvs pqy sxucrla npb fensz
adjklj nyr btmav roxv jrri vqfnis gzsab ogskmaj
bvjm fer ztgfx mtp vvhps hptzrar wpy yhvmh qklfwpf edgrdts vmhhy
lngra nrlga xokqu mgq
mksdk bkkbfsq hazlai nixee vyxh hpvebeg jujoqe wkw mzpxixm
kxrkkx qivtt xsm xsm rqvgdjl jilosjs rji
xiqga rez igqxa odiilj izoiwf xgqia
aepioo krcr aepioo jhigtx krcr qubkv jgo zybyvy wbsguz
ntyscmf duwvvb kga xvaypk sfjlg daguzm kqat otj zmnki
ggxaery jazo ggxaery zevobo zux wfnd wbyd hmhmo oaakvab jsimsw
vqdnvgy qiex yqeweds yqvdvgn iqcukgc bvrc osi
esjzak krwe ivbri hnbah iuvb begybsk ctxmlym gjqi lcscum
hyxdilx tsv evckza bdbscwj jlihiqk dciuj hamd dqsm ydihxxl
lurtwhx ygwf pwhj whxtrlu zfvywxr gcrl zvl wienpqb woto
mfaektr ocvho ukfx ukfx old daqwotk pybjtiz kumkiq tmql lqou tmql
guwy ceqsyvs svteymr nrovwz tesymrv rmsveyt
pigilsu zpyiohn zpyiohn xzl pryi zpyiohn ohdz
pziqfg hhrzdr wxl zpqigf
psnmnxz oed edo deo
tkdp tkdp auozn tfyo wmp jtp wjyskeh dag ojdvw gbptp deiqi
xkr nmsbk mreiv occcvva eca bupc gvaoopu jdhr flh ptgdumz mks
dlevn vmwzws dlevn dlevn
qwx qnuqgc rtzc yvym sft wxq fhv fts nyvrfxz ydjvcq tnwz
debkk pullndo ezaibw ldnloup nllupdo wiiw nij
hng rpd aud epq opzjh jnzge
rmtauf nwinyl nwnliy pjzahm lywnin
cgiv omva fos irse uytiqu iqjo riplx capa dhdl echbyjw cutfam
fqrqmi jfrj zllh gfhhq fqrqmi mmyqv
yoepae uabuxlz jzqy yoepae sxena jzqy
bfr jlrycal ndg xejwjdp khwg wckevqb tud xljzem ntfbazf lkr
aomdwt sji sij jsi wlsvvva kgjzqj whhf
ogorbil orlgiob iorlbog xapwiqs jxb
tnn sxgdikv ynick ynick aumwthl rwhx eqxd jdbzyk kbil pmnifp dpeips
vzeoilq son olqvh jawmny
vsifce kcighpn mubl zkgwm
ncagxs ilohd lyq oqhjf nfeij qmtvf qpru tfmtaj
pfjkcpr dqrfde efqddr edqdrf
wdyygax hscx ptmro wqko ecnfkhj ywui
gdv nrnrzdc vyq vyq vesrj vyq jwxg
oqhrr daoew zpoduh zwmoss nfkh vubf xza kju rhrpt fvsc
oqp ppyq swvin mut uacwd swivn ucdaw icfj ldcujh cejl
dar bqp ajdhuej sxwt bqp tppexrh tppexrh
sitplaj xnb ldopp mqd gwtk uhnvozu ljz dqm ylzy qltf gwtjksx
eqkvncb jdp pahwje avhrer awb zqnwfhx zohmcz fitbyab
xlnel gjzviy cndpuoj jvwxs qsd kwli quisju kyoix imzg
czqjkk evyima ixpelbv eobpd wwuxxof pbxc dgj
czsigs lbdaynp amsexn aemsxn easnmx rsitdzf
xdpc xfbp lrjwlo ntnnob sbe bse
suud fws zgn kvfimsi
wnexa diexvky oemdq uasxzhq qxa kevyixd lpw unluohs
ylruxt beqvn vbenq ogsov mvftu sovog gshtb qriaxko vthgfr jwj
gmz wcjb cqjlb hijz qwuluuf xdpu jybdf ajiv xizwb
fcxos spz idg rjb uhr ert bxia urh xfxp ixba bnvxy
uxiie eixiu wgmwbj euiix qknyd wtaojk naeqfz qmhnulk uscgwxa
qwyxd jno xelqd isdjht qxz dbwnr bfzhewu opxmkgj igfiuck
ljpphwc ijzic pfsemsc mfedoxy pad wsk beqjpbj gbjr imce xumhr
causc ogypj csacu pdokc itpgjl xfx nyt yytg srhrup bontz xbalwnj
asohjj qer pfgwo qgdw wgdq
gpzvyhh tsnx tyu kswlgb whju zkkpdm bmh hdov
unux lhrn unux lhrn rxr
epq ksew pqct jib pqebafk jib pyfjy gnu pqct
anzbbs oyhm moyh mhyo
dpk zael zael mxots zfcum
aehljyc wrj lfhife xbss ztszba vlg eljycah ihffle coypll
aoqedco bogk bogk aoqedco sanwwo
udmbz yxe dft rzolgtp nwwjpti
efu qcls rtx mestnqt pkh ciekj scrv uswd oroowx lcztvt
urnwt uapni ood lzce
zjiqxt jzqxti infgde xbmi kawilp kaipwl
lsfn kxfw zgzdfq meqwql zpqqu otert
taajsho gbeoguv bpi nxeuy
dpoyzi rqlzx rqlzx udhuwjm qnu bnuma udhuwjm gfezx cbjpfp woir
mjbv isni ixjtjue fwsk ncgwpn vqnmq pivz jbmv qoakqou argval dacvksc
xxjcn amdgdhh iup hlk xxjcn elx
gyhocay ofqosv nldfqay aqu dsrz lmekze bus lmekze gfoq lmekze vkor
xidyqq bimvxu zrkg rpcdca ymg nmxkkqu gygcmp euemr
gvd ywog ywog gvd hwjzzq
byu ggpwrl lpexjcf hgy jee febgcae valcgc tcfwicu texqi lxfjepc qeraxcs
lkjejsb eonp jtsbps pfvlos neop ikwnb avzxnk
big pjgttfb eetr jobjfae odvl jheh tuz ystrh tuz tuz ige
czubaxq czubaxq pbxgs jhuopn snmhhc qwmcka xdhxfuz jhuopn eummw
xdwduc sqcano zopaco ozbbc bczob eas cbbzo
oanpgo tiav bbssup ttzchih tpb xmfnqwa ghdx uepmz fzqbx
ahha zsbdq jggv zfcjdp dzcfpj dkew jxmelbf jgsohj oghsjj
awdy plulzw gdi jiiq lod rog mrf uihaz sebk guvb
tlhwro sapaws ovlbbfh xctruk spzpzm latyy
ligaot xfhacs jvk xbnpu yuanx yvvi gjek
nfwuug nxccj dxpfvfq pvxcvy ayss lfwz wwole ewowl xceybeb efs zfwl
lzowlql armo yrlgfg kbl vudahci yav evdi ofak ysmfjk upe
qtmmqrl gxi rrhbi pydbopp yvevlq ovwwdrt mrppov lzzs yjyrxh srzo
hytkyas wpuqvf fftiso fftiso
yutais qjdbzo kewsi opy ysl zyvyoty wkp
qtbad bxfjkwa stcdk lyre tabdq yler
friyh ivp hshy ksmanzq mzdbbub ncbx mhzki friyh vyjk hshy
ijeysr aww evn ttqvshg xkd zjy honvuqy zyj quvyohn gphcir
okft smja fkto etb
pbi zhyy kyjdho mqsuyic vegocmw gdkskg kgavjag dbqh wamfijz ktihnrg
csqix soz ingra gvslgk
ugxgzqt pdn hiynufo lpfabmi rmwj uhsqoo pmlzad ferdup guzqtxg voxd
wkixiq vck vck sylv ttqcbwv ywqta vblz mhohx frv
phns ozeghgm dfodkyv iyc psnh tedotyz xqz gqbyj ydttezo kxgju mvip
chc jdjo pyq usyn vtrbnq ohnx dsxpdzn mgbc ysun mlalmu mqemyuw
qrkosx wcwcv brvbwo nvxwg bvrwob
bovt gpb rwm gpb pitttl rwm rvfzn tbo
zczkb tmpwtj kackkx yzqkzso rsg ema ereo jptvfd jptvfd flbjfii
fcdyetv jqelvx jlevqx cfvetyd
dtyp wfh rxtpwr nolbro iozrs mnshu tkesvyk pkmkf
lvecoh ohpb brlqwx immgqe dzfac bwlrxq hng clxmpd qodfyv
sjbc dsoqk dqosk iyla lqzrsgi tjgt mfxshtd ztmc
nxveg vmxf jwnub kujji aqkonjl xtit xitt
jsft pmojruo vtvjox wimrlhj rezqi rnv hjnvdka
vnl vzgltnl mry kkqf fekwjw knsrvt nct kqy infvys
jbvm igq gvcl crry ylia nbqcq ouduen jklepay
ermsf emrsf uksuvz zrnlun
ecksf dkydasw wddasky pmfhi yltmedt bdovedg vfnyoze ufcki civrjs ohozga
hvf gfqgc adbeykt jdz zmgonhi yua kifxyoy umsza ivnbvoc whnpi gtbinze
nmy fsdu myn iiw
yrkwca jkxc yrkwca yrkwca kxqtvqh
ildxc taopx spykdz dzbpcxp wzgka cbyr xpvrzbk
qqp axdmvo cmppp shx
uldyu luyud uduly rgcmugh
woc vjdpyq cwshqq tlh fzyuz cbwgp egpy sfw
adyv cnrn bhaxvx ofdbkn yxrtir cnrn
ycz ednsydc bqsdcpx adnq bydb tqy tqy vqzpy erdcnv
mouv ouiy gld stdv gwr lxlfq gdl ldg
gtx bbvr fxytm veofwp bvbr opefvw
pcf scu ovso rawtjxs kzxgnuy ifcn tvibap
ugcbob xkjgtx ugcbob ilkkx dikca wpxyq retqhlu ugcbob ylmt tigcmmm
gmnde ool qeuwc ctux
wpajwn gooy fedmjur pxiq xkyniyp xtgi eyfpc gjx
uaivt kvfyn mpsya qxu kvnyf wvoeaz mbt fkyvn
jth awxbprn kpcodj qxegybo
sfvitld mdzczg pdptzm fmz himb eutpyi mgrde gubsta tfsldvi dfistvl
piabmr fckmhrv twnlnka jyb selqflm iwcutk pvvann
uxjfm rmleg ochuj ruiq aobxbb tpuusot uhwjojw tutopus
dzj qdyxzk oan rtpz ona qkdzyx nkunr
urjydh dfreifg tmbetd aakc vdr dkdkldw xgvtfsa ivv doadb axgvstf
fdjhr ujgbj ulkm dfzh tmhx zfdh ckt ortg
obe ywwge rgqmt cfcnyt atn fdkdrwz lmb zwpe sqfoc yllxs akdlsso
ckhbu jfqhkml abenw ckp xvjy wsyhxox jzsz hqksq
tjx zlh zgyrjpe bdorry uofh hgkzl ezixges kaxlkjw ztijupu hlgkz
belj ipbygk dxe cqoyukw jnncelh ihvom qstbowu rocqsz ifiztlf fjrf nsit
vyswalv reaqae hzoqyun lbci ibqfljz cgjflqf kos
njrzfvu nxw nxw bdsgnxp
gxlgn qrx nspbvl pzuob nggxl ipak wjr lggxn zas
xkd sooef fsayaob tfsiyl
ecldvh jugto ghfpbev xzlc
rpyattn spb ajdplq eaorgi ackirxg knrap cobdeu qca pkp zkc
bhh tczwffg bhh bhh hrjx jwyu gry kkgghnx
zsav frsakbr bvzd gafr homzjw frsakbr yasgz homzjw kqa
nbd mekhfif mekhfif keuoag nbd
mzv vzm utuxhuf uufuhtx
siy tdbii qtu yrxar ruubale yrxar lsvnr yqxq ruubale
wstykuz fxnuszr tgmkw eovvrd ohheh raf degh hzoeun tiou wpt cqnw
dzbyhrv vzlbvn ncoa xfglcye ncoa sykfps ghi
lvi ilv xalhd ztejzb
zaeu diz zaeu gtdjsz fmoxgju diz uvh
zef lmkqlcs jnhgqww qsm fuatcq ixfa
wgp gvu rpmxrjh yokepvc yokepvc lywdl bbvvbf yokepvc
etjfs gjh tvmxb agovg yihn rmmh nue jfil
zgcco slios jbfodb wpthe ydvit regizw regizw qosou slios cto jfz
kmmq lnafaha ddos hrsjtxk zjch rfynx eovks
ezeuzu jfpv oinrstv vsw naoz enrcy svw jfvp kgmfwf cfisxzo
ljtv watps equf ljtv equf
axijki zotolsi ryqujrm xmhug fhz lkgaw umzokxh ktr jsdsfat trk iosoztl
vpqvvvn ydjz tcqc asffcxr rxb fyt vyham fys
agxrcxl obcncq htod ved ozesk obcncq iwqmksk fsijtg iidyy lxu ozesk
orsyqt otqrys pnaax qtrsoy
oyisc chu ahdp abhbtry kjsqve tkpux tkpux sxzu sxzu
wquw umlbwf mxzdbvb upp fopxe aub bau eritni punrpfc esnkyg
jjlzy hozskgo jjlzy aiq jjlzy sgfyhsd
ejghc ejghc ejghc igacslu
unzmg fugzotb nxkdlds ewn hydj fbr iuly oiwwkbg scnozau sfi dsishk
xuhjduu hfloaga xhuuduj mbavfkd nrnl ral erc mntev elpoqgq
seydro onpi qjey skgkiox fbdgyt xhr rhvz dpsjcj tfzd spjdcj btqn
difyxz cdm jlzsz oycm txyssd wckqshu ihya yjyb
nmrhlif wcreso chtqfov qcftvoh lqp egd erc myep plq cjdh
hcnwgkq kkrpxxj gwe xqgea kkrpxxj nxz mumqbw kwxhlz kkrpxxj otqy
rxbioyf cszah mhu mhu mhu
qpbrf jzink ojy idt nrjykzu
omnrq kkol dex eaqdmej dnpaum ynnntw ddwewsh ztcenhc zqdrq hmi
ngmqpu owmcuz gop gdbsfc nyott cdsflq ngmqpu
srus lrexy aqgkqvm tiyjm
wxa qopky glaaekv ykopq lna gyxvpx xwa hly dbvo
vqf sqrqw phxn xiw gejyzip ugg gghhugl zyqae
ylj cyolrx giim yrchuu yrchuu ylj
rixa yfusuqn yfusuqn yfusuqn
lpm gboakz ylyv gje yxu ahokxb ixwnpu hlcka cndhbbm nkmvts xdtqbc
veul zjvz regtyp njwfpm
pdlyjbn edawa xbcmyew gme yuk yek nfknzgn ehjz
rcgun ulv ntbwnvg ptf givapv bych gmxxxf iajqpb gwh ipavvg
qvpwk grbb gptdgrh sij vunv hsb uegsmt uos vkxdd
iun aagzlj elqcq vkrk awl yyt dxfhkwq hbkeht
cgf omofuz zddgwef iyosk hmou
mvjorn zseyo wpfjlac kpxb dlh ggo zgxoso txzuy jfbmv lacjpwf vha
twrsrw pxv iklzg rtfcl kfbcjix uyvowpa kfbcjix ofnsf adqm
qvi ivr plxfrg awugjh fxbv ztlljk qvi jdkfts xyq jdkfts uqwgdr
phs eimuuf lmxq wmp
laf gmuowr rplgkh orentm whor lkrhgp mjwr zapz mdqtqyq ttkfkf
fxk wdbl fjh ojqxp yvs fkx ysv ngksb
oclyxqu tpajqun vvmj twin zclk
srcwxs xiduxd tqpfc sbqybp sdtzw gizfn bpji kaolpuy
pfkmk olmsaz uffy uyff
crpazh pcrzha lew lkhcjij stfxq
nkbb rnlo icnzg rnlo ejanu mofx ujblud
abte xnjfo boz fnxzid nqfhifm jmnmsgh
lvck nfll szdgrxc nghig szdgrxc oytahh cibk szdgrxc
sduf jgv rrt spxw fdus
gplutjv ufep fuzrnj tmko zzpj cpd mvtrzq
ycdiav qvr ycdiav tjngezs mphk oykgcei ycdiav
egbkscg ksgcbeg qmw jdbj
kbgx otnfyc agouh iai lyhqd yzihyq ouagh snzhxa xyxrgz
kdpqljx rin dlxms ukdzedc duezdkc ikgplm ffk vdmie qziajdf ftfwl
prrzhj okffaot tlrxpjd aquc dbonaef enfdoab nwbtuh
vyzf ijo cdhek bvlgxt kvldmp kvldmp vfvg
zhijgyb yfkkal utb brew vfj ztiftq
kodsuol ubnbdv iozwfum ayqxgnj qkp yiiv wbkgi psi wnfa epw
iok mecjsp lccn nrb kobca wkznctc afjjlrt
yrw yhsva hgx nxjfbb
dbdj vef xjssylt hjlld bqbmx ihfmz uhij zoh opzrmy mfq
wqhcq usyfuc wqhcq pmf aryq nhvtkh
nkviwge snpfdza nadzfsp evvdnrl qled ekqs qumle myhky
rgljws kjuk txgeein ajmph pjhdy pmvr upae yfh
vmepn wekgc qfwybl midbac vmepn ddqmbu vmepn uhfccp yuh zzz gnx
hyqv fud xdc bssziiv mwo xfrsn xqehs mwo
djhr qxhfy vdjs ueoi mbmwa lkeumzd hyxfq krbyy ywvcstf wdkum xfqyh
heprtex wgxpign lvm vlm ypswfxr ggxipwn hdszz blrv ppy
fwalim sbqj zewxcaf qjsb cjgujwr uclxro wceu wmaifl rnd
gmivd spncot jxeycn notspc nzb wie ceyjxn xlam
cfujai hfvux hhtwe hfvux oputz oam
gmwu xwthnkp xwthnkp mdxa xwthnkp
shfqzi hdq uyyqjrd wczfvy wciko hdq nuywebl
dtkq qnb uzmo ypxfja cekqe cekqe tnaibc uzmo pmtnb
apdz exdze pop pvm pce hywvftx jrjezgd jkajq jcdjli
satq czv cfhyca cshnyh cshnyh rcu cshnyh
mxp ujq fmrnzxx xqv mxp
nel whnnxak lwzlre mrxq kpo pko bsa gimtzwb
okssco iuke vcnv okssco liawwc vcnv aztl
kjvq rye eawplkw qzxt jkqv bxbfyv
bphssax ylemih wsm jnpxce jgh repsyj ieypbz asx
dwivit ptcwt qwectqk ttwcp bklpa ivditw
ies knj zemmcto mczotme yanr kjdrwr mcry ndols
dqzdpg adb ulsv ulsv qux ppmoru sjcn dpihqz
akazkk kssdguo cgigktm indfh wwh kevuhv dclpjv kgtd ehjxous
spogxy jyzhag qumd brk cbu akbpjxb spie
jgyn cxbar axtkwh hktgcm cfsla xll rpauwl cgpziuh dyc brcxa
dodey dysnjxe kzmyytw tzddd cnupwmv
nqab whxkb kvc kvc jcjhywy mbbpfwj fxozlt whxkb qwz
ihmif xhjc lmfk yjrsioo uvtd qvtqsgt dqd
uvzedxd afli hkrigd lkzkzu ncki toam hoaefui
zmvywjv jsjf nrbrgt mbs yog eexuo
ukzab euwb qnkanyt lgeqf qefgl ewub
zbol bolz ilncu ciunl
hjryu qyl ajwju rplplr skbdsl xvto
ojfotbx zvta jofxtbo ejjnhi jyeiz yzeij
ivr pvrwef ivr zgnm jscgaoq hfjuzju cea hfjuzju ehszaz
yikp gul ugbniac jehm fwqxb hqbhi hlfr iyuuf vacrao fwqxb
plsjh efu napxwe jfxfjz efacqcp sythfxc sythfxc napxwe qncqc
meuf rcjzf mhluz kbrk tzjrcn omoiprl khs oyzad yuzbz
exvzzuc ckqfivf uoyidkg mwztyf wxtg uzrls gudioyk wfihpzn tdmwhf
qoovwqm bldswvy xkb yqrcluk qyrclku cluqyrk qgakbv urclhse
rmmymgg ytpqtuq ibt tmedibz tmbsdg ytpqtuq cxbnng
qkyeo frjjht vkpt ikztq avzqon diw noqzva dvkhwdt
opz usos kdqseyb cdxvve nahjc hbr rhsfm hcjna wnczls kky
sgeml uyaoe ked utxab hxqa glems wbdo kzrjsq
isp bmebt becira ixoz yeakj fmueu
jrd qyys cik bmaief zxllza rsu swvodiv ivvdsow ikpvwaj jdr qte
gzjjre tkjhdn lrqmvw gues ositymc xhfiutm
kcnble oxoh zggvo zjz auub kunoj snil zggvo lgql
yyfmd wbwmizs vmb clba bpzzjz nlt wgukoe hedlp osxz
skic mgcr chkj eiiy kdhch gcanziz dpecug fccp
jhnejy akpwbj mhrunvm wjzwyhe lwxostl gfe niuhj iuf bewur
nuursk gehzvck szm fllr bfaq ijpjp gehzvck bfaq
ecx etrsadp lyekp lxf flx tadreps
gbo wzkner hky ggoqu
yiitvf tyvifi xpnbk iiytfv
okpjxyq mmxcha pujgv ltgfdk wpporh bfle tuupth ukyyjgv vlnwhz
phbs qtpolnh udito ukx kjqsi jbwf sgkkwgm udito mwwb wihg
mces dhc qccy sxyilmb qmki dyqnr qsh aigaemz oofdw hbifiz
yyben jjklnz whwswg tox vgytp noijcv jjsa ybney eyrvg htjl vxli
detb tus rloz zymvmg zpe
usvkehi kxgvo rna scnaljd jmowud ipfkkf rxvpie nxysvj pvquagf fjhsvef
ytosun puwdoix oyc qdufuw ysunot
htw biy htw oxot oxot
xgzi nbq lxxtmt nbq lxxtmt fnzmmno
lko bdbj kcqvc torg enbfbj sbooco afjbclm dendwq
cgih ikmfn lyhzhxd ubq ixrori tofbo
glfhfzs gihsccj yic mlci slne
wdiu lhl hdlhzo voo yhqckcy axnz yqyi fyss qhvtsbc
aotbk zfokegh uax myhehay terwus hmzic fdwojh wjuwlp
ucbiex eigq qqe ifqw sxakwl xkwsal qeq
pknvybh qkrwi povvd phairw qst inklob yrryv bcuv dolvr okwe iexrpbw
kkah qrt dihygsm nly rblqvrm sxguxj yspmre
gzhhkjt uimif bssle vdiaa wkohq nrgboi htkojiw
aeb xihgva vwcjbjh lri nlwbxun sargiey uyekrc
fnnwfbj yyccaxu fhqb nlmwhc ymbqky ooljix mfijg ryykirn womn rygezi qsdwgpw
itfs udfr sitf gml
gknztly vay ypy jpid pyy mbpfmwz pfmzbwm qqec
bbhmw uus xffgd xcjzrlk kyecv zcerxe
ncpc otqzotf godtu yhcpsyw ncpc fbs
ggoiqm ofk pryqt kqdbo ktek kklhlju iqgmgo gqoimg flscx
gsgmvy tktzj kgi ikyz pthtk hxt gik
bunvugy fefqpkk juwk aent
atm tma dzyret jmuqke xbayiit jumqke
dilfw qws ldwfi lnujld ywrogk kjh adaj khmlb hkbml
veaemc xugf udpphf mydi jbvebgp ngyhly pufdph vbgepbj
vyd tisntn qmc yzal
uxdlc piw mwjnk qiar xwpspf sxktemh jmw
qhhvar pox aed bgwq doe uyktv pox vriy ndel pzx aed
tswei dtfb yhj krxu yqio wtzpm wtzpm yqio
bjzp zzp qdzdfv tzkbl nggbfqs vquqds xiud xgrkb
ffvjfwp jbzslqo ffvjfwp pchzrqv ffvjfwp pkd nlav
czepixn yurmsw ucckih qqlnxjj exipznc
xeu llc jnmp dmz pnmj stqzao
fzvu uscqp xerkzkg roivhri fzvu yiwae xguz ajpg
qdzk uyyoi cspmnc qdzk nwknfx fnngvla cbl
acg utwrv cahupdm xgat elb aemkf wmkdzj kfmae ahlrwu yxfcj
vdumh rcd rgc hpqk qeum fpgva qkhmuji rjxpuzk ommk
ztvm ntxkav ajv avj ippodg sukg bivcslu tes gdlrbnt bdlkaye xpgslef
aygsym pwq owxmx xjw
dkhykf pfqeyo lfq saoewy qldrky sdgrrcr frdqn tkfezop doo saoewy
cwof mqlscm iqxhb nnkex nxx glgpbn
noq zikmeyx yodahj ssu qqmifa plcbv rsahsd
nvc fuwiyq myv hjn rtuoq zoyp rqnt xchlrg
dziscfa nbzsuvp rbnrban cjdprp dkj zcry ckxtm
stpm ifcbmmw dpkpzo sot ydpeydw nusp nkciqa psnr
udikjfr foqnxl whq ojuspzz ddyz emdktzb gfio mnd hyb
vchdphx zkrtky ucyifqx ryzl txdixd cip aid cip
wcz ywzwpp viswpsm qfus uzopaq mhps sidjky kipvjg
wehhc rzujn urprwzw gkwzhk rhrpph xkzzl rzujn yddlb
wlhif foh rpvylg gruiqdv daih yflhbr coe yflhbr hvluddj
hfzi ffjntj fdth crkrzdr nyel nlxm cawze bfjz neixnw uygqvmw zayf
guthfwn kcinec glhaiqv rfgbi cbrm
mvqv lszqu eyjn suq lavyjbh ujivbza aianl wik noy zth
zkn ren ncoyj fppsy dwgtgqz til
ybxepr hrzcrxs zhrscxr uvpxxl eprxby vzgg
xhi zess zet mtpcu ibz nkwq cbzb etz kjjcns
kvmu rxgw xboplw enlqcxi uxysl xboplw kvmu oqxislh xeg qwhdc spsddge
dxaao ltjjn cpsvnxe core aojgu pbss nudwi
llro yoy tixzyc beim qirnb lffcr gzm
quxetbf gfpll gqyav dckhp xbfetqu xaebz xuqfteb
fblkc hsydxqt bvmwujr rak
epeohq olrwyft cmrvov fbdyxbg
uzqk pkhizw jbrnlvx aqkq mtmjmy gpcln gaqt rinrz gwis gpcln
ttkcu ttkcu mcq xao lhnxdph djj ylet atdln xao
pmwn svqktkm isopar krrfbna knrw kbm zsohxrk xlsmm knrw cmoikq etqeggc
undrw issrttk mcoe pvufl bwjwqkx jdz undrw vje
kfzqbb djpcjv ixctsvb rqsntv fcqz
agezraf ezrfaga pftdwrk slsxu axw
ezvkn smwko utdlu nizby
ygl dwtrpsh qzz cuntrr hdrn lujcx iwc bll qvjhg
jrdrvj ledrjp noqx igodve odgiev
zonvzgy ujnzj ujnzj zonvzgy ckzd
rmg lmib fdn nfd gfobw wrc iro nsz
acgxvh sdn zcef sdn jvgnmhi xitkqgy tbascbh
ykuzk ovp mikolx xxgpylt secuf yrtilra wnoypy mty lmnagx
wwmlins mxwye kjntv sadc wnvyoov rzdawl
ali ncsrq tcbjzpu oiw iimxlbp mwi hdvdl dqnicf lxit
sql vywv vycj nprzb tdqe qwvljm myhpvxy hdixbk ywqpn xvue vrno
etncz etncz czqw moz uaxbtm axlslow fhephy moz
wsriuaj umjkx mhxau luzf wmo kyx jidl ufuoz cbk
msfrvbt bxnd msfrvbt yut qwbx
rhag vfkqf rekoz buw qffvk wxs ghra
meignx dhdu xacg hmiqkd nrijc gcxa gwap lov ybtyr vol
qoqns swib mlegyjn ojdtt tvdrrhg oetg xdret nzpq
ntc zowllt dwiyht ztdeifx velaumx jfxxsqt uefmb gwn
bgykxl bykan tvvgcpa wdcsj coonage hpocfz sqmihw pnagv uozsh
wass vve ngyd yyvxmsq rsaypsa newxyc adqmbm xqsvymy ygdn idysq
ybo vpjcf tsbpc hcdszr qrxwjqr bzz tgjhkpu hgtxkt stpbc woro
ogszrg rszt owufa cohmv msygfw fud fzi lhts sfiy dfu gxsuj
fclumcq ejuj jkbu hbsv ythmpoo xdzg dkvrdue
rbf sunzzl sokgih rngqli xndnuj rbf smiea mqzpzb fwpcx smiea
uuuxchs uuuxchs fzna qlj tcjnv oghk fzna
zuiyk tbn nqma wptoecs xndgbqm mqan wmcahvm qpir
ztexf pqsc icxqsuf tkgr itnn yorg oyvqaj yoxggqk lep
ehm hysd jfv iugyt jyvh
fenjp zjtvvhb xfe dgxoah ljn ixvdyi fenjp odnlr
uosxyy euicgp lrsc euicgp mcszotm kvxrpk jfo oxu xyeiv fhdwl wbw
tsmdp gshgm kpb tlx kfznsu gglefv pkb gcnydo eavgrc rgd lgefvg
xuq svh cmzt bxxlvfm rtblxpu imuexhl lbre hqyedxa hwkgaak
hhlfj mlrdv dlsn zgcy hciiuzw uwciihz iizhcwu gwx
ukqoj kjqou hlk nfyz lusf kebvmrw ccaj ewmicq useba
jlnnl jsmox vnw ucr ggithr usqe allzc pfumkkm jlnnl
mswpbk lffjwq icc kef zlba uolrrl fqlfwj tbc
bfmra hdgczrw dgmnod afbmr fnczx
dcqrso cgbymsg jbx ofpbp rmtygip syly
yrmn wzkt lqys tzkw sqyl fxoc
wal zgjy cwnqyaf bhz dbpft owx
xnrautk dlsyot nzbohog xmzsbh soec wyy
kde jpkvbs eyzw ukgiv ggrtzcd vikgu mxqy jyh crdtgzg ebzet
psg jsykdw drpqzl qzqbge ldqpzr wsdykj lmhbldv hbognjp nqej fmxoq guuf
ueo ncedaju ijasprn rvxb mxkddl qvgdlbx bpj bpf pxewuf chvo lvrq
zlmg eciyqi xfbeoq pupyrc bfqexo ituqab pycrpu
jsk clo vqxzl aja jfbce ldov
muss tzg iksvdej zpw fxwhrv eeye fxwhrv
kjjd dzf zkppx qdwlx irudds kjgd pdrz rgogy qdwlx egx rjxldp
szjpf aouvl ehxq exqh
nzweop qlkje welkfs jqmvqi coc
ivmjzk usk auvmc vvcnwn qubihx vkms fbt udn uyto jjt kxqy
rayw ijaklcr ywra qkj qytxeh pmnfh qffvsft tyxheq
pea cqy tkg qidvx qidvx pea skgrndq
iijm xgwq zzpskl qtjezqt yqjwy dhbq
dfuv iqw iejb bjei iwq
ogrmldp xdc dcx cqhbwlp
wzwb xrjl keciql ckky litdr bmurdk anjs nyggesn ygwt svmee
bvkkzj rcr lozrw mgpwkm lwm yecsr ykl tzny aeus jmq mchopp
rsnvaa oikce angqn rnvsaa mhc
hsiov kxqpxtc rzh vjrqlx xxtkpqc wiunol qckxtpx
aosek lhi ruqgd rmr
agqvlao pvhcgz esw kwnpefs qsrvxz hgkgrs mpx odaiqi
dvqkrzf dawioo jtaco oeutol ravp apvr frjunad
wss nahhsh pfwgcfr rvvvq uqxxmhq qax vtrkfou medfj
imdyfc sez gve kgtryl kmqklg
crmg yhkpa bsfouax kyttpa who mcrbzaj kcsktxe yfv
zpw zlab pzw pwz okb
fgqlb byhkhfn qglfb ladle ifa
skr zwwjnr iub wekt biu jnrwwz
mpvt mpvt havn ztf
odqhd uxrswp ppj eztyj nxzwm fvxyadn tostwy odo abyp meqdm ktqkvh
fgufup uabd vhxem imto imto vhxem
vrpxxhi kii zwatqg nokg wesxju xplc sumte muwjj
nsse iquhoc giuv pxaa qpqn zrfk kywjr spz kgzc lfa
cjjgarr psvwoap ivijyt nfbxu ktiuy jajrgrc goyc
yrfzf wyxda gsslsy oeyve jczghf cbuwf iwnu izyrtho dyoup toizyhr vzzrr
bwqgxsr ufy cnouypd qwxbgsr efdkfe rwsblis bhvyws oodh
piqpez yhqahjp oxu qtomld
vjvpnwy kajjaim lcxmbyd fkdy ywvvnjp xcn nbwlklo
qghq mihdp vuv ocrzsw mlmkn rgnbfcm qgufcks btlulb effsrih
psazbfo vbpr efcspj yrjl pqjrfe relxjc nzzvb yviuhc
tbbhdbm uxhawtk bmdhtbb rqxrr pspjzx krtmf pnaz srcej rsjec
owikzec glvbqy jhknyuz jkaxu ldhnlpx wdp
qvuv wteohr daynue nehs gzqu porzrsk cqokye zzsbqox rqh ogxtn pskorrz
gnm grlfoon lxid isxa
jes iixswl umgbg qfixa xnecpns asm nopsmo axaopsm qahwpqd
orr auvlruu mqq uurlvua urauuvl fjrcuo mqht tkdgps tdvnhvq iezdv
txwyzy zzwk bzi etfg gtef
qyydr lllgosq qyydr lllgosq
xqm uyl ldpowm pxhi ievvvez hmhzwmr ldpowm jaw
qlvfq efgivhr rfhhu gvw bxgsrp sgbnjh ekgbp cyof rvghph nxfekia xym
lgladv ogj cir jxx msz fshf ayheu wpmke zckng vgrlv lxgmge
fcmp aabxdp hpxbb bblpy mpcf eju pnkv jxwoy hmv fgynps pbdxaa
jcrh dgg lzyiv ojop vhk vdb uinoetv
utlzcf ziizdo njffmxe uhyjxdb cztluf yjdhbxu
ubl cgz tyg nljl
slwe qaos ybcwdoh ogazkj tqh opggnzt ffrscl opggnzt izeh
evitfwb jpivmn dpnxzuf gdkx zprogl xehb
dktt kpnkizb rreq gjmosa iekdtpj rcxk eweawk qrre olv
cmcw vmw mujx mujx ypqfz
nzxcl fzwa ftcrc immendi tmxzzi hslye eibc tmxzzi
abfc jdqvk lichxx uiomtz tlq
mnkthoj nohjktm eued izmcjj
ullh wju bxfsif icnrmmj qnufw zubcnmo yewz phovhv
ndfvd gcyt wnm badaww twm jahlat ndfdv mtw xrq bechxx dnp
ceg gcxgu gnudeib utsynwx dpg wpsnp ahbbvkt wpsnp iou
wutcg congyz erkj ibtcics
xsbq lyycse qbsx ppgutls lroo tyor
hfiwoy hclhl gcwgqox ogo hlqr ultkaz yke iwohyf oog
bcl nemims udwkmlm nokck tkwny ulkihcu knwty pngamqg yxtphkn kuihlcu
nwsr enrutc eqcfb uxmdgju rfnzhsn tzk vysc
wbtki vjmkk kvjkm ibwkt sckvbv
xjxnow tli woxldj rotrtz nfkhcz ibh mla ybxldg
cwtpkhr oxywg qpwrgfm dfjpfuc kpcopa
byczby tbfkonk ytlczzf bbyczy
khuvrne rnamlgt akjtu qlx odr git xmiazr icwsxsq
jfm bneh tkdzuad bsr oruvmqq uauw zjlp gwov hot jkjbex
jjo uvk vlpy lpxd irntb uvk ehhsqv fxhvt jjo fpa
qrwu mgnw hvflf ytspp mco ikvbqg fflvh wts cbbf

File diff suppressed because it is too large Load Diff

@ -1,2 +0,0 @@
4 10 4 1 8 4 9 14 5 1 14 15 0 15 3 5

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
147,37,249,1,31,2,226,0,161,71,254,243,183,255,30,70

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -1,44 +0,0 @@
0: 3
1: 2
2: 4
4: 8
6: 5
8: 6
10: 6
12: 4
14: 6
16: 6
18: 17
20: 8
22: 8
24: 8
26: 9
28: 8
30: 12
32: 12
34: 10
36: 12
38: 12
40: 8
42: 12
44: 12
46: 10
48: 12
50: 12
52: 14
54: 14
56: 12
58: 14
60: 14
62: 14
64: 14
66: 14
68: 12
70: 14
72: 14
74: 14
76: 14
80: 18
82: 14
90: 18

@ -1,3 +0,0 @@
Generator A starts with 679
Generator B starts with 771

File diff suppressed because one or more lines are too long

@ -1,202 +0,0 @@
|
+---------------------------------------------------------------------------+ +---------------------+ +---+ +-------------------------------------+
| | | | | | | | |
+---------------+ +---------------+ +-------|-------------------------------------+ | | | | +-----------+ +-----+
| | | | | | | | | | | | | | | | |
+---+ | | +-------+ | | +-----------------------------|-------------------------------------------|-----------+ | | | | | | +-----------+
| | | | | | | | | | | | | | | | | | | | | | | | |
+-----------+ | +-|-----------|-----------+ | +---+ | | | +-----------------------|-|---------------|-------|-----------|-----------------------+ |
| | | | | | | | | | | | | | | | | M | | | | | | | | |
| | | +-|-----------|---------------------|-----+ | | | | | +---------+ +-+ +---------------|-----------|---------------+ | +-+ |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | +-------------------------|---------------|---------------|-------|-------+ | | +-----+ +-----+ | | | | | | | +---+ +-+ | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +---|-+ | +---+ | +---------------------------------------|-------------|---------------------------|-----|-|---|-------|---------------------|-|-|---------+ |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +---+ | | | | | | | | +-------|-------|-------|---|-|-----|---------------|-----------|-------------|-|-----------|---|-|-|-|---+ | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | +-----------------------------|---------------------|---|-|-------------------|-|-----------|---|-|-|-|-------|-|---+
| | | | C | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +-|---|-----|-|-----------|-------|-----------------------------|-------------+ | | | | | | +-------------|-|---|-|-|---|---+ | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +-|---|-----|-------------|-------|-----------------------------|---------------|-------------------|-------|-----|---------|---|-+ | | | | | | | | | +-|---|---|-----|-+ |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| +---+ | | | | | | | | +-+ | +---------------------|---+ | | | | | | | +-|-----|-|-------------|-----------+ | | | | | | | | +---+
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | P |
| | | | | | | | | | | | | +-+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | +---|-+ | +---|-|-----|-----------|-+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | +---|---------+ | | +---|-|-|---|---------|-----------|-+ +-+ | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | +-------+ | | | | | | | | | | +-------+ | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +---|---|---|---------|-----+ +-----|-|-----|-------------------|-----|-------------|-|-------|-----------|-|-----|-------------------|-------|---------|---|-----------|-----------+ | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-------+ | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | +---+ | | | | | | | | | | | | | | | | | | | | | | | +-|-+ Y +-|-|-----+ | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | +-+ | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | +-|-------|-----|-|-----|-------------------|-------------|---------------|---------------------|-----|-|---------|-|---|-|-|-------|---|-------+ | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | +-----|---------|-------------|---------------|---|---|-|-|-----|-+ | | +-------|-+ +---|---|-------+ | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | +-------------------|-------|-------------|---+ | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | +-|-------------------|---|-----+ | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | +-----|-----|---------|-------|---|-|-------------------|---------------------------------------------|-|-----|---+ | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-|-+ | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | +-----|---|-|-|-----|-----|-+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | +-------|-|-----|-----|-+ | | +---+ | +---------|-------|---------|-|---|-----|-|-|-+ | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | +---|-|---------------|-|---|-|-----|-------------|-+ | | | +-----------|-------------|---------+ | | | | | +-----+ | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | +-------|---------------------------|---|-------|---+ +-------|---+ | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | +-+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | +-----|---------------|-|-----------|-|-----|-----|-|---|---|-----------------+ | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | Q | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-----+ | | | | | | | | | +-+ | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | +-----------|---|---------|-|-----------------------+ | | | | | | | | | | | | | | | | +---------------------|-|-|-----------|----------E------+ | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | +---------|-|---|-----------|-|-|---+ | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | +---|-------|---|-+ | | +-|-------------|-|-----------|-----|---|-----+ | | +-+ | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | +-----------------|-|---|-----|-----------|---|-|---------------|-----|-------------------|-|-|-----|---------------+ | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | +---|-|---|-------|---|-----|---|-----------|---------------|-----|-------|---|-----|-----------------+ | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | +-------+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | +---------------|-+ | | +-|-|-------------------|-----------|-----|-|-|-|---------------|-|-----------|-----|-|-|---------------------|-------------|-|-|-|-----|-|-+ | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | +-|---+ | | | | | | | | | | | | | | | +-|---|-----+ | +---|---|-|---+ | | | +-------|-|-------|---|-|---|-------|-----+ | +-------|-----+ | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +-+ | | | | | | | | | | +-----------|-|-|---|---|-------|---|---|---------------|-|-|---------+ | | +-|---|---------|-|-----------|-------|-------|-----|-----|-----|---+ | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-------|-|-+ | |
| | | | | | | | | | | | | | | | | | | | | | H | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | +-|---|-----+ | | | | | | | | | | | | | | | | +-|-------|---|-|-----------|-----------|-|---+ | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-----|-|-------|-|-----|---|-----|-------------------|-------|-+ | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-|-----+ | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | +---|-|---|-|---|-----------|---|-----|-|---------|---|-------------|-|-----|-----|-------|-------|-------|---|---|-|-|-|-----------------------------------|-------------+
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | +-|-------|---+ | | | | | | | | | | | | | | | | | | | | | | | | | +-----|-+ | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | +-------|---|-------|---------------|-|---------|-----|---|-----------|---|-|-|-|-----------------------------|-------|-|---------+ | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | +-+ | | | | | +---|-----|-----------------|-|-------+ | | | | | | | +-|-------+ | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---|---|-------|-|---|-----------------+ | | | | +---+ | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | +-------|-|-|-|-------|---------|-|-------------|-|---|-|-----|-|-------------------|-------|-|-------|-------------+ | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | +-----+ | | | | | | | | | | | | +---------|-----+ | +-+ | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | +-|-----------|---|-|---|-------+ +-------|-----------+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-|-----+ | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | +---|-|---------|-|---------------+ | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | +---|---------|---|---------------|---|---|-----|---------|-------|---------------------|---|-------|-|-|-----+ | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | +-|-+ | | | | | | | | | | | | | | | | | | | | | | | | +-|---------|-------------------|-----------|---|-----|-------|-----|---------|-+ | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-----|-----+ | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +-|---|-|---|-|-----|---|-|---|-|-+ +---|-+ | | | | | | | +-------|-----+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +---+ | | | | | | | | | | | | | | | | | | | | | | | | | +---|-----|-------|-|-----------------|-|-|-|-|---|-|---|-|-|-|-------------------|-------|---|-----+ | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | +-----|---+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-------|---------|-------|-|-|-------|-----|-|-|-|---------|-----|-----+ | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | +-|-+ | +-------------|---|---|---------|-------------|-|---------|-------|---|-|-|-------|-|-|---------|-------|-|---|-----------|-----+ | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | +-----|-----|---------|-+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-----+ | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | +-------|-----------|-------|-|-------|-----+ | | | | | +---|-|-|---|-|-|-+ | | | | | | | | | | | | | | | |
| | | | | | | | | | | S | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | +---|-------|---------------------------------|---------|-----------------|---|-|---|-|---+ | | | +---------|-----|---------+ | | | | +-|-+
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-----|-|---|-|---|-----------|-----|-|---|-----|---------|---+ | | | | | +-------|-+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | +---|-----|---------|-----|---|-|-|-|-----|-------|-------|---|-----|-------+ +-|-|-------|-|---------------------|-|-|-------------------|-|-+ | | +-|---+ | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-------------|-|-|-|-----|---------|-----|-|-----|-|---------------------|---|-----|---------|-|-|-|-------|---------+ | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +-|-----|-|---|-|-----|---------------|---|---|---|---|-------|-------|-------|-----+ | | | | | | | | | | | | | +---|-+ | | | | | | | | | | | | | +-+ | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +---|---|-|-----------|---|-------|-------|---+ | | | | +-----------------------|---|-------|---+ +---------------|-----+ | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | +---+ | +-|---|-+ +-----|-----|-+ +-+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | +-|-----------|-|---|---+ | +-------|-+ | | | | | | | | | +---|-+ | | | | | | +-|-|-----|-----+ | | | | +---+ | +-+ | +-+ | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| +-----|-|V------|-|---|-|---------|-|-------|-----|-----------------|-------------------------|---------|-----|---------------------------+ | | | | +-|-+ | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +-|-|-----|-|-|-|---------------------|-|-------|---------------|---|-------|-------------|---------|-|-----------+ | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +-----+ | | | | | | +---|-----------|-|---------------|-------|---|-|-----------------------|---|-----------------|-----|-------|-|---|-|---|---+ | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +---------|-|---|-|-|-----------------|-|-------------------|-------|---|-------------------|---------|---------------------|-|-----|-------|---|-|---|-------------------|-|-----|---|-|-----+ |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| +-|-----|-----+ +---|---|-----------------|---+ | | | | | | | | | | | | | +-----------+ | | | | | | | | | | +-|---|-----|-----+ | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-|-|-----|---------|-|-+ | +-----|-|-+ | | | | | | | | | | | | | +-----------|---+ | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+---------|---------|-|-----------------|-+ | | | +---|-------|---|---|---|---------------+ | | | | | +-|-------+ | | | | | | | | +---------------------|-+ | +-----+ |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | +---|---------+ +-+ | | | | | +---------|---------------+ | +-|---------------|-------|-----|---------------|-|-----|-------|-------|---------------------|-|---+ | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | +---+ | | +---|-----------|---|-----------|-----------|-|---------|-|-----------|-----------|-|---|-|-------------------------|-----|-------------+
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | +-------|-|-+ | | | | | | | | | | | | | +-----------|-----+ | +---+ | | | | | | | +---------------------+ +-------|-------+
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | +-----|-----|-+ | | +-|-----------|---|-----------------|---+ | | | +-----+ | +-------|-----------+ | | | | | +-------------|-------------+
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | +---------|---|---|---|-------|-|-|-----------|-|-|---------|-------------------+ | +---|-------------+ +-------------|-----+
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | +-----------|-----|-----------+ | | +-----|-|-|-------------------------|-----------+ +-|-|-|-------------+ |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +---------------------|-----|-------|-|---------|-----|-----------|-|-----|---|-+ +-------+ | +-|-|-+ | | | +---------------------------------+
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +-|-|---------|---|-------|---------|---|-|---------------|-------|---------|---------|-|-|-|---------|---------------------|-------|---------+ | | +-+
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | +-------|-----|-----------|---|---|---+ | | | | | | +-+ +---------|---------------+ | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | +---+ | | | | | | | | | | | | | +---------|-|-|-------|---------+ | | +---------|-----+ +-+ | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | +---------|-+ | | | | | +-----+ | +-----|-------+ +-+ +---------------+ | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | +---------|-------|---------|---|---|-----|-----------|---------------------------------------------|-------+ +-------------------------------------|---------------+
| | | | | | | | | | | | | | | | | | | | | | | |
| | | +---------+ | +-------------|-----------|---------|---|-------------|-------------------------------------------------+ | | | | |
| | | | | | | | | | | | | | | | | | | |
| | | | +---------+ +---------|---+ +---|---------+ +-+ +---------------------------------------------+ | | | | |
| | | | | | | | | | | | | | | | | |
+-+ +-------------------------|-----------+ +-+ +---|---+ | +---------------------------------------------------------------+ +-----+ | +-------------+
| | | | | |
+-----+ +-------+ +--------------------------------------------B----------------------------------------------------------------------+

@ -1,5 +0,0 @@
# p ARGF.read.strip.chars.map(&:to_i).each_cons(2).select {|a,b| a == b }.map(&:first).sum
a = ARGF.read.strip.chars.map(&:to_i)
b = a.rotate(a.size/2)
p a.zip(b).select {|a,b| a == b }.map(&:first).sum

@ -1,5 +0,0 @@
p ARGF.read.strip.split("\n")
.map {|line| line.split("\t").map(&:to_i) }
.map {|row| row.combination(2).map(&:sort).map(&:reverse).find {|a,b| (a.to_f / b.to_f) * 10 % 10 == 0 }}
.map {|a,b| a / b}
.sum

@ -1,100 +0,0 @@
require "minitest"
class Spiral
def initialize
@state = [0,0]
end
def each
return enum_for(__method__) unless block_given?
(1..Float::INFINITY).lazy
.flat_map {|i| [i, i] }
.zip(%i[r u l d].cycle)
.flat_map {|n,d| Array.new(n, d) }
.each do |dir|
yield @state
@state = @state.zip(
case dir
when :r
[1, 0]
when :u
[0, 1]
when :l
[-1, 0]
when :d
[0, -1]
end
).map {|a,b| a + b }
end
end
end
class Grid
def initialize
@grid = Hash.new {|h,(x,y)|
neighbors = [[-1, 1], [0, 1], [1, 1],
[-1, 0], [1, 0],
[-1,-1], [0,-1], [1,-1]]
h[[x,y]] = neighbors
.map {|i,j| [x+i,y+j] }
.select {|i,j| h.has_key?([i,j]) }
.map {|i,j| h[[i,j]] }
.sum
}
@grid[[0,0]] = 1
end
def [](x,y)
@grid[[x,y]]
end
end
if $0 == __FILE__
case ARGV.shift
when "test"
require "minitest/autorun"
when "0"
input = ARGF.read.to_i
p Spiral.new.each.with_index.find {|_,i| i == input - 1 }.first.sum
when "1"
input = ARGF.read.to_i
grid = Grid.new
p Spiral.new.each.lazy.map {|x,y| grid[x,y] }.find {|value| value > input }
end
end
class TestSpiral < Minitest::Test
def test_spiral
spiral = Spiral.new
e = spiral.each
assert_equal [0,0], e.next
assert_equal [1,0], e.next
assert_equal [1,1], e.next
assert_equal [0,1], e.next
assert_equal [-1,1], e.next
assert_equal [-1,0], e.next
assert_equal [-1,-1], e.next
assert_equal [0,-1], e.next
assert_equal [1,-1], e.next
assert_equal [2,-1], e.next
spiral = Spiral.new
assert_equal [0,-2], spiral.each.with_index.find {|_,i| i == 22 }.first
end
end
class TestGrid < Minitest::Test
def test_grid
grid = Grid.new
assert_equal 1, grid[0,0]
assert_equal 1, grid[1,0]
assert_equal 2, grid[1,1]
assert_equal 4, grid[0,1]
assert_equal 5, grid[-1,1]
assert_equal 10, grid[-1,0]
end
end

@ -1,30 +0,0 @@
class Passphrase
def initialize(raw)
@raw = raw
end
def valid?
words = @raw.split(/\s+/).map {|word| word.split(//).sort.join }
words.uniq.size == words.size
end
end
# require "minitest/autorun"
if $0 == __FILE__
p ARGF.read.split("\n").map {|line| Passphrase.new(line) }.select(&:valid?).size
end
require "minitest"
class TestPassphrase < Minitest::Test
def test_valid
# assert Passphrase.new("aa bb cc dd ee").valid?
# refute Passphrase.new("aa bb cc dd aa").valid?
# assert Passphrase.new("aa bb cc dd aaa").valid?
assert Passphrase.new("abcde fghij").valid?
refute Passphrase.new("abcde xyz ecdab").valid?
assert Passphrase.new("a ab abc abd abf abj").valid?
assert Passphrase.new("iiii oiii ooii oooi oooo").valid?
refute Passphrase.new("oiii ioii iioi iiio").valid?
end
end

@ -1,14 +0,0 @@
instructions = ARGF.read.strip.split("\n").map(&:to_i)
pc = 0
count = 0
while (0...instructions.size).cover?(pc)
offset = instructions[pc]
if offset >= 3
instructions[pc] -= 1
else
instructions[pc] += 1
end
pc += offset
count += 1
end
p count

@ -1,36 +0,0 @@
require "set"
class Day6
def initialize(banks)
@banks = banks
end
def each
return enum_for(__method__) unless block_given?
loop do
yield @banks.dup
value, i = @banks.map.with_index.max_by(&:first)
@banks[i] = 0
value.times do |offset|
@banks[(i+offset+1) % @banks.size] += 1
end
end
end
end
banks = ARGF.read.strip.split("\t").map(&:to_i)
day6 = Day6.new(banks).each.lazy
seen = Set.new
needle, i = day6.with_index.find {|config,_|
if seen.include?(config)
true
else
seen << config
false
end
}
p i
p day6.with_index.drop(1).find {|config,_| config == needle }.last

@ -1,20 +0,0 @@
Program = Struct.new(:name, :weight, :disc)
programs = {}
ARGF.read.strip.split("\n").each do |line|
name, weight, above = line.scan(/(.+) \((\d+)\)(?: -> (.+))?/)[0]
programs[name] = Program.new(name, weight.to_i, (above || "").split(", "))
end
disc_weights = Hash.new {|h,k|
program = programs[k]
h[k] = if program.disc.empty?
program.weight
else
program.weight + program.disc.map {|x| h[programs[x].name] }.sum
end
}
root = "mkxke"
p programs[root].disc.map {|n| [n, disc_weights[n]] }
require "pry"; binding.pry

@ -1,20 +0,0 @@
instructions = ARGF.read.strip.scan(/(\w+) (dec|inc) (-?\d+) if (\w+) ([!<=>]+) (-?\d+)/m)
max = 0
registers = Hash.new(0)
instructions.each do |instruction|
condition_value = registers[instruction[-3]]
if eval("#{condition_value} #{instruction[-2]} #{instruction[-1]}")
value = registers[instruction[0]]
case instruction[1]
when "inc"
value += instruction[2].to_i
when "dec"
value -= instruction[2].to_i
else
raise instruction
end
registers[instruction[0]] = value
max = [value, max].max
end
end
p max

@ -1,25 +0,0 @@
require "strscan"
input = ARGF.read.strip
input = input.gsub(/!./, "")
p input.scan(/<[^>]*>/).map {|g| g.size - 2 }.sum
input = input.gsub(/<[^>]*>/, "")
.gsub(?,, "")
ss = StringScanner.new(input)
score = 0
group = 0
until ss.eos?
case
when ss.scan(/\{/)
group += 1
when ss.scan(/\}/)
score += group
group -= 1
else
raise "omg!"
end
end
p score

@ -1,33 +0,0 @@
list = (0..255).to_a
current = 0
# lengths = ARGF.read.strip.split(?,).map(&:to_i)
input = ARGF.read.strip
p input
lengths = input.split(//).map(&:ord)
p lengths
lengths.concat([17, 31, 73, 47, 23])
skip = 0
# list = (0..4).to_a
# lengths = [3,4,1,5]
64.times do
lengths.each do |length|
list[0, length] = list[0, length].reverse
list = list.rotate(length + skip)
current += length + skip
current %= list.size
skip += 1
# p list.rotate(list.size - current)
end
end
list = list.rotate(list.size - current)
p list
dense = list.each_slice(16).map {|slice| slice.inject(&:^) }
p dense
p hex = dense.map {|n| n.to_s(16).rjust(2, ?0) }.join
# list = list.rotate(list.size - current)
# p list[0] * list[1]

@ -1,26 +0,0 @@
dirs = ARGF.read.strip.split(?,)
current = [0, 0, 0]
max = 0
dirs.each do |dir|
delta = case dir
when "nw"
[-1, 1, 0]
when "n"
[0, 1, -1]
when "ne"
[1, 0, -1]
when "sw"
[-1, 0, 1]
when "s"
[0, -1, 1]
when "se"
[1, -1, 0]
else
raise "omg!"
end
current = current.zip(delta).map {|a,b| a + b }
max = [max, current.map(&:abs).sum / 2].max
end
p current
p current.map(&:abs).sum / 2
p max

@ -1,31 +0,0 @@
require "set"
@programs = Hash[
ARGF.read.strip
.lines
.map {|line| line.scan(/\d+/).map(&:to_i) }
.map {|x| [x.shift, x] }
]
def group(id)
group = Set.new
queue = [id]
until queue.empty?
program = queue.shift
next if group.include?(program)
group << program
queue = queue.concat(@programs[program])
end
group
end
p group(0).size
count = 0
until @programs.empty?
group(@programs.keys.first).each do |program|
@programs.delete(program)
end
count += 1
end
p count

@ -1,11 +0,0 @@
firewall = Hash[ARGF.read.strip.scan(/(\d+): (\d+)/).map {|x| x.map(&:to_i) }]
def caught?(time, range)
(time % (2 * (range - 1))).zero?
end
p firewall.select {|depth, range| caught?(depth, range) }.map {|d,r| d * r }.sum
p (1..Float::INFINITY).find {|delay|
firewall.none? {|depth, range| caught?(delay+depth, range) }
}

@ -1,52 +0,0 @@
input = ARGF.read.strip
def knot_hash(input)
list = (0..255).to_a
current = 0
lengths = input.split(//).map(&:ord)
lengths.concat([17, 31, 73, 47, 23])
skip = 0
64.times do
lengths.each do |length|
list[0, length] = list[0, length].reverse
list = list.rotate(length + skip)
current += length + skip
current %= list.size
skip += 1
end
end
list = list.rotate(list.size - current)
dense = list.each_slice(16).map {|slice| slice.inject(&:^) }
hex = dense.map {|n| n.to_s(16).rjust(2, ?0) }.join
hex.hex.to_s(2).rjust(128, ?0)
end
# p (0..127).map {|i| "#{input}-#{i}" }.map {|row| knot_hash(row) }.join.split(//).select {|c| c == ?1 }.count
# input = "flqrgnkx"
grid = (0..127).map {|i| "#{input}-#{i}" }.map {|row| knot_hash(row).split(//) }
regions = 0
queue = []
(0..127).each do |y|
(0..127).each do |x|
if grid[y][x] == ?1
regions += 1
grid[y][x] = ?0
queue << [x, y]
until queue.empty?
xx,yy = queue.shift
[[0, 1], [0, -1], [1, 0], [-1, 0]].each do |dx, dy|
xxx = xx + dx
yyy = yy + dy
if (0..127).cover?(xxx) && (0..127).cover?(yyy) && grid[yyy][xxx] == ?1
grid[yyy][xxx] = ?0
queue << [xxx, yyy]
end
end
end
end
end
end
p regions

@ -1,28 +0,0 @@
start_a, start_b = ARGF.read.strip.scan(/\d+/).map(&:to_i)
class Generator
def initialize(start, factor)
@value = start
@factor = factor
end
def each
return enum_for(__method__) unless block_given?
loop do
@value *= @factor
@value %= 2147483647
yield @value
end
end
end
# start_a, start_b = 65, 8921
a = Generator.new(start_a, 16807).each.lazy
b = Generator.new(start_b, 48271).each.lazy
p a.zip(b).take(40_000_000).with_index.count {|(a,b),i|
p i if i % 1_000_000 == 0
# a.to_s(2)[-16,16] == b.to_s(2)[-16,16]
a & 0b1111111111111111 == b & 0b1111111111111111
}

@ -1,32 +0,0 @@
require "strscan"
@dance = ARGF.read.strip
@programs = (?a..?p).to_a
def run
ss = StringScanner.new(@dance)
until ss.eos?
case
when ss.scan(/s(\d+)/)
@programs.rotate!(@programs.size - ss[1].to_i)
when ss.scan(/x(\d+)\/(\d+)/)
a, b = ss[1].to_i, ss[2].to_i
@programs[a], @programs[b] = @programs[b], @programs[a]
when ss.scan(/p(\w)\/(\w)/)
a, b = @programs.index(ss[1]), @programs.index(ss[2])
@programs[a], @programs[b] = @programs[b], @programs[a]
when ss.scan(/,/)
end
end
end
@memoized = {}
count = 0
until @memoized.has_key?(@programs.join)
@memoized[@programs.join] = count
run
count += 1
end
mod = 1_000_000_000 % count
p @memoized.find {|_,v| v == mod }.first

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save