finish day 3
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
bin
|
||||||
|
.idea
|
||||||
@@ -4,6 +4,7 @@ import "core:strings"
|
|||||||
import "core:testing"
|
import "core:testing"
|
||||||
import strconv "core:strconv"
|
import strconv "core:strconv"
|
||||||
import os "core:os"
|
import os "core:os"
|
||||||
|
import "../utils"
|
||||||
|
|
||||||
sample :: `L68
|
sample :: `L68
|
||||||
L30
|
L30
|
||||||
@@ -85,9 +86,9 @@ solve_first_sample :: proc(t: ^testing.T) {
|
|||||||
|
|
||||||
@(test)
|
@(test)
|
||||||
solve_first_input :: proc(t: ^testing.T) {
|
solve_first_input :: proc(t: ^testing.T) {
|
||||||
contents, _ := os.read_entire_file("day1/input.txt")
|
contents := utils.read_file("day1/input.txt")
|
||||||
defer delete(contents)
|
defer delete(contents)
|
||||||
pointing_at_zero := solve_first(string(contents))
|
pointing_at_zero := solve_first(contents)
|
||||||
testing.expect_value(t, pointing_at_zero, 1158)
|
testing.expect_value(t, pointing_at_zero, 1158)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,8 +100,8 @@ solve_second_sample :: proc(t: ^testing.T) {
|
|||||||
|
|
||||||
@(test)
|
@(test)
|
||||||
solve_second_input :: proc(t: ^testing.T) {
|
solve_second_input :: proc(t: ^testing.T) {
|
||||||
contents, _ := os.read_entire_file("day1/input.txt")
|
contents := utils.read_file("day1/input.txt")
|
||||||
defer delete(contents)
|
defer delete(contents)
|
||||||
pointing_at_zero := solve_second(string(contents))
|
pointing_at_zero := solve_second(contents)
|
||||||
testing.expect_value(t, pointing_at_zero, 6860)
|
testing.expect_value(t, pointing_at_zero, 6860)
|
||||||
}
|
}
|
||||||
96
day2/day2.odin
Normal file
96
day2/day2.odin
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
package day2
|
||||||
|
|
||||||
|
import "core:mem"
|
||||||
|
import os "core:os"
|
||||||
|
import "core:strconv"
|
||||||
|
import "core:strings"
|
||||||
|
import "core:testing"
|
||||||
|
import "../utils"
|
||||||
|
|
||||||
|
sample :: `11-22,95-115,998-1012,1188511880-1188511890,222220-222224,1698522-1698528,446443-446449,38593856-38593862,565653-565659,824824821-824824827,2121212118-2121212124`
|
||||||
|
|
||||||
|
solve_first :: proc(s: string) -> (result: u64) {
|
||||||
|
s := s
|
||||||
|
buf: [100]u8
|
||||||
|
for line in strings.split_iterator(&s, ",") {
|
||||||
|
hyphen_index := strings.index_rune(line, '-')
|
||||||
|
start_str := line[:hyphen_index]
|
||||||
|
start, _ := strconv.parse_u64(start_str)
|
||||||
|
end_str := line[hyphen_index + 1:]
|
||||||
|
end, _ := strconv.parse_u64(end_str)
|
||||||
|
for n in start ..= end {
|
||||||
|
str := strconv.write_uint(buf[:], n, 10)
|
||||||
|
defer mem.zero_slice(buf[:])
|
||||||
|
|
||||||
|
if len(str) % 2 != 0 do continue
|
||||||
|
half_len := len(str) / 2
|
||||||
|
first_half := str[:half_len]
|
||||||
|
second_half := str[half_len:]
|
||||||
|
if first_half == second_half {
|
||||||
|
result += n
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
@(test)
|
||||||
|
solve_first_sample :: proc(t: ^testing.T) {
|
||||||
|
testing.expect_value(t, solve_first(sample), 1227775554)
|
||||||
|
}
|
||||||
|
|
||||||
|
@(test)
|
||||||
|
solve_first_input :: proc(t: ^testing.T) {
|
||||||
|
content := utils.read_file("day2/input.txt")
|
||||||
|
defer delete(content)
|
||||||
|
testing.expect_value(t, solve_first(content), 21898734247)
|
||||||
|
}
|
||||||
|
|
||||||
|
solve_second :: proc(s: string) -> (result: u64) {
|
||||||
|
s := s
|
||||||
|
buf: [100]u8
|
||||||
|
for line in strings.split_iterator(&s, ",") {
|
||||||
|
hyphen_index := strings.index_rune(line, '-')
|
||||||
|
start_str := line[:hyphen_index]
|
||||||
|
start, _ := strconv.parse_u64(start_str)
|
||||||
|
end_str := line[hyphen_index + 1:]
|
||||||
|
end, _ := strconv.parse_u64(end_str)
|
||||||
|
for n in start ..= end {
|
||||||
|
str := strconv.write_uint(buf[:], n, 10)
|
||||||
|
defer mem.zero_slice(buf[:])
|
||||||
|
|
||||||
|
for i := 1; i <= len(str) / 2; i += 1 {
|
||||||
|
if len(str) % i != 0 do continue
|
||||||
|
first := str[:i]
|
||||||
|
found := true
|
||||||
|
for j := i * 2; j <= len(str); j += i {
|
||||||
|
second := str[j - i:j]
|
||||||
|
if first != second {
|
||||||
|
found = false
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if found {
|
||||||
|
result += n
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@(test)
|
||||||
|
solve_second_sample :: proc(t: ^testing.T) {
|
||||||
|
testing.expect_value(t, solve_second(sample), 4174379265)
|
||||||
|
}
|
||||||
|
|
||||||
|
@(test)
|
||||||
|
solve_second_input :: proc(t: ^testing.T) {
|
||||||
|
content := utils.read_file("day2/input.txt")
|
||||||
|
defer delete(content)
|
||||||
|
testing.expect_value(t, solve_second(content), 28915664389)
|
||||||
|
}
|
||||||
86
day3/day3.odin
Normal file
86
day3/day3.odin
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
package day3
|
||||||
|
|
||||||
|
import "../utils"
|
||||||
|
import math "core:math"
|
||||||
|
import "core:strings"
|
||||||
|
import "core:testing"
|
||||||
|
|
||||||
|
sample :: `987654321111111
|
||||||
|
811111111111119
|
||||||
|
234234234234278
|
||||||
|
818181911112111`
|
||||||
|
|
||||||
|
solve_first :: proc(s: string) -> u64 {
|
||||||
|
input := s
|
||||||
|
total: u64
|
||||||
|
for line in strings.split_lines_iterator(&input) {
|
||||||
|
largest := '0'
|
||||||
|
largest_index := 0
|
||||||
|
for c, i in line[:len(line) - 1] {
|
||||||
|
if c > largest {
|
||||||
|
largest = c
|
||||||
|
largest_index = i
|
||||||
|
}
|
||||||
|
}
|
||||||
|
total += u64(largest - '0') * 10
|
||||||
|
largest = 0
|
||||||
|
for c in line[largest_index + 1:] {
|
||||||
|
if c > largest {
|
||||||
|
largest = c
|
||||||
|
}
|
||||||
|
}
|
||||||
|
total += u64(largest - '0')
|
||||||
|
}
|
||||||
|
return total
|
||||||
|
}
|
||||||
|
|
||||||
|
@(test)
|
||||||
|
solve_first_sample :: proc(t: ^testing.T) {
|
||||||
|
testing.expect_value(t, solve_first(sample), 357)
|
||||||
|
}
|
||||||
|
|
||||||
|
@(test)
|
||||||
|
solve_first_puzzle :: proc(t: ^testing.T) {
|
||||||
|
content := utils.read_file("day3/input.txt")
|
||||||
|
defer delete(content)
|
||||||
|
testing.expect_value(t, solve_first(content), 17095)
|
||||||
|
}
|
||||||
|
|
||||||
|
solve_second :: proc(s: string) -> u64 {
|
||||||
|
input := s
|
||||||
|
total: u64
|
||||||
|
for line in strings.split_lines_iterator(&input) {
|
||||||
|
intermediate_total: u64
|
||||||
|
largest_index := 0
|
||||||
|
first := true
|
||||||
|
for i := 0; i < 12; i += 1 {
|
||||||
|
defer first = false
|
||||||
|
largest := '0'
|
||||||
|
starting := first ? 0 : largest_index + 1
|
||||||
|
for c, j in line[starting:len(line) - (11 - i)] {
|
||||||
|
if c > largest {
|
||||||
|
largest = c
|
||||||
|
largest_index = starting + j
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exp := 11 - i
|
||||||
|
intermediate_total += u64(largest - '0') * u64(math.pow_f64(10, f64(exp)))
|
||||||
|
}
|
||||||
|
total += intermediate_total
|
||||||
|
}
|
||||||
|
return total
|
||||||
|
}
|
||||||
|
|
||||||
|
@(test)
|
||||||
|
solve_second_sample :: proc(t: ^testing.T) {
|
||||||
|
testing.expect_value(t, solve_second(sample), 3121910778619)
|
||||||
|
}
|
||||||
|
|
||||||
|
@(test)
|
||||||
|
solve_second_puzzle :: proc(t: ^testing.T) {
|
||||||
|
content := utils.read_file("day3/input.txt")
|
||||||
|
defer delete(content)
|
||||||
|
testing.expect_value(t, solve_second(content), 168794698570517)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
200
day3/input.txt
Normal file
200
day3/input.txt
Normal file
@@ -0,0 +1,200 @@
|
|||||||
|
2232212212212222211221231124224222213132222133122224222123222112324122222122221322222225222342243112
|
||||||
|
2222312114222314322223142323251122424322142244122212213222222222242526225232262212234353242222112242
|
||||||
|
3325444446453345434534234244443254434533443354443344424431124344542134454433534353443542455544444483
|
||||||
|
2334235313232232645234524223233333333323323333233334323332325633143222333322242333132233233132212325
|
||||||
|
2234311224123424222222224432222333212224412234223312244413252153222112433222334322772215422121224273
|
||||||
|
4522445145543645454343253542221455532354534564325445322522535254222337733425252243221532745237255133
|
||||||
|
2214225223121214462323123283942523226421423233325342644222213411423272383842222442422213122912324522
|
||||||
|
2122242232325524322242212232524425223232232233432221122322233512432222441122422314222122221222212225
|
||||||
|
8222353391373332335354222456125222358233122233316323355352531234333527222223352436381343533536331244
|
||||||
|
2127632636444323427265228625582625772229446462233352433587748742382622354425852874557228522772714265
|
||||||
|
5764566853423796763449339447557566366572334553648326634466376656683936736543746865667784426952852681
|
||||||
|
2121232232222322211232122232213212117222223222221652221222212242222222222333321322222222222122522223
|
||||||
|
3311487326434675433324437437335526732665253343574234535363333477334461753847265314545424442324747728
|
||||||
|
6252536321432743472244167342323675732726575412571775613245775732227775657226312524123527567671676189
|
||||||
|
7533722333717216436553422342221352632923463174227273634221314835124324462631282462922324654573644336
|
||||||
|
3334347211322211322233222241233221232124212322322224423224253425525344442212222284312232222324322414
|
||||||
|
8767635775767537537775596426945666564695551577422716939227657554649562833366674365266155727577774737
|
||||||
|
7775767466374676353856676436275545371656656638858776373448786645468766554726777677755355577244574383
|
||||||
|
4124457552243552342355664445373255223422339335535644524442445657442153557545543453354343433643267753
|
||||||
|
6124333457242323425527522653254242224232423232264274434422411227635523364224422236253335315116127532
|
||||||
|
3843363244543644643446444336332633352434545244436626634545444448444432343456656564456736353434435763
|
||||||
|
2422221722221518823422211232528222221322741422521112323225722252542221222152231123242126243222522576
|
||||||
|
1622233224223242225223226253345331335142347122554523313243535325924223222222332241922222221423233121
|
||||||
|
4422161223245313242212152356523252352332114532131212331132322223662325121132255222245126112324622222
|
||||||
|
4233231332312314222233333341133332452443423443134344332243234243444423443533423343333244354382332434
|
||||||
|
6412258431772524433228362126666441227873942928375972932224772779977239924896932962725678357742792757
|
||||||
|
2227271234224232322222332222221223242222336232222321222123332221232363322222123232311223225321123324
|
||||||
|
7589939488935898867996484599788786867736849995938599889798476788896676459989897766888896597487889955
|
||||||
|
3454654452545325445345241613354242541353364444436354434433222254535434343434244433352454491236544424
|
||||||
|
3555422223544453332243232524152235232432234321322225424353448233244453333633454744244242322633235544
|
||||||
|
2124222224441239425244322954112523572245362622825554225282222736532822246252222222625122321847223735
|
||||||
|
3236336542322621344455252325253252236337264153213264532252332554223524342132622262555624217132225523
|
||||||
|
2526592122123332422822131141234342452222223213126221224262242336444543224251621223527425633635432422
|
||||||
|
4627434275335624743842223367643372773416353388754337724725344333445735354575952356357743428124523423
|
||||||
|
5131323342333323332333223333231343333533322133333351233343323326353222332223323323355332223125436611
|
||||||
|
3267823353225414622752883222125222822288682231242712212212222312622262222232262239152212766233622742
|
||||||
|
3233632122333233633333333331713131221283512363322533235333333353253232423232232312332336353232511333
|
||||||
|
7537335633333332333257451533743636333336344234383233638333825643833324862326234334536343333337341534
|
||||||
|
7374226635593315434733244453342226646737436272495334563847314623624832636243233334512322529283445263
|
||||||
|
4332232521223522524213221234143433214242236352238234234145322342235343223263631624558153124433322263
|
||||||
|
2522212625442322522232213336422222244225234213335226232232544223291312422512225122122152452522284222
|
||||||
|
3223121222448242222232124324212222232372344252326235832228322247122222322232422122282212222221222334
|
||||||
|
3532267229665572922222236676865635148363573285411561725352232854345323542463955323228643283411566268
|
||||||
|
3357562156445382573453552434624343344555753334452344275353435433233343545435554553531442333343545323
|
||||||
|
4432285342325163234221332435222123365325322323334325472242261325439248524244352229353255664624222332
|
||||||
|
5431252222458374243642592224346445254352332235374424452555534438625129442442434335415312335582323233
|
||||||
|
4323424443537342215451244432322222322262445334343422342225131243343242422312542126413331246233333414
|
||||||
|
4364214533233224324343345333333332333523353333324214315243433333323413413343433343343135333312343333
|
||||||
|
3223134252331264234231223413332384833323311111472333258232326331233453222123283532162132322222213123
|
||||||
|
2122322222222332222212412222421222212222335322222123213121232223222355331222241212232223222122212222
|
||||||
|
2224234336222923229631122212222612332523531322272232233123322223442324123313256323423442722216232512
|
||||||
|
3333324326462443643324233235432334632354333323332336163232334253342523333223351246225324332353535564
|
||||||
|
2652435323434322222223325242213225213233122223236242225241342232234132526222345232157223522552124332
|
||||||
|
3411222222226222221122322113222221223126312216224221122212222122242222222312122212727221212242231221
|
||||||
|
4456532435443334732561536454334463553353556454575452634335511435653443333455255235435445465545553134
|
||||||
|
2228332566243332533533252323335332231316214213243333232133434226343943323352214232213322333433335212
|
||||||
|
3365426738758286223813946783465373375236837736556379353363573387385397747575645375432373453243373298
|
||||||
|
2374464353232333237353476246233321127232426742236472547323234324246433373336253442412444322493272472
|
||||||
|
3433823214282232422432246132534272631326662712841823232362422314263262437186423322512121721222764782
|
||||||
|
2212221325332253132322215232314222142112221124222235222233333213232243132233223322232175233332233222
|
||||||
|
1322232332221132111122231322312233222432221422243222233423433133225222224321322322323233327224222232
|
||||||
|
1646353222222366621126365622131123313224423236214524422434321352522352211643433222432424454255232342
|
||||||
|
3361246654224456345614565445236613412443442534524666655261365666531522166125553226265651516625126789
|
||||||
|
4324334643744332474343444449444636345744136484654443344354443433464531343444454463434747785437245447
|
||||||
|
5452122332323323125222212232221332222222222222222231232312182222123242331122112231122421221323232422
|
||||||
|
2211251211252222622253221332252222212922232222322322221222422124228552222312622122221221222212274322
|
||||||
|
6312233221334343211331335223232235222532314222232223323423323343132222221133225123323476243233223114
|
||||||
|
6365746667644366678673776345675677645664653459445634735635562465556549961355736666746565734664645547
|
||||||
|
3221223222222332212221322122324222122122122211112214222322122122222121222222112112232222231433222122
|
||||||
|
1422361231254154455327225426522633323223321223545452553224325226628412212635854242361124447216543452
|
||||||
|
3666233524341323332235392765343263455725455245627253316134426537127422852162423422242634754221114822
|
||||||
|
3932433363332433232333726333333322334331332636223844223125733237523322343253323322253713213222333332
|
||||||
|
4493744344343834344443452343336344428436454332433425458644535434483442554494443454624254346454444533
|
||||||
|
5699934925565955456654646643377577254475687546547848667996565655157229655448156642565884755556349397
|
||||||
|
2412344544333346124443433363233223333343333344336734136233423334433433343143232333143233365933334343
|
||||||
|
1629643246222715451822963326475635412213424375224242216415646222713289214241172435222575212224121736
|
||||||
|
2252522432412549512366312275222222373242325416522265412221721226556221122252235273275426642122427522
|
||||||
|
1413222233624135145593211616522426244254844452521552272422254536455622433271358325522434313343224463
|
||||||
|
3224423212432442132244433242415322342232432332224213224242231424233421323324222242444232222443422223
|
||||||
|
3422233231433314333231233333233333333423333433332331343321233243133333323331342324322433343233423333
|
||||||
|
4245333537332234633432342332323328332232224343333343334353514454433722242233353641212333285343631332
|
||||||
|
5223226432542535334272221623443313523443252332624714433827453354551322323276223543323322425214216561
|
||||||
|
9797352317238959996855458878658559627886527272323796576749782735857222478979158267967842734532637298
|
||||||
|
2233315472222233225323231342221225322534411322222222252221323222211243442321411412233132323235245223
|
||||||
|
3242242512222224434221246355113123221214231222336222222262323212273222434232324213712221324222532544
|
||||||
|
5232232112233212221222742221224212221222222132222221222213222521351152131361223222222221231121122122
|
||||||
|
2322322121321222222221241222222222222221211222223124142212222222123212322212222122222421122222252222
|
||||||
|
4334454542453614443324434444464344564545444424444454554444454443434343364344354444434442344253434444
|
||||||
|
2212322523313311222122522623343141322313342331212442222412224524322223244452231316412252262323322222
|
||||||
|
2222212272212222122122222522113122242221222222222212222224122222221222122221224121212222212212412221
|
||||||
|
2262337146893946174873662226535147545374544263382266265526568543452839587616544643126292665282936624
|
||||||
|
3632252333332333333443223232262335313333233332314333343233345243313243233365363313235323332251334333
|
||||||
|
3221232222222231322523223221226228231232223121521222423642122221212222322222122223241211231231323322
|
||||||
|
2221222222211221222321222222321111241222212221223224222111226222222222127221122321122322222222223222
|
||||||
|
6124144523332424733744135412344413421242123443515845332333352381548533242422427444334537433335322574
|
||||||
|
7453758454284755866546827436558875877536562985475866626748436685734445624337877296528474836188782753
|
||||||
|
5725733623574543384332644163741436413538624353353125322413732535252354534676342533233443636764346533
|
||||||
|
3724543433444425433433334324347463344832345544343464234456334442253444343934444232343544352344734343
|
||||||
|
6573566365455442255555524262564564545162457584866572865548453564655536755528442528355355335274452555
|
||||||
|
3222221223313472322312322223112362322312222112321321222323333422212221332242211232332234312422322226
|
||||||
|
6684364344445364343623423527355342443365534744737476345423442431424363432387333644234536114334313743
|
||||||
|
3233322323622333233224331231516231133322322232233222222232342523213345323243332215613222522443353132
|
||||||
|
5233232142321234421331321222222312221211123133132324142229222222223223232222223422232222224362224341
|
||||||
|
1623812226295322222452341223423224244822222244262222226522254322222354323823234622623342833422134243
|
||||||
|
8333332232332233233122333321222322323322223212332226112423223216223222223321223122433232322322133323
|
||||||
|
1445455125545213412322444525223256423451342852266534614222242224134464414322623543351274434232725426
|
||||||
|
5573546354364544548532342646434444554247464434444334464533335544555447424544744345433465422444335345
|
||||||
|
4562565676457555226566266835565649635546563647665517725942797526353315545955559436375764268749645898
|
||||||
|
6575389545666586355556557655258454466366756659655667656556582566555465559455532256575635466765755551
|
||||||
|
2522372325223285372377443342324824613332232726232122334317271432643232352312841322424762333233395233
|
||||||
|
2325212222222422242642232311222421214211222221222214422221222242131222122222521362214232321222124221
|
||||||
|
3443334344363536646652475343315326533663446343345554247337628331336572334445334673738533443665543342
|
||||||
|
2132212222231122223244212212222212228222233272341222122222242352251212322325222212211922122624222222
|
||||||
|
9575468865546956387974456933636335313545532835783785683744589494443434344565445464834553577825488995
|
||||||
|
2232221523232232222252336212562321222122411723311522222422216223221222621222176222222111614122221252
|
||||||
|
2411324543243436234332382332234214435321523422313323444432433242322423134133444241124142332331234444
|
||||||
|
3433433334352343225433321342331324334324436434454253433254434433232322423433335424444433233323343334
|
||||||
|
3223422232335211433544355441333533324324224521343345431633342323623234437234243141342447733332355443
|
||||||
|
2411332212121252533343422283442212322133324233124822321255297222331282432222722222422225234551324542
|
||||||
|
1212122312232223236244132211522422335231321321233311413522332233123232243232312123322221522432333223
|
||||||
|
7334732333343334432153322533242333342334333433542333323344232343333631333134333324341334323332233321
|
||||||
|
4223522232212222331134221222522114354221215211122143472242233151322215324333435221222111222125242222
|
||||||
|
3222333222332132352223221213322232222113211132322232323223262222322232231433522222332222122315322222
|
||||||
|
4241254433142142123222423422312231234332242212342422234142423232314242344322144224343422223212435253
|
||||||
|
4435124394543415434351654321444434453344533554424428337244554533353443435545332645235353543553624434
|
||||||
|
4953545494325476235384273555532639985727583622585542734352939855234464949436494654347624427975335752
|
||||||
|
1232253544413221381621112135437813322644122432322123133243121211252322135345213422232223825116322142
|
||||||
|
7176762571577351467326138773541464454587645184235842236622256247346688118431458431258687874365414659
|
||||||
|
2234232222222322322227532122582522122332422321222223222212152215325222223321221223223281421221322272
|
||||||
|
2425383136529333525526333212772263633723248433642255323553412633172463436577851421236523265744234522
|
||||||
|
3424262253652335642215242324645354215251762247525283223142532441334534261222436332322215452368293294
|
||||||
|
3525625641636442423534235631325866434443266454611324526226469346631344363145685421462455233735624345
|
||||||
|
5276763684237376172166382633667247437378333539246423364394367744953897395676234326742766684349243562
|
||||||
|
4233422424444222242434315214323442396243233222224442344444422342234344623323212323224426342442427234
|
||||||
|
2455654832635651757551426372442144653642514347558494583127222312332291665422754344255247559626765126
|
||||||
|
2423243424113222233244222221234543212222174224434222112321343222222321212333423144422255222222413122
|
||||||
|
3323333236543227312763323323522323831924221328237333782233235623233343431243535322223335382353122133
|
||||||
|
2642453233833326882633337743646383422483273534435314347233322527835732448264631373443364128368335834
|
||||||
|
6321247133126761767527423261476422264542629276752248335262214216629211627473621659671535368222612669
|
||||||
|
5343777868459585575482665644767666773655757774767864755776477544456869665597555737746565466765544456
|
||||||
|
1561262334141223245665535412224136232446722652331362425423161246335221246455132554556132262625222555
|
||||||
|
5725416122222431321214232245422252241221232124234422112421223522241233231222223232253322412111224464
|
||||||
|
1342634245353479774636277557464349166649866286327455463463636677272756383566156564766367664434525544
|
||||||
|
2222214123614223121322332318514242112223523113141382142232142142233231421222362222233262322213343743
|
||||||
|
6232323432322254643333225193233343333423321243245225332132242323632264522322336122232231212351212223
|
||||||
|
3134444244333433225323244553224323233233323334332322233334131123434334332263343643354324333333333333
|
||||||
|
5532268321431422223343232322352234537313226334376242424454322432374463252213326577332252837226334641
|
||||||
|
5454844649566486677668957445459426468556946465673647773845366434343566647393767866654877854729566655
|
||||||
|
2422261322545145375223322644442555224434132222357432123332514282554322645316424122242235533345325354
|
||||||
|
3453712694444284286643414431362435383471343775542345353323626357143668234121858535252933816335326432
|
||||||
|
2692252814322492259236385535955522425425223342262252322174535732822419432644742213257343242222582643
|
||||||
|
6224333313434321343237423443742234422322332352563424433343233254324214252234443222233353343243333445
|
||||||
|
4341454432233455223475433475834433424452531334443432434434543434324144237344441424343324333441646255
|
||||||
|
7434464744476424675745843545587323486545535756479535344455254523223337565676533355416635334549535976
|
||||||
|
3553356443855549413244624436535286254385433334226234338534135565231251535244343542565554226235635334
|
||||||
|
6573451149567373447735352333764555854832677437453435454465844374557267983453554498384334844362354649
|
||||||
|
3222254452422632224342325232542722451421242426521244243425424432222231324222222222222224444132543462
|
||||||
|
2122421222232412322232411222341132211222815512622251621622322425233342126123321222212233532357222222
|
||||||
|
2212232521412331133232455327233262332232323333233232141422322434333231222732323462221323232213222211
|
||||||
|
3232332221511232236313222373234232352363332233522423133221423342323322222133322133333332222243322362
|
||||||
|
2336422223291359222423422723843312323142222422352222453222313423325226423333532343317321422225321142
|
||||||
|
4343335344372513234535342343343331535336323543354634443324332253537437441345145433453334416434323352
|
||||||
|
3237453244334333332544534453434432432453435333343236534453223333433262234443423444431235133845232333
|
||||||
|
6456227863763242255472623627231646622542245446515545363156162236672662444622442685215534225266296642
|
||||||
|
2221332422312223552533253124222143223432222123213232331623267323322312232362544423433242224434255212
|
||||||
|
6223465529466236233843281262333513534533347144636335524465365425322223373826446133535333335936553663
|
||||||
|
2422522232222332132222436342244222212125223234334411321232322424384243222245362244243432424231222224
|
||||||
|
2455326555464433825522411753425666565575612655266536636523455355543744564462384354365164425355735543
|
||||||
|
2222222223222222111222222222212213221233232222222332113222221222262222132221221212122223112222122132
|
||||||
|
3757772733244484433471354299755673837533632373346333735764325326263332933364634336225349447642767347
|
||||||
|
6437333932233533335653243853723337632339355633363334344352325433234631533434522225121233842335623366
|
||||||
|
1522322353333243423526152523222341222216322522631222136252125432232222422232211222322636312253262237
|
||||||
|
3244925232233442334453242444241423433222233234323483133314262243244121333332323242321254222333333331
|
||||||
|
2353223342323312327232322421224232123221132271242314335221333242245322142323223222134422332222223313
|
||||||
|
2232223222152322222221221121232212124133322431112342321232222222321222211232233311232221222232222123
|
||||||
|
3453545474334436473443566463435375435867524354646246572375445332562455654454447265633425553447415546
|
||||||
|
8325538754433525383334434495321546255334334349823332443333244294334243537453573399238389554251532513
|
||||||
|
7656246667563266466285456546456634856666957366663567458366756667648824545698465586644656686567376793
|
||||||
|
4215351543432113323415311324225123133123142113334411255112542454441323515215512232515424352535536789
|
||||||
|
1111223223122222222212222222222121222121222222225422222222212322222222233211242234122121222221222213
|
||||||
|
5678874659337973585843437281459576744742867132948467828423979842756986437335768649266634535646384756
|
||||||
|
3321432323333214232334221532121112433224263223323333735223333142518214311333551312233337431332222331
|
||||||
|
3221122322355421122222453222425223221222442312325124432242254223232322354422311511222231212225272322
|
||||||
|
3326243721153143233313222221442134142337593334337525233226413533524382451233373863723253915332223322
|
||||||
|
4323922223241324233114233242234372243132523323224232522234672222932332123232522413335233242223326132
|
||||||
|
4322523121353121333322532434134233233114242224344533323351233542365523264233431435614923234534264343
|
||||||
|
2413439321538222312223262451523242222223422221322414424312213143162222233225243213124234222242234342
|
||||||
|
3342122215245575225214522336225122222452225452142422442322242424233553522122474675551126222332423412
|
||||||
|
2233212232112143223212212231131212212233232223222231322122222122333332123123222222332132432232232322
|
||||||
|
3123343334341232234231322243134412132113314413424131312441443333224114142441423243344314242144456789
|
||||||
|
5385554234435342844722553342162686427245123565484553455665282646565214247314425653986444256446243726
|
||||||
|
1423322322142322343222211212322232222242323233132433232122324221321213111311232212131253212246222322
|
||||||
|
2251232221222126122123211222231232221222262212221122111222221232222322212212212223221222222222222242
|
||||||
|
4433211425222435344223312275476734164333243421521257332731712552245523223432413345313534272123232531
|
||||||
|
5374861454518743534536288564523325333536745576255527655233661778769564756756829149877383953443336824
|
||||||
|
3313122322343331253323335333343224231126233223221243331333312332333332332332233322123323223253233333
|
||||||
|
4413524351244212524255443427242452242444414252125243353241535255256425423353123331432285522243215864
|
||||||
|
4233233624553534233334344223842653442554363333343434314464443234333354472933333443314632434634254324
|
||||||
|
3553898859594653737688866779538897656477718999867897996545698835748668695853929454638293454775739576
|
||||||
|
3616433333424364342231322772322273742562435322524343222733733633315231217432253332344435423437477333
|
||||||
140
day4/input.txt
Normal file
140
day4/input.txt
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
@.@.@@@@@@@@.@.@@@@@@@@@@@@@.@@@@..@@@@.@@...@@@@.@@...@@@@.@@@.@@@@@@..@.@.@@@@.@..@@..@@.@.....@@@@..@@@@@@@@@@@.@@.@.@@@@.@..@@@@..@@@.@.
|
||||||
|
.@.@@.@@@..@@@.@@..@@@@@.@.@@@@@.@@.@@.@@..@...@@@@@@@...@@..@..@@@@@@.@@@@..@..@@@@@.@.@.@.@@@@.@.@.@.@@@@@@@@...@@..@.@.@@@@@...@@..@@@@@.
|
||||||
|
.@@.@@@.@.@.@@.@@@@@@@@@@..@..@@..@@..@.@@..@@.@@.@.@@.@..@@@@@.@@@@@@@..@@@.@.@..@.@@@@@@@..@@..@@.@.@.@@.....@@@..@@.@..@@.@...@@@..@.@@@@
|
||||||
|
....@@@@@@..@@@..@@@@@.@.@.@.@@@@@@..@.@@@.@....@.@@@@@.@@.@@@@@@.@@@@@@.@@..@@@@...@@@@@@@@@@..@@.@@.@...@.@.@@@@.@.@@@@.@.@@.@@.@..@.@...@
|
||||||
|
@@.@@.@..@@@......@@.@.@@.@@.@.@..@..@@@..@..@@@@@@..@@.@@@@@@@.@.@@@..@.@.@.@.@@@@.@@...@.@@@..@@@@..@@@@@@@@@@@.@@.@@@@@@@.@@@@@..@..@..@@
|
||||||
|
@@@@@@@.@.@.@@@@@.@@@@@@@@@.@@@@@@..@@@@@@...@.@..@.@.@@@@@@@..@.@@@@@@@.@@@@@.@@@.@...@@.@..@@@@.@@@@@@..@@@@@.@@@.@....@@..@.@.@@@@@@@...@
|
||||||
|
@@.@@@@.@.@@@.@@@..@@@@@.@@@@@@@@@@.@@@@.@.@@@@@@@.@....@@@.@.@@@@.@....@@..@@@@@..@@@@..@@....@@@@.@@@..@@@@@@.@..@@.@@@@.@@@@..@@@@.@@@..@
|
||||||
|
..@@..@@@.@@..@@.@@@.@..@@@.@.@@@..@@@@@@.@.@@@@.@.@@..@@..@.@.@@@@........@@@@.@@@.@@.@@@@@.@@@.@@..@.@@.@.@@@.@@@@@.@@@.@..@@@@..@.@@.@@.@
|
||||||
|
@@.@@...@..@@@@@.@@@@.@@@.@@..@.@...@@..@@@@@..@.@@@@@@@..@@@@.@@@@@.@.@@@.@@@....@.@@@.@.@.......@@.@@@..@..@@@@@@@...@..@@.@@@@@.@@@@@..@.
|
||||||
|
...@@@@.@...@@.@.@..@@.@@@..@@.@@@..@...@@@.@..@@@@@..@@.@@..@@...@@.@..@@.@@@@@@@@.@.@.@@@@@@@@@.@...@..@@@@..@@.@..@.@@@@@@..@@.@@@@..@..@
|
||||||
|
@.@.@@@@.@.@.@.@@..@.@@@.@@@...@.@.@.@@.@@@@@@......@@.@@.@@@@@.@@.@@@@....@...@@@@.@@@@...@.@@.@.@@@@.@@@@.@....@@@.@@@@@@@@@@.@@@@.@@@@@..
|
||||||
|
@.@@@@@.@.@..@@..@...@@@.@..@.@@@@@@.@@@@@.@@.@.@.@@...@@@.@@.@.@@@...@.@.@..@.@@..@@...@@@.@.@..@@@@.@@@@..@@@@@.@.@..@..@.@.@@.@....@....@
|
||||||
|
@@@@@@@@@.@.@.....@@....@@@.@@.@@@@@.@@.@.@@@@@..@..@@.@...@.@.@@@.@.@@@@@@..@@.@@....@..@@.@.@@@@.@@.@..@.@@@@.@@.@@@..@@.@@...@@..@@.@@.@.
|
||||||
|
.@@@..@..@@.@@@.@@@@.@@@.@..@@.@@@..@@@@.@@@@.@.@@@@@@@@@.@.@@@@.@@@.....@@@@@.@@@@@@@@@@@..@@..@.@@@@...@@@@.@@@@@@@...@@@@@@@@@@@.@@@....@
|
||||||
|
@@@@@..@@..@@.@@@@.@.@@@@@.@@.@@.@..@...@@@.@@.@@@@@@.@.@@@..@@@@@@@@@@.@@.@..@.@@@..@.@.@.@...@@@@@..@@@.@@@.@@@....@@.@.@..@@.@@.@@.@@..@.
|
||||||
|
@@@@@@@@.@@@@.@@@..@..@.@@..@@.@..@@@.@.@@...@@@@@.@@@..@@@@@@@@..@@@@...@.@..@.@@@@@@..@.@....@..@@@@.@@@@@@.@@@....@@.@@@@.@@@@@..@@.@..@.
|
||||||
|
@@@@.@@@.@@..@..@@@..@@@@@@@@@@@..@.@@@..@@@@..@@@@@@@@@@@@@@..@@@..@@@@@@@@@.@..@...@@@.@@.@.@......@@.@..@@@.@...@.@.@@@.@@@@...@@.@.@..@@
|
||||||
|
@@.@.@@@@@@@@.@@@..@.....@..@.@@.@@@@....@@@...@@@@@@@@@....@.@@@@..@@.@@@@@.@.@@.@@.@.@@@@@@@@@@@.@.@.@@.@@@@..@.@.@.@@@.@@@.@@.@@...@.@@@.
|
||||||
|
@..@@.@@.@@@..@@.@@@@@@.@.@@.@.@.....@..@..@@.@@.@@@@@@@@..@@.@@@@@@@.@@@@...@@@.@@..@@..@..@@@.@.....@.@@.@@@@@...@@.@@@.@@@.@@@.@@..@.@.@@
|
||||||
|
@@@@.@@@@@.@.@@.@...@.@@.@@@@@@@@@.@@@@@@.@@..@@@.@@@..@@.@.@@.@@@@@@.@@@.@..@@.@@.@@..@.@.@@@.@@@@@.@@.@...@@@.@@.@@@@@.@@..@@@@..@.@@@.@@@
|
||||||
|
.@@@@.@....@..@@@@@@.@@@.@@@.@@@@@.@..@@@@@...@@@@.@@.@@@@@@@@.@@@@.@@@.@@..@...@@..@@.@...@@@.@@@@@@...@.@@@@@@@@@..@@.@@@.@@@.@.@@@.@..@@@
|
||||||
|
@@@..@@@@.@@..@@@@..@@@.@..@....@@.@..@@.@..@@@@....@@.@.@.@.@@.@@@@@@@..@@@.@@@@..@@...@@.@@@.@@@@@....@@@@.@@..@@@.@@.@@..@@.@@.@...@@@..@
|
||||||
|
@@@@@.@@@...@.@@..@.@@.@@..@..@.@.@@..@.....@@@@..@.@@@@.@@.@@@@@@@@@.@@..@@@@@@..@@..@..@.@@@@@@..@..@....@@@@@.@@@@@@..@@@@@@@@.@@..@@.@..
|
||||||
|
.@...@@@@@@.@@@.@@@.@@@.@.@@@.@@@@@@@....@@@@@@.@..@@@.@@@@.@@@.@..@@@@.@@@..@.@.@@@@..@.@.@@...@@@.@.@@@.@.@@@@@@@.@@..@@.@.@.@.@.@@@@.@@@@
|
||||||
|
@@@.@@.@@@@@@.@@@@@..@@@.@.@..@.@@@@.@.....@@@.@......@@@.@...@@@..@@@..@@.@...@.@@@@.@.@@.@@@@@@@@.@@.@@@.@.@...@@@@..@.@.@.@@@..@@@@@@.@@@
|
||||||
|
@..@@.@@@@@@@@@@.@@..@.@.@@@@...@@..@..@@.@@@@.@.@....@.@@.@@@.@.@@.@.@.@@.@@@@@@@@@@@...@@@.@..@@.@.@@@@@@@@@@.@@.@.@@@.@@.@@@.@.@@@...@.@.
|
||||||
|
@@@@@@.@@@..@.@@@@@@.@@.@.@@@..@@@@@@@@.@.@@@@.@@@@@@@.@@@.@@@@@@..@@@@.@.@@@@@..@@@@@@@@@@.@.@@.@...@@.@@...@@@@.@@.@.@.@@@@@.@@@.@....@@@@
|
||||||
|
.@@@@@@...@@.@.@@@.@@@..@.@@@@@@@@..@.@@@@@@@@....@@@@@@@.@@.@@@@@@@..@@....@@@@@@@...@..@.@...@@.@@@.@@@@.@.@@@.@.@@@@@@@.@@@@@@@@@@@.@@@@@
|
||||||
|
@..@@@@.@@@@@.....@@.@@.@@@@@@.@..@.@@.@@.@@@@@.@@@@@@@...@.@.@........@..@@..@.@@@.@.@@.@@@.@@@.@.@.@@@.@..@@@@@..@@..@@.@.@@..@.@@.@@@.@@@
|
||||||
|
...@.@@@.@@.@.@....@@@@@..@..@@@..@@@@@..@..@@@.@...@.@@.@@.@.@@..@.@@@...@.@@@@...@.@..@@.@@.@@@.@..@@.@@.@@.@@..@@.@.@.@.@.@@@@@@@@@...@@.
|
||||||
|
...@.@.@.@.@..@@@..@.@@...@@@@@@@@@@.@..@..@.@@.@.@@@@.@@@@@..@.@.@@@...@@..@@@@......@@@.@@@@.@@.@@...@@@@@@@@@@@@@@.@.@@.@@@@.@@..@.....@@
|
||||||
|
@.@.@.@@@...@@.@@@@@....@@.@.@.@@.@@@@.@@@@..@@.@@@@.@@.@@@@@.@@@.@@@@@@.@@@.@@.@.@...@.@.@.@@@.@@..@@@.@@..@@@.@@@..@..@@@@..@@.@..@.@@@@@.
|
||||||
|
@@.@@@...@@..@..@@@.@@@@.@@@@.@@@.@@@@..@@@@@@@@...@@..@@@@..@.@@.@@@@@@...@@@@@@@..@.@@.@@@...@@.@@...@@@@@.@..@@@.@@@.@@@@.@@@@..@.@@@@.@.
|
||||||
|
@..@@@@.@@.@@@@.@@@.@.@@@.@@@.@@@@..@@.@@..@@@.@....@.@.@@@@.@@@.@.@.@@.@@..@.@@.@@@@@@@@...@@@@@..@@@.@@@@@@.@@@@@@.@@.@@@.@@..@@@@@@@@@.@.
|
||||||
|
@@@...@@@.@@@@@@.@.@@@@@..@.@@.@@.@@.@.@.@@@@@@.@..@@.@@@.@..@.@@@@@@@@@.@@@@@.@@@.@.@.@@.....@@@@.@...@@@@@.@@...@@@@@@@@@@@..@.@@@.@@.@@@.
|
||||||
|
@@@@@.@..@.@@@@@@...@@@@..@@@@@.@...@@@@@.@.@@.@@@..@@@@@@@.@@@...@@.@@@.@@@.@@@@@@@@@@..@@.@.@@@.@@@@.@@@.@@@.@..@@@.@@@.@@@..@@@@@.@@@..@@
|
||||||
|
.@@@.@.@@@.@@.@@@@.@.@.@@.@@@@@@@@@@@.@@@@..@@.@@@@@@.@..@@@.@@@@@@@.@@.@...@@.@.@@@@@.@..@..@@@@..@..@@@@@@@@@..@.@@.@..@@..@@@..@@@.@@.@@.
|
||||||
|
@@@.@@..@@@@@.@@@.@@@....@@.@@@@.@..@@@..@@.@@@@@..@@@@@..@.@@@@.....@@@..@@@.@.@..@...@@@@@@@@..@@@.@.@@...@@.@...@@@@@@@@.@@@.@@@.@.@.@@@@
|
||||||
|
@@.@@..@@@@.@..@.@@@@.@@@..@@.@..@.@@@@....@@@.@..@@@@...@.@@.@@@@@@@.@.@.@@@@@.@@@..@@...@@@@@...@@@@@@@.@.@@.@@@.@.@@.@@@@@@.@.@@.@.@.@@@@
|
||||||
|
@.@@@.@@..@@..@@@@.@@.@@@@@@@@@@@.@.@@..@@@.@@..@@.@@@@.@..@@@@@...@@..@@.@.@.@.@@@@@@.@.@@........@@@.@@.@.@@@@.@.@...@@@@....@@.@@@@.@@.@@
|
||||||
|
.@@.@..@.@@@@@@@.@.@@@@.@@@@@@.@@@@@.@@@@.@@@..@.@@@..@@@@.@@@@@.@.@.@@@@@.@@@@@..@@@@@@@@@.@@..@@@@.@@@@..@@.@@.@@@@@@...@@@@@.@...@@@@@@@.
|
||||||
|
@@.@.@@@.@..@.@@.@.@@..@.@.@@@@..@@.@@......@.@@.@@@@@@@@..@@@@.@.@.@@@@@.@@@.@@@.@@.@@@...@....@....@@@@@@....@.@@@@@.@@..@@...@@@@@@..@@.@
|
||||||
|
@.@@.@@@@...@@@.@@.@.@.@@.@@.@@@@..@@@@.@@@.@@@@@@@@.@.@@@@@@@@@@@@@@.@.@@@.@@.@@.@@.@@@@@@@.@@@@...@@@.@@...@@@@@@.@.@.@.@@.@@@@.@@@.@.@@@@
|
||||||
|
@@.@.@@.@..@.@@..@..@@@@.@@@@@.@@.@.@@@.@@@.@@..@@@@...@@@@.@@..@.@@.@@@@.@@@.@@@..@@.@.@@.@..@@....@.@@@.@@@@@@.@@.@@@.@@@..@.@.@@...@@@@..
|
||||||
|
.@@@..@@@..@.@.@@@@@.@..@@@..@@@.@@@@@.@.@..@@...@.@@@@.@@@@@@@@@.@@@..@@@@@@@@@@@@.@@@@..@@@..@..@@@@@@@@..@@@@@..@@..@@..@@@@..@@@@.@@.@@.
|
||||||
|
@@.@....@@@@@@@@..@.@@@@@@@.@@.@@@@..@@@@.@@..@..@@.@@@@..@@@@..@@...@@@@@.@@@@@@@@@..@@@@@.@@@.@@@.@..@@.@.....@@@@@.@@@@@.@@@.@@.@@@@@@@@.
|
||||||
|
.@@@.@.@..@@.@@...@.@.@.@.@.@@@@@@.@@@@@.@@@.....@@@@.@.@..@@@.@@@@@@@@.@@@@@@..@.@..@@@.@@@@@..@@@@@...@@@@@.@@@.@...@@..@@@@@@@@@@.@@@.@.@
|
||||||
|
@..@@@@..@@..@.@@..@@@@@@@@@.@.@@.@@.@@@@@.@@@@@@@@@..@@.@@@@@@.@@@@@@..@@@.@..@@@@@@@@...@@@..@@..@@@@.@.@@@@@@....@....@@@...@@.@@@@@@@@.@
|
||||||
|
@@@.@@@@@@.@@@.@@.@.@@.@.@..@@@@..@@@@..@@@.@.@.@@@@@@.@.@.@@@@.@...@.@@@.@.@@@@.@@.@@@@@@.@@@.@@.@@@@.@@.@@@@@@@@@@....@@.@@.@.@@.@@@@@@@..
|
||||||
|
@@.@@.@@@....@@.@@.@@@@@@..@@@..@@@...@..@@@@@..@.@.@.@@@@@@@.@@.@@@.@@..@@@@.@..@@@.@@@@@.@.....@..@@@@@.@..@@.@@..@..@@@..@@@@@@@...@@@@@@
|
||||||
|
@@@....@@@@@@@.@@@@@@@@@...@@.@..@.@@@@@..@..@@@@.@@@@@@.@@.@.@.@.@.@@@@.@@.@.@@@@@.@@@..@@@....@..@.@.@@.@.@.....@@@@@.@@@@.@.@@@@.@.@.@...
|
||||||
|
@@@.@.@@.@@@@....@@@@.....@.@@@..@@.@.@.@...@@@@.@@@@@@@.@@@@@.@..@.@.@.@@@.@@@@@..@@@@@.@@.@.@.@.@.@@..@.@.@@@@@@@..@...@..@@.@@@@@...@.@@@
|
||||||
|
@@@@@@@@.@@@@@@@.@@@@@@@@@@@@.@@@@@@.@..@.@.@@..@@.@@.....@@@.@.@@@.@.@@.@..@@@.@.@@.@@@@..@@.@@@....@@@@.@@..@@@.@@@@@@@.@@@@...@@@@...@.@@
|
||||||
|
.@@@@@@@@@.@@@@@@@..@@@@@@@@.@@@@@@@.@@@@@@@...@@@.@@@.@@.@@@.@..@@@..@@@.@..@@@@@@.@@@..@@@@@.@@@@@@@@.@@..@@@@@.@@@.@.@.@@@....@.@..@..@@@
|
||||||
|
@@...@@@@@..@..@@.@@..@@.@@..@@.@.@@@@@@.@@@@.@@@...@@..@@@@@@@@@@@..@@@.@@@@..@@..@@@@@@@@.@@.@.@@..@@@@@@.@@..@@.@.@@@@@..@@@@@@..@@..@@.@
|
||||||
|
@.@@@@@.@.@@@@@.@@.....@@@.@.@@@.@@@..@@@@.....@.@..@@@...@..@@.@@..@@@....@@.@.@@@@@@@@@@@@@@@..@@.@..@.@@@@@@@.@@..@.@.@@@@@@@@@@@.@@@@.@.
|
||||||
|
...@.@.@@@@@@.@@@..@@..@@@...@@..@.@..@@@@@@@@@.@@..@@..@@@@@.@.@@.@@@@@@@.@@@@@@@@.@..@.@..@@@@@@.@@@@@@.@.@@.@..@@@.@@@@@@@@@@@@@@@@.@@@@@
|
||||||
|
.@@@..@@.@..@@@..@..@@@@..@..@@@@@@@@@@@@@@.@@@.@@@@.@@@@@.@@@....@.@@@@.@.@@@@.@.@.@.@@.@@@@.@@..@..@@@@@@...@@..@.@..@@@@.@.@@@@..@..@@@@.
|
||||||
|
@@..@..@..@@@@@.@@@....@@.@..@.@.@...@.@@.@@.@@@.@@.@@@@...@@..@@@.@@@@@@@@..@@@.@@@@@@.@@.@@.@@@@@@@.@@@@@.@@...@@@@@..@@@@@@@.@@@@...@@@@.
|
||||||
|
.@@.@@..@@@@@@..@@@@@@@@@..@...@.@@..@.@....@.@@@@.@@@....@..@...@@@@@.@..@.@.@@@.@@@@@..@@.@@@@@...@..@.@@...@@.@@@@@@@@.@@.@@@@.@.@..@....
|
||||||
|
..@@.@..@@@.@@.@.@@..@.@@..@...@..@@.@@@@@@@@@@@@.@.....@.@@@.@@@@@...@@.@@@.@.@@@@@@.@@.@......@@.@@@..@....@@@@..@..@...@.@@@.@....@@@@@@.
|
||||||
|
@@@@.@@.@.@@...@@.@..@@@@.@@...@.@@@@@.@@@..@.@.@....@@@@.@@@@@.@@@@@@@@@..@@@.@.@..@@.@@@@@@.@.@.@.@.@.@.@@.@@@.@@@@@@.@@.@.@@.@@...@@@@.@@
|
||||||
|
@@@@.@.@.@@@.@@..@.@@@.@@..@@@@.@.@@@@@@.@..@.@.@...@@.@@@.@.@@@@@@.@@.@.@.@.@@@@.@@@....@@@@@.@@.@@@@@.@@@@.@@@@@..@.@..@.@@@@..@@@..@@@.@@
|
||||||
|
...@.@.@@.@@.@@.@@@.@@@..@@@@@@@@@.@@@@@@@@..@...@..@@..@.@@@@..@@@@@@.@@@@@@@@@@@@...@@.@..@@@...@..@@@@..@..@@@@@@@@..@.@@@.@@@.@@@@@@@@@@
|
||||||
|
@.@.@@@.@@.@.@@@@@.@@@@@@@@@@@..@.@@@@@.@.@.@@@@@@@@..@.@.@@...@@.@@.@@.@@@.@@@@@.@@@.@.@@.@..@.@@@@.@@...@.@.@@.@..@....@..@@@@@@.@@.@@@@@@
|
||||||
|
..@.@@.@@@.@@..@@.@@.@@..@@.@@@@@@.@@...@@..@@@@...@.@@@.@@@@@@@@@...@@@.@@@@@...@@.@@..@@..@..@.@.@.@@@@.@@.@..@@@@@@..@@@@@@@@@@@@@@@@@@@@
|
||||||
|
.@@.@@.@...@@....@@.@.@@..@.@.@@.@@@@..@@@@@@...@@@@@.@....@@.@..@@@..@@.@....@@.@@@.@....@@@.@.@@@@.@..@.@.@@@@.@@...@.@.@@@@....@@.@@.@.@@
|
||||||
|
...@@@@.@@@@.@@@.@...@..@@.@@@@.@@@@@..@.@@@@@@@....@....@.....@.@@.@.@@@@@.@@..@@@...@@@@.@@..@@..@.@@.@.@@.@.@@.@..@@@@@.@..@@.@@@.@@@@@@@
|
||||||
|
@@.@@@..@@@.@@@..@@@.@..@@@@@@.@@@@.@@@@@@..@.@.@.@@..@@@@.@@@.@@.@@@@.@@@@@@@..@@@@@@@@..@...@@@@@@.@@@....@@@@.@@@@@.@@@.@@@@@@@@.@@...@@@
|
||||||
|
..@.@@@@..@@....@@@.@@.....@@@@@@@@.@..@.@..@@...@.@..@@@.@@@.@...@@...@@@@.@.@@.@@@...@..@@@.@..@.@@@@@.@@...@@@..@..@@@..@@.@@@@@@..@@@@@@
|
||||||
|
.@...@.@@..@@@.@.@@.@@...@.@@@@.@@@@@@..@@.@@@@....@..@.@@.@@.@@.@@@.@.@@@@.@.@@..@@@@@..@.@@.@.@@.@@@@...@@...@.@.@@@.@@@.@@.@@@@@@@.@@@@@.
|
||||||
|
@@..@@@@@.@...@..@..@@@..@@@.@@@@..@.@@.@@@@.@@.@@@@...@..@@@@@@@@@@.@@@@@@.....@@....@@...@@@@@..@@@.@@@@@@@@.@@@...@.@@.@@..@.@..@.@@@@@@@
|
||||||
|
.@..@@..@...@@.@@@.@.@..@@..@.@.@.@..@@@@@@..@..@..@@@@@@.@@.....@.@@@@@@@.@.@.@@.@@@@...@@@@@@.@.@@.@@@@@.@..@@.@.@@@@@@@@@@@@..@@@@.@.@.@.
|
||||||
|
@...@@@@@...@@@@@@.@@.@...@.@@@@@@@@@@..@.@@@..@@.@@@..@@@@@@..@@@@@.@@..@@@@@@@@.@@@@@@@.@.@@@@.@@@@@@@...@@@@@@.@.@.@@@@..@@..@.@.@@@@@@.@
|
||||||
|
.@..@@.@@.@@@.@@.@@...@@@.@..@.@@.@@@..@@..@@@.@..@@@@@.@.@@..@.@..@...@...@...@@.@.@.@.@@.@@.@@.@@@@..@@@..@@.@@.....@@@@.@...@@.@...@.@@..
|
||||||
|
@@.@@.@@.@@@@@@@.@@.@..@@@@@@@.@...@.@@@..@@..@@.@@@@..@@@@@@.@@@@@.@@@@@@@.@.@.@.@.@.@.@.@@@@@@@..@@@.@@@.@@.@.@@@..@@@.@@@.@@@@.@@@@.@.@..
|
||||||
|
@@.@..@@@..@..@.@@@.@@@@@@.@.@@@@@@@@@..@@.@@@@.@.@.@@.@@.@@@@@@..@...@.@@@@@@@@@@@@.......@@@..@...@@@@@@@..@.@@@@@@@@@....@@@@@@@@@@.@@...
|
||||||
|
..@.@@@.@@..@@...@.@@@@...@.@@@@..@@@.@..@.@...@@@.@@.@@@@@.@.@@.@@@.@@.@@@@@.@@@.@@.@@@..@.@..@@@@@@@..@@@@@...@....@.@@.@@@..@@@@.@@.@@@@@
|
||||||
|
@@@.@.@.@@@@@@@@@@@...@..@@@@...@@@@@.@...@@@@@@.@@@..@@@@..@@@@@@@@@@@@@@@@.@@@..@@.@@@@...@..@......@.....@@@.@@@@@@@@@.@@@..@@@@@.@@@.@.@
|
||||||
|
@.@.@@.@@.@.@..@.@@.@@@@@..@..@@@@@@.@@@@.@@@@@.@@@@@@..@@@..@@@@@@.@.@@....@..@@@.@@@..@@@@...@@.@@@@@@@@.@@.@.@.@.@@.@.@.@.@@@@@@@..@@@..@
|
||||||
|
@@@@@@@..@.@@@.@@.@..@@....@.@@.@@.@@@.....@@@@@@@.@@.@.@@..@@@@@@@...@...@.@@@@@..@@@@@@.@@@@.@@...@@@...@@@@@@.@@@@.@.@@.@....@@@.@@@@@...
|
||||||
|
@....@@.@.@.@...@@@..@.@@@.@@@@@.@@@.@...@@.@@.@@..@.@....@.@@.@.@.@.@.@@.@@@@.@@.@@..@@@@@@@@@..@.@@@.@@.@.@@@@@@@@@@@@.@.@...@..@.@@@..@@@
|
||||||
|
.@@.@@....@@@.@@@..@.@.@..@.@@..@..@@.@@..@.@@@@@@.@@.@@@@@.@...@@@@@.....@@@....@.@@.@@@@@@.@@@@...@@.@@.@@.@@@@@@@@@.@@@@...@@.@.@@.@@@.@@
|
||||||
|
..@@@.@@@.@@@..@@...@@@@@@@@@@.@.@@@@@...@@.@@@@@.@@@..@.@...@@.@@.@@.@@.@@@@@.@.@@@..@@@..@@.@.@..@@@..@@@@.@@@@@@...@@.@@.@.@..@@.@@@.@@@.
|
||||||
|
.@@@.@@@@@@.@@@@@@.@@.@..@.@@@..@@.@@@@.@@@.....@@.@@.@.@.@@@.@@..@@@@@@.@@.@@...@.@@@@@@@.@@@..@.@@..@@@@..@.@@@.@@@@@@@@@.@@@@.@@@@.@@@@@.
|
||||||
|
@@.@@@.@@@@.@@.@@@@.@@@..@@@@@@@.@...@@.@@..@@@@@.@@@@@@.@...@@.@@.@@@@@.@@@.@@@@@@..@.@@@@@@@@@.@@@.@@.@.@.@@@.....@..@@.@@.@@...@.@..@..@@
|
||||||
|
.@@...@@@@.@@.@@@@@@@.....@@@@@@.@.@.@.@@@@@@@@...@.@.@.@@.@@.@.@.@@.@@@@.@@.@.@@@@@..@@@@...@@@@@.@@@@@.@..@@@.@@@@@..@@@@@@.@@@..@.@@...@.
|
||||||
|
@@@@@@@@@.@@@@@.@@@@..@.@@@@@@@....@@@@......@.@.@.@@@.@.@.@@@.@.@@.@@.@@@@.@@..@..@@@@@@.@@@.@@@@@@@@@@@@..@@@.@@...@..@.@.@.@..@@.@@.@@.@@
|
||||||
|
@@....@@@...@@@@..@.@.@.@@@...@@@.....@@......@.@@.@@@..@@@@@@.@@...@.@@@@@@@@.@....@@..@...@.@@...@@@@@@..@@.@@.@@@.@.@@.@.@.@....@..@@.@@.
|
||||||
|
@.@...@@@..@@@@@@@@...@...@@@@.@@@@...@..@.@.@@.@@@@@.@@@@@.@@.@@.@..@@.@@..@@....@@.@@@@@.@@@@@@@..@@@@@..@.@@.@@@.@@.....@@@@.@.@.@@.@@@@@
|
||||||
|
@@@@.@@..@.@.@....@@@@.@@.@@...@@..@@@@@@.@@.@..@@@@@.@@@..@@@.@@@..@@@@@@..@@..@@...@@@..@@@.@@.@@..@@.@@@@....@......@.@@@.@@@@@.@@.@@..@@
|
||||||
|
@@@@@.@@.@@@@.@..@@..@...@@@@.@@..@@@@@.@@.@@@@@.......@@..@@@@@@@..@.@.@@.@@@@@@@.....@.@@@.@@@@@.@...@@.@@@@@.@@@.@@@@@@@.@@@.@...@.@.@...
|
||||||
|
.@@..@@.@@..@@@.@@..@@.@@@.@.@.@@@..@..@@@.@@@@@.@.@.@.@.@.@@@..@@..@@.@...@@@..@...@@@.@@@@.@@@@@...@@@..@.@@.@.@.@@.@@@@@@.@@@.@.@@.@.@.@@
|
||||||
|
.@@...@@....@@@@@@.@....@@@@@.@.@.@@.@@@@.@.@@@@@.@@@@@@@@....@@@.@.@@...@@@@@.@@@@@@.@..@@.@@.@@@@@@@@..@@.@.@@@..@@@@@@@@.@@..@@@.@@@.@@.@
|
||||||
|
.@.@@@.@@@.@.@@...@..@@@@@@...@@@@..@@@@@@@@.@.@@.@@@.@.@@@@..@.@@.@@@@@.@@@@@.@@@@..@@@@@@@@.@@.@@@.@..@@@@@.@@..@@..@.@@@@.@..@.@..@@.....
|
||||||
|
...@@..@@.@@@.@.@@@@@@@@@..@@@@@@..@.@@@@......@...@.@...@.@@@.@@....@@.....@@.@@..@..@@@@...@..@@..@@..@@.@.@@@.@.@.@@.@.@@.@..@@..@@..@@@@
|
||||||
|
.@@@@@@@.@.@@@@@@@@.@@@@@@..@@....@.@@@@@...@@@@@.@.@.@@..@@@@@..@@@@@@@.@@.@@.@@@...@@.@.@@@@.@@@@@.....@..@.@@.@@.@.@..@@@.@.@.@..@@..@@@.
|
||||||
|
@@@@@@@@..@@.@@.@.@@@@@@.@@.@@@@@.@...@@@@...@.....@@@....@@.@@@@@@@..@@@.@@@@@....@@..@@.@@@@.@@.@@@@@@@.@...@@.@@@.@.@@@@@@.@...@...@@.@@.
|
||||||
|
@@.@.@@@..@@@.@.@@.@@@.@...@@..@@@.@.@.@@@.@.@...@@.@@@@@@@.@@.@@@@@..@@@@.@@@.@@@.@@@@@@@..@.@@.@@.@..@@@@@.@..@.@..@@@....@..@..@@@@.@@..@
|
||||||
|
@.@@@.@@@.@...@@@.@@@@@@@.@@@.@...@.@@@@...@@@@@.@@@@@@@@@@..@@@@@.@@@@.@@@.@@.@@.@..@@.@@@@@.@@@.@@@@@.@@.@@@.@.@.@.@.@.@@@@...@..@@@@@..@@
|
||||||
|
...@@@@@.@.@.@@@@......@..@.@@@@@@@.@@@@@@.@@@.@..@@@..@.@@@.@.@@@@@@@.@.@@@@..@@.@@@@@@@@@@..@@@@@@@@..@..@..@@@@...@@@..@..@.@@.@@.@.@.@@.
|
||||||
|
@...@.@@@.@@.@@..@@.@@...@@@.@.@@.@@@@.@..@@@@@@@@@.@.@@.@@@@@@.@@.@.@@..@@@..@@@@..@@....@.@@@.@@@..@@@.@..@@@@@@@@@@.@.@@@.@....@@@@.@@@.@
|
||||||
|
@@@.@.@@@@@..@.@.@.@@.@..@@...@@@@..@@.@....@@.@.@@@@.@@.@@@.@@.@.@@.@.@.@.@@..@@..@@@@@@@@@.@@@@@@.@@@@@..@@.@@.@@@.@@.@.@@@@.@..@@.@@.....
|
||||||
|
.....@@@@@@..@@..@....@@@@@@@..@@@@..@.@.@.@@.@....@@@@@.@@...@..@@.@.@..@@@..@.@@@@...@@@.@@@@@@@@@@@@.@.@@@.@.@@@..@@@@.@.@@.@@@@....@@@@.
|
||||||
|
....@@.@.@.@@@..@@@.@@@@@@@@@.@..@.@.@@@.@...@@@@.@@.@.@@.@..@..@@@@@@@...@@@...@.@@.@@@@@@@..@@@@@@@.@@.@@@@@@.@....@.@@.@.@@.@@@@.@@@@...@
|
||||||
|
.@@@.@@@@@@..@.@@@@.@@.@.@@@.@@@@@@@@.@@@@@@@@@@@.@@..@@@@@...@@@@@@@@@.@@@@@@@.@..@@@@@.@@@@@@@@@@@....@@@.@@@.@@@@@@.@@@.@@@.....@@@.@@@.@
|
||||||
|
.....@@@@.@@.@..@@@@@@@@.@@@@.@@@@..@@@@.@@@..@.@@@.@@.@.@@.@@@@..@@@..@@@@@@...@@@.@..@@...@@@.@@@@@.@@..@..@.@@@@@.@@.@@.@..@....@@.@..@.@
|
||||||
|
.@.@.@@.@@@.@@.@.@@@@@......@@@....@...@.@@@@..@@@..@.@.@@@.@.@@.@@@.@..@.@@@.@@...@.@@.@.@.@@@@@@..@@@@@@@.@@.@@@.@.@..@@@@..@@@.@@.@..@.@.
|
||||||
|
@.@.@@@@.@.....@@..@.@@@.@.@..@@@.@.@..@.@@@@@@@.@@@@@..@@..@@@@@.@@...@@.@@@.@@.@.@@@@@@@@@@@@...@@@.@@@@@.@@@@@@.@@.@@@@@@..@.@@@...@@@@..
|
||||||
|
@@@@@.@.@.@.@@@@@@@.@.@@@@..@@@@.@@.@@...@@.@@...@@@.@@.@.@@@@@.@@@@@@@..@@@@@@..@@.@@.@.@@.@.@@@@@@@@.@@@@...@@..@@@.@..@..@@.@..@@@..@@@@.
|
||||||
|
.@.@.@.@@@@@@@@@.@@.@@.@@@.@@@@@..@.@..@@@.@@@..@@.@@.@@@....@@@@@....@@@@@.@@@@@@@@.@@.@..@@.@...@.@.@.@@..@@.@.@.@@@.@@.@@@@@..@@@.@@@@@..
|
||||||
|
@@@.@@.@@@.@@@@@..@@@@.@@@.@@@@@.@@..@@.@.@..@@.@@.@@.@@..@@@@@@.@@@@@.@.@.@..@@@.@@@....@@.@@..@@@@@@@@@@.@.@@@@@@...@.@@..@@@@..@@@@.@.@@@
|
||||||
|
.@@@..@@@.@.@@@@@@.@.@@@@.@@@@@@.@@@@@.@@@@@@.@@@@.@@.@@@@@@@@@@@@@@@@@@@.@@@..@@@@@@..@..@@.@@@@@@@..@....@@..@.@@.@@.@@..@@@.@.@@..@@..@@.
|
||||||
|
@@@.@.@@@@.@@@@@@.@@.@.@@..@@@..@@@..@.@.@.@@@@@@@@@@@@..@@@@@@@@@@@.@@@@@@..@.@@@@....@@@@@@...@@.@@@.@.@@@@.@.@.@@.@@@@@....@@@@..@@.@@@@@
|
||||||
|
.@@@@@@@@@.@.@@.@.@.@@..@@@.@..@@@.@@@@@.@@@..@@@..@@@@@@@@@@@@.@@@.@@@@@@...@@.@@...@@@@.@....@..@@..@@.@@@.@@@.@..@.@@@@.@.@@@@.@....@@@@@
|
||||||
|
@.@@.@@@@@.@@.@@@@@@@@@@..@@@@@@@@..@.@..@@@@.@.@.@@@@@@.@@@@@..@.@@@..@@@@.@@.@.@@@@.@.@@@@@@@@.@@@.@@@@@.@@@...@@@@....@.@@.@.@...@..@.@@@
|
||||||
|
..@@...@@@@@@@.@.@@..@@@@@@@....@@.@@..@..@@@.@..@@.@.@@@@@@@@@@...@...@@@@@@@.@.@@@@@@.@....@@@@......@@@.@@...@@@@@@..@@@@@@@@@@.@@@@@@@..
|
||||||
|
@@.@@..@@@@@@@@.@.@@.@@@.@.@@@@@@@.@@@@@@@.@@.@..@@@.@...@.@@@@...@..@@...@@@@@@.@@@@@.@@@..@@@@.@@@@@@...@@@.@.@..@..@@@@@.@.@.@.@@..@@@...
|
||||||
|
@@.@@@@.@.@.@@.@.@.@...@@@..@..@@@@@.@...@@@@.@.@@.@@..@@@..@@...@@@..@@@..@@@.@@.@.@.@.@.@@@@@..@@@@..@@@@@@..@@@@@@@@@@.@.@..@@@.@@@..@.@.
|
||||||
|
...@@@@@@@@@@@.@..@@...@@@@@@@@.@@@.@@@.@.@@@@.@@...@.@@..@@@@@..@.@@@..@.@@@@@.@..@@.@@@@@@@.@@@@@@@..@@@@.@...@.@@@@@@..@.@@@@@@@.@..@.@@.
|
||||||
|
..@@.@@@.@.@.@@@.@@.@.@.@@@.@@@@@@@.@@..@..@@@@@@@@.@@.@@@..@@..@@@@@.@@@@.@.@.@@@..@..@@...@...@@@@.....@@@.@.@.@..@.@@@@@@@@@@...@..@@@@@@
|
||||||
|
@@...@@@@@@@@.@@@@.@.....@@@@@@@@.@@...@@@@@.@@@..@....@@....@.@@.@@@.@.@@@@@@..@...@..@@.@@@@@@@@@@@@@@...@@@@@@.@@@@@@@.@@.@.@@@.@@@@.@@@@
|
||||||
|
@@@@...@@@@.@@.@...@@.@@@@..@@.@@.@@@@.@.@@..@@.@.@.@.@.@@@@....@..@@@@.@@@@@@@@@@@...@@.@.@.@@@@@@.....@@@@@@.@@@@@@.@.@..@@@@@.@...@@..@@@
|
||||||
|
@..@.@@@...@@@@.@@@@@@.@@@.@.@@@..@...@.@@@@@.@.@@@@@@@@@@..@@@@..@@@.@@@@@@@@@@@@@@.@@@@@@@@@@@@..@@.@...@@.@@@..@@@@.@@@@@...@.@@@.@@..@@.
|
||||||
|
.@..@@..@..@@@@.@.@@.@@@@@.@@...@@@.@..@@@@@@@@..@..@@@@@@@.@@@@@@@@@@@.@@@@@@.@@..@@@@.@.@@.@@..@.@@@@.@@@.@@@@...@@@.@.@@@....@@@.@.@@@@@@
|
||||||
|
@@@@.@.@.@@@@@@@@.@@@@@.@@...@@@@@.@@.@@...@@@@@@..@@@@@@@.@..@...@@@.@.@.@@@...@@@.@..@@.@@@@...@@@@@..@@..@@@.@@@.@.@.@@@@@@@@.@.@@@@@@@..
|
||||||
|
.@@..@@..@@@@@@@@@@.@.@@@..@@@@@..@@.@@.@.@.@.@@@@.@@@@@@......@.@@@.@..@@....@.@.@@@@..@.@.@@@@@@@..@@@@..@@@@@.@@..@@.@.@@@.@..@.@@@@...@@
|
||||||
|
.@.@@.@@@@@....@@@@...@@@@@.@@@.@.@@@@@@@...@.@@@@@@.@@@@@@.@@@@@.@..@.@@.@@..@.@...@@@.@..@@@..@..@.@...@@......@.@.@@@@@@..@@@@@@@.@@..@.@
|
||||||
|
.@@.@@..@@@.....@.@@..@.@@@@.@.@@@@@.@@@@...@@@@.@.@...@.@@.@@.@......@.@@.@.@@..@@..@.@@@@.@@@.@..@.@@@@.@@@@.@@@@@@@@@.@@.@@.@@@@@@@@@@@.@
|
||||||
|
@@@@.@@.@@@@.@@@..@@@@@@@@.@@@.@@@@@@@@@@....@@.@.@@.@@.@.@.@@@@.@@.@.@@@@..@@.@....@@@@@.@@.@@.@@.@.@@@@@@.@@@@@@@@..@.@...@@..@@@@..@@@@@@
|
||||||
|
@.@.@..@@.@.@@@@.@@@.@@.@@...@@@@.@@.@.@@..@@..@@.@@.@.@.@@@@.@@.@..@@@@@@.....@@@.@.@@@@@@.@@@.@.@..@.@@@.@....@@@@@.@@@@.@@.@@@.@....@.@@.
|
||||||
|
@@.@.@@@.@@@.@@.@.@@@@@@@.@@.@@.@@.@.@.@..@@@@@@.@@@.@.@@@.@...@@@@@.@.@@.@.@...@@@@.@@.@@.@.....@.@@....@@.@..@@@@@@@@@.@.@@@@....@@@@.@.@@
|
||||||
|
@@@@@.@.@.@..@.....@@@@@@.@.@..@.@.@@@..@@@@@@@@@@.@@.@@..@.@@@@@.@@@@@@@@@@..@@.@@@@.@@.@@.@@@.@@.@@@.@@@@.@@@.@@@.@.@@@@..@@@.@.@@@.@..@@@
|
||||||
|
..@..@@@@@@@@....@@@...@@@@..@@...@@.@@@@@@....@.@@@@@@@..@@@@..@@@@@@.@@@.@.@@.@@@@@@@@@@...@.@.@@...@.@@@..@..@.@.@@@@@.@@.@@.@@....@@@.@@
|
||||||
|
@@.@.@.@@@@@@..@@.@.@@.@@.@@@..@@@@@@@@.@.@@@@@@.@@.@@...@...@@..@..@@@@...@.@@@@.@@@@@.@@.@@@@@..@.@.@.@@.@@@@@.@@@.@@.@.@.@..@..@@.@@..@@@
|
||||||
|
@@@@.@@@@..@.@@@@@@@@.@.@..@..@.@...@.@@@@@@@@.@@..@@@@@.@@@@.@...@.@.@@@@..@.@@@.@@@.@@..@@@@@..@@@@..@@@@@@@...@..@.@.@@.@@.@@.@@...@@@..@
|
||||||
|
@@@.@@@@@@@@@.@@@@@.@@@@@@@@@@.@@@@.@@.@....@.@.@.@@@.@..@@.@@.@....@@.@@@...@.@..@.@@@@@.@@@@.@@.@@@@@@.@@@..@.@@..@@@.@@.@@@.@.@.@@@@.@@@@
|
||||||
|
.@@@@@....@.@@@@@@@@..@.@@.@.@.@.@@.@@@...@.@@@@@@@..@@@.....@@....@@@@@.@@.@..@@@.@@@.@@.@@@@@@@...@.@..@@@@@@@@@@@@@@.@@@@@..@@@@..@@@@.@@
|
||||||
|
@@@@@@@.@@@@.@@@@.@@.@@@.@..@@.@@@@@.@.@@@@@@.@..@.@.@...@@@..@.@...@.@@.@@@.@@...@@..@...@@@.@.@..@@@.@@@@@@@@@@.@.@..@@.@.@@@@@.@@@..@@@..
|
||||||
|
@@@.@..@@@@@...@..@@@.@@@@.@@.@.@@@@@@..@@.@.@.@@.@@@@@@.@...@@@..@.@@@.@@@@@.@@@.@@@....@.@@.@.@@@@.@.@@@@.@@..@@@.@.@@.@@..@@@@@..@@@...@@
|
||||||
155
day5/day5.odin
Normal file
155
day5/day5.odin
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import "core:fmt"
|
||||||
|
import "core:log"
|
||||||
|
import "core:os"
|
||||||
|
import "core:strings"
|
||||||
|
import "core:strconv"
|
||||||
|
import "core:testing"
|
||||||
|
|
||||||
|
sample :: `3-5
|
||||||
|
10-14
|
||||||
|
16-20
|
||||||
|
12-18
|
||||||
|
|
||||||
|
1
|
||||||
|
5
|
||||||
|
8
|
||||||
|
11
|
||||||
|
17
|
||||||
|
32`
|
||||||
|
|
||||||
|
Range :: struct {
|
||||||
|
start: u64,
|
||||||
|
end: u64,
|
||||||
|
}
|
||||||
|
|
||||||
|
parse_range :: proc(s: string) -> Range {
|
||||||
|
range: Range
|
||||||
|
delim_index := strings.index_rune(s, '-')
|
||||||
|
range.start, _ = strconv.parse_u64(s[:delim_index])
|
||||||
|
range.end, _ = strconv.parse_u64(s[delim_index + 1:])
|
||||||
|
return range
|
||||||
|
}
|
||||||
|
|
||||||
|
solve_first :: proc(input: string) -> u64 {
|
||||||
|
input := input
|
||||||
|
fresh_ingredient_ids: [dynamic]Range
|
||||||
|
defer delete(fresh_ingredient_ids)
|
||||||
|
available_ingredient_ids: [dynamic]u64
|
||||||
|
defer delete(available_ingredient_ids)
|
||||||
|
in_ranges := true
|
||||||
|
for line in strings.split_lines_iterator(&input) {
|
||||||
|
if line == "" {
|
||||||
|
in_ranges = false
|
||||||
|
}
|
||||||
|
if in_ranges {
|
||||||
|
range := parse_range(line)
|
||||||
|
append(&fresh_ingredient_ids, range)
|
||||||
|
} else {
|
||||||
|
val, _ := strconv.parse_u64(line)
|
||||||
|
append(&available_ingredient_ids, val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
total_fresh: u64
|
||||||
|
for id in available_ingredient_ids {
|
||||||
|
for range in fresh_ingredient_ids {
|
||||||
|
if range.start <= id && id <= range.end {
|
||||||
|
total_fresh += 1
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return total_fresh
|
||||||
|
}
|
||||||
|
|
||||||
|
@(test)
|
||||||
|
solves_sample :: proc(^testing.T) {
|
||||||
|
total_fresh := solve_first(sample)
|
||||||
|
log.info("sample total fresh: %v", total_fresh)
|
||||||
|
assert(total_fresh == 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
@(test)
|
||||||
|
solves_input :: proc(^testing.T) {
|
||||||
|
content, _ := os.read_entire_file("day5input.txt")
|
||||||
|
defer delete(content)
|
||||||
|
total_fresh := solve_first(string(content))
|
||||||
|
log.info("input total fresh: %v", total_fresh)
|
||||||
|
assert(total_fresh == 701)
|
||||||
|
}
|
||||||
|
|
||||||
|
RangeResult :: struct {
|
||||||
|
range: Range,
|
||||||
|
primary: bool,
|
||||||
|
used: bool
|
||||||
|
}
|
||||||
|
|
||||||
|
solve_second :: proc(input: string) -> u64 {
|
||||||
|
input := input
|
||||||
|
fresh_set: [dynamic]RangeResult
|
||||||
|
defer delete(fresh_set)
|
||||||
|
for line in strings.split_lines_iterator(&input) {
|
||||||
|
if line == "" {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
range := parse_range(line)
|
||||||
|
append(&fresh_set, RangeResult{ range=range })
|
||||||
|
}
|
||||||
|
|
||||||
|
for &rr, index in fresh_set {
|
||||||
|
r1 := rr
|
||||||
|
if rr.used do continue
|
||||||
|
rr.primary = true
|
||||||
|
|
||||||
|
if index == len(fresh_set) - 1 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
increased := true
|
||||||
|
for increased {
|
||||||
|
increased = false
|
||||||
|
for &compare in fresh_set[index + 1:] {
|
||||||
|
if compare.used do continue
|
||||||
|
r := rr.range
|
||||||
|
r2 := compare
|
||||||
|
crr := compare.range
|
||||||
|
if (crr.start <= r.start && r.start <= crr.end) ||
|
||||||
|
(crr.start <= r.end && r.end <= crr.end) ||
|
||||||
|
(crr.start <= r.start && r.end <= crr.end) ||
|
||||||
|
(r.start <= crr.start && crr.end <= r.end) {
|
||||||
|
rr.range.start = min(r.start, crr.start)
|
||||||
|
rr.range.end = max(r.end, crr.end)
|
||||||
|
compare.used = true
|
||||||
|
increased = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
total: u64
|
||||||
|
for rr in fresh_set {
|
||||||
|
if !rr.primary do continue
|
||||||
|
total += (rr.range.end - rr.range.start) + 1
|
||||||
|
}
|
||||||
|
|
||||||
|
return total
|
||||||
|
}
|
||||||
|
|
||||||
|
@(test)
|
||||||
|
solves_second_sample :: proc(t: ^testing.T) {
|
||||||
|
fresh_count := solve_second(sample)
|
||||||
|
log.info("solves_second_sample count = %v", fresh_count)
|
||||||
|
testing.expect_value(t, fresh_count, 14)
|
||||||
|
}
|
||||||
|
|
||||||
|
@(test)
|
||||||
|
solves_second_input :: proc(t: ^testing.T) {
|
||||||
|
content, _ := os.read_entire_file("day5input.txt")
|
||||||
|
defer delete(content)
|
||||||
|
fresh_count := solve_second(string(content))
|
||||||
|
log.info("solves_second_input count = %v", fresh_count)
|
||||||
|
testing.expect_value(t, fresh_count, 352340558684863)
|
||||||
|
}
|
||||||
1186
day5/input.txt
Normal file
1186
day5/input.txt
Normal file
File diff suppressed because it is too large
Load Diff
8
utils/utils.odin
Normal file
8
utils/utils.odin
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
package utils
|
||||||
|
|
||||||
|
import "core:os"
|
||||||
|
|
||||||
|
read_file :: proc(s: string) -> string {
|
||||||
|
contents, _ := os.read_entire_file(s)
|
||||||
|
return string(contents)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user