├── data ├── day9.sample ├── day3.sample ├── day6.sample ├── day1.sample ├── day5.sample ├── day4.sample ├── day2.sample ├── day8.sample ├── day7.sample ├── day2.input ├── day9.input ├── day6.input ├── day4.input ├── day7.input ├── day3.input ├── day8.input └── day5.input ├── .gitignore ├── main.scala ├── day8 ├── day8.test.scala └── day8.scala ├── README.md ├── day4 ├── day4.test.scala └── day4.scala ├── day5 ├── day5.test.scala └── day5.scala ├── day7 ├── day7.test.scala └── day7.scala ├── day1 ├── day1.test.scala └── day1.scala ├── day3 ├── day3.test.scala └── day3.scala ├── day6 ├── day6.test.scala └── day6.scala ├── day2 ├── day2.test.scala └── day2.scala ├── day9 └── day9.scala └── LICENSE /data/day9.sample: -------------------------------------------------------------------------------- 1 | 7,1 2 | 11,1 3 | 11,7 4 | 9,7 5 | 9,5 6 | 2,5 7 | 2,3 8 | 7,3 9 | -------------------------------------------------------------------------------- /data/day3.sample: -------------------------------------------------------------------------------- 1 | 987654321111111 2 | 811111111111119 3 | 234234234234278 4 | 818181911112111 5 | -------------------------------------------------------------------------------- /data/day6.sample: -------------------------------------------------------------------------------- 1 | 123 328 51 64 2 | 45 64 387 23 3 | 6 98 215 314 4 | * + * + 5 | -------------------------------------------------------------------------------- /data/day1.sample: -------------------------------------------------------------------------------- 1 | L68 2 | L30 3 | R48 4 | L5 5 | R60 6 | L55 7 | L1 8 | L99 9 | R14 10 | L82 11 | -------------------------------------------------------------------------------- /data/day5.sample: -------------------------------------------------------------------------------- 1 | 3-5 2 | 10-14 3 | 16-20 4 | 12-18 5 | 6 | 1 7 | 5 8 | 8 9 | 11 10 | 17 11 | 32 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | *.log 3 | 4 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 5 | hs_err_pid* 6 | -------------------------------------------------------------------------------- /data/day4.sample: -------------------------------------------------------------------------------- 1 | ..@@.@@@@. 2 | @@@.@.@.@@ 3 | @@@@@.@.@@ 4 | @.@@@@..@. 5 | @@.@@@@.@@ 6 | .@@@@@@@.@ 7 | .@.@.@.@@@ 8 | @.@@@.@@@@ 9 | .@@@@@@@@. 10 | @.@.@@@.@. 11 | -------------------------------------------------------------------------------- /data/day2.sample: -------------------------------------------------------------------------------- 1 | 11-22,95-115,998-1012,1188511880-1188511890,222220-222224,1698522-1698528,446443-446449,38593856-38593862,565653-565659,824824821-824824827,2121212118-2121212124 2 | -------------------------------------------------------------------------------- /data/day8.sample: -------------------------------------------------------------------------------- 1 | 162,817,812 2 | 57,618,57 3 | 906,360,560 4 | 592,479,940 5 | 352,342,300 6 | 466,668,158 7 | 542,29,236 8 | 431,825,988 9 | 739,650,466 10 | 52,470,668 11 | 216,146,977 12 | 819,987,18 13 | 117,168,530 14 | 805,96,715 15 | 346,949,466 16 | 970,615,88 17 | 941,993,340 18 | 862,61,35 19 | 984,92,344 20 | 425,690,689 21 | -------------------------------------------------------------------------------- /data/day7.sample: -------------------------------------------------------------------------------- 1 | .......S....... 2 | ............... 3 | .......^....... 4 | ............... 5 | ......^.^...... 6 | ............... 7 | .....^.^.^..... 8 | ............... 9 | ....^.^...^.... 10 | ............... 11 | ...^.^...^.^... 12 | ............... 13 | ..^...^.....^.. 14 | ............... 15 | .^.^.^.^.^...^. 16 | ............... 17 | -------------------------------------------------------------------------------- /main.scala: -------------------------------------------------------------------------------- 1 | //> using test.dep org.scalatest::scalatest::3.2.19 2 | import day1.Day1 3 | import day2.Day2 4 | import day3.Day3 5 | import day4.Day4 6 | import day5.Day5 7 | import day6.Day6 8 | import day7.Day7 9 | import day8.Day8 10 | 11 | @main 12 | def main: Unit = { 13 | println("AoC 2025") 14 | Day1.main 15 | Day2.main 16 | Day3.main 17 | Day4.main 18 | Day5.main 19 | Day6.main 20 | Day7.main 21 | Day8.main 22 | } 23 | -------------------------------------------------------------------------------- /data/day2.input: -------------------------------------------------------------------------------- 1 | 9595822750-9596086139,1957-2424,88663-137581,48152-65638,12354817-12385558,435647-489419,518494-609540,2459-3699,646671-688518,195-245,295420-352048,346-514,8686839668-8686892985,51798991-51835611,8766267-8977105,2-17,967351-995831,6184891-6331321,6161577722-6161678622,912862710-913019953,6550936-6625232,4767634976-4767662856,2122995-2257010,1194-1754,779-1160,22-38,4961-6948,39-53,102-120,169741-245433,92902394-92956787,531-721,64-101,15596-20965,774184-943987,8395-11781,30178-47948,94338815-94398813 2 | -------------------------------------------------------------------------------- /day8/day8.test.scala: -------------------------------------------------------------------------------- 1 | package day8 2 | 3 | import org.scalatest.flatspec.AnyFlatSpec 4 | import org.scalatest.Assertions._ 5 | 6 | class Day8Test extends AnyFlatSpec { 7 | 8 | behavior of "input data" 9 | 10 | it should "return correct part one" in { 11 | assertResult(175440) { 12 | Day8.partOne("data/day8.input") 13 | } 14 | } 15 | 16 | it should "return correct part two" in { 17 | assertResult(3200955921L) { 18 | Day8.partTwo("data/day8.input") 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # advent-of-code-2025 2 | 3 | My solutions for AoC 2025 in Scala 4 | 5 | Needs Scala CLI (Scala installed through Coursier has it) 6 | 7 | Run everything 8 | 9 | ``` 10 | scala . 11 | ``` 12 | 13 | Run tests 14 | 15 | ``` 16 | scala test . 17 | ``` 18 | 19 | Execute REPL 20 | 21 | ``` 22 | scala repl . 23 | ``` 24 | 25 | Generate JAR 26 | 27 | ``` 28 | scala --power package . --assembly --preamble=false 29 | ``` 30 | 31 | Native compilation 32 | 33 | ``` 34 | scala --power package . --graal (GraalVM) 35 | scala --power package . --native (Scala Native) 36 | ``` 37 | -------------------------------------------------------------------------------- /day4/day4.test.scala: -------------------------------------------------------------------------------- 1 | package day4 2 | 3 | import org.scalatest.flatspec.AnyFlatSpec 4 | import org.scalatest.Assertions._ 5 | 6 | class Day4Test extends AnyFlatSpec { 7 | behavior of "sample data" 8 | 9 | it should "return correct part one" in { 10 | assertResult(13) { 11 | Day4.partOne("data/day4.sample") 12 | } 13 | } 14 | 15 | it should "return correct part two" in { 16 | assertResult(43) { 17 | Day4.partTwo("data/day4.sample") 18 | } 19 | } 20 | 21 | behavior of "input data" 22 | 23 | it should "return correct part one" in { 24 | assertResult(1474) { 25 | Day4.partOne("data/day4.input") 26 | } 27 | } 28 | 29 | it should "return correct part two" in { 30 | assertResult(8910) { 31 | Day4.partTwo("data/day4.input") 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /day5/day5.test.scala: -------------------------------------------------------------------------------- 1 | package day5 2 | 3 | import org.scalatest.flatspec.AnyFlatSpec 4 | import org.scalatest.Assertions._ 5 | 6 | class Day5Test extends AnyFlatSpec { 7 | behavior of "sample data" 8 | 9 | it should "return correct part one" in { 10 | assertResult(3) { 11 | Day5.partOne("data/day5.sample") 12 | } 13 | } 14 | 15 | it should "return correct part two" in { 16 | assertResult(14) { 17 | Day5.partTwo("data/day5.sample") 18 | } 19 | } 20 | 21 | behavior of "input data" 22 | 23 | it should "return correct part one" in { 24 | assertResult(615) { 25 | Day5.partOne("data/day5.input") 26 | } 27 | } 28 | 29 | it should "return correct part two" in { 30 | assertResult(353716783056994L) { 31 | Day5.partTwo("data/day5.input") 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /day7/day7.test.scala: -------------------------------------------------------------------------------- 1 | package day7 2 | 3 | import org.scalatest.flatspec.AnyFlatSpec 4 | import org.scalatest.Assertions._ 5 | 6 | class Day7Test extends AnyFlatSpec { 7 | behavior of "sample data" 8 | 9 | it should "return correct part one" in { 10 | assertResult(21) { 11 | Day7.partOne("data/day7.sample") 12 | } 13 | } 14 | 15 | it should "return correct part two" in { 16 | assertResult(40) { 17 | Day7.partTwo("data/day7.sample") 18 | } 19 | } 20 | 21 | behavior of "input data" 22 | 23 | it should "return correct part one" in { 24 | assertResult(1690) { 25 | Day7.partOne("data/day7.input") 26 | } 27 | } 28 | 29 | it should "return correct part two" in { 30 | assertResult(221371496188107L) { 31 | Day7.partTwo("data/day7.input") 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /day1/day1.test.scala: -------------------------------------------------------------------------------- 1 | package day1 2 | 3 | import org.scalatest.flatspec.AnyFlatSpec 4 | import org.scalatest.Assertions._ 5 | 6 | class Day1Test extends AnyFlatSpec { 7 | behavior of "sample data" 8 | 9 | it should "return correct password one" in { 10 | assertResult(3) { 11 | Day1.passwordOne("data/day1.sample") 12 | } 13 | } 14 | 15 | it should "return correct password two" in { 16 | assertResult(6) { 17 | Day1.passwordTwo("data/day1.sample") 18 | } 19 | } 20 | 21 | behavior of "input data" 22 | 23 | it should "return correct password one" in { 24 | assertResult(1158) { 25 | Day1.passwordOne("data/day1.input") 26 | } 27 | } 28 | 29 | it should "return correct password two" in { 30 | assertResult(6860) { 31 | Day1.passwordTwo("data/day1.input") 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /day3/day3.test.scala: -------------------------------------------------------------------------------- 1 | package day3 2 | 3 | import org.scalatest.flatspec.AnyFlatSpec 4 | import org.scalatest.Assertions._ 5 | 6 | class Day3Test extends AnyFlatSpec { 7 | behavior of "sample data" 8 | 9 | it should "return correct part one" in { 10 | assertResult(357) { 11 | Day3.partOne("data/day3.sample") 12 | } 13 | } 14 | 15 | it should "return correct part two" in { 16 | assertResult(3121910778619L) { 17 | Day3.partTwo("data/day3.sample") 18 | } 19 | } 20 | 21 | behavior of "input data" 22 | 23 | it should "return correct part one" in { 24 | assertResult(17263) { 25 | Day3.partOne("data/day3.input") 26 | } 27 | } 28 | 29 | it should "return correct part two" in { 30 | assertResult(170731717900423L) { 31 | Day3.partTwo("data/day3.input") 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /day6/day6.test.scala: -------------------------------------------------------------------------------- 1 | package day6 2 | 3 | import org.scalatest.flatspec.AnyFlatSpec 4 | import org.scalatest.Assertions._ 5 | 6 | class Day6Test extends AnyFlatSpec { 7 | behavior of "sample data" 8 | 9 | it should "return correct part one" in { 10 | assertResult(4277556) { 11 | Day6.partOne("data/day6.sample") 12 | } 13 | } 14 | 15 | it should "return correct part two" in { 16 | assertResult(3263827) { 17 | Day6.partTwo("data/day6.sample") 18 | } 19 | } 20 | 21 | behavior of "input data" 22 | 23 | it should "return correct part one" in { 24 | assertResult(5335495999141L) { 25 | Day6.partOne("data/day6.input") 26 | } 27 | } 28 | 29 | it should "return correct part two" in { 30 | assertResult(10142723156431L) { 31 | Day6.partTwo("data/day6.input") 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /day2/day2.test.scala: -------------------------------------------------------------------------------- 1 | package day2 2 | 3 | import org.scalatest.flatspec.AnyFlatSpec 4 | import org.scalatest.Assertions._ 5 | 6 | class Day2Test extends AnyFlatSpec { 7 | behavior of "sample data" 8 | 9 | it should "return correct password one" in { 10 | assertResult(BigInt("1227775554")) { 11 | Day2.partOne("data/day2.sample") 12 | } 13 | } 14 | 15 | it should "return correct password two" in { 16 | assertResult(BigInt("4174379265")) { 17 | Day2.partTwo("data/day2.sample") 18 | } 19 | } 20 | 21 | behavior of "input data" 22 | 23 | it should "return correct password one" in { 24 | assertResult(BigInt("40398804950")) { 25 | Day2.partOne("data/day2.input") 26 | } 27 | } 28 | 29 | it should "return correct password two" in { 30 | assertResult(BigInt("65794984339")) { 31 | Day2.partTwo("data/day2.input") 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /day3/day3.scala: -------------------------------------------------------------------------------- 1 | package day3 2 | 3 | import scala.io.Source 4 | 5 | object Day3 { 6 | def main: Unit = { 7 | println("Day 3") 8 | val testP1 = partOne("data/day3.sample") 9 | val testP2 = partTwo("data/day3.sample") 10 | println(s"Sample file: $testP1 / $testP2") 11 | val p1 = partOne("data/day3.input") 12 | val p2 = partTwo("data/day3.input") 13 | println(s"Input file: $p1 / $p2") 14 | } 15 | 16 | def partOne(input: String): Long = { 17 | val banks = parse(input) 18 | banks.map { bank => 19 | val firstDigit = bank 20 | .slice(0, bank.size - 1) 21 | .reduce(math.max) 22 | val firstDigitPos = bank.indexOf(firstDigit) 23 | val secondDigit = bank 24 | .slice(firstDigitPos + 1, bank.size) 25 | .reduce(math.max) 26 | firstDigit * 10 + secondDigit 27 | }.sum 28 | } 29 | 30 | def partTwo(input: String): Long = { 31 | val banks = parse(input) 32 | banks.map { bank => 33 | var consumed = 0 34 | var n = 0L 35 | for(d <- 1 to 12) { 36 | val maxDigit = bank 37 | .slice(consumed, bank.size - (12 - d)) 38 | .reduce(math.max) 39 | consumed = bank.indexOf(maxDigit, consumed) + 1 40 | n *= 10 41 | n += maxDigit 42 | } 43 | n 44 | }.sum 45 | } 46 | 47 | def parse(input: String): Seq[Seq[Int]] = { 48 | val fileContents = Source.fromFile(input).getLines 49 | 50 | fileContents.map { line => 51 | line.map(_.toInt - 48) 52 | }.toSeq 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /day2/day2.scala: -------------------------------------------------------------------------------- 1 | package day2 2 | 3 | import scala.io.Source 4 | import scala.collection.immutable.NumericRange 5 | import scala.util.boundary, boundary.break 6 | import scala.collection.immutable.ArraySeq 7 | 8 | object Day2 { 9 | def main: Unit = { 10 | println("Day 2") 11 | val testP1 = Day2.partOne("data/day2.sample") 12 | val testP2 = Day2.partTwo("data/day2.sample") 13 | println(s"Sample file: $testP1 / $testP2") 14 | val p1 = Day2.partOne("data/day2.input") 15 | val p2 = Day2.partTwo("data/day2.input") 16 | println(s"Input file: $p1 / $p2") 17 | } 18 | 19 | def partOne(input: String): BigInt = { 20 | val ranges = parse(input) 21 | ranges.flatMap { range => 22 | range.filter(twiceAppearance) 23 | }.sum 24 | } 25 | 26 | def partTwo(input: String): BigInt = { 27 | val ranges = parse(input) 28 | ranges.flatMap { range => 29 | range.filter(multiAppearance) 30 | }.sum 31 | } 32 | 33 | private def multiAppearance(n: BigInt): Boolean = boundary { 34 | val nStr = n.toString 35 | for(i <- 1 to nStr.size / 2) { 36 | val pattern = nStr.splitAt(i)(0) 37 | if(pattern * (nStr.size / pattern.size) == nStr) { 38 | break(true) 39 | } 40 | } 41 | false 42 | } 43 | 44 | private def twiceAppearance(n: BigInt): Boolean = { 45 | val nStr = n.toString 46 | nStr.size % 2 == 0 && nStr.splitAt(nStr.size / 2)(0) * 2 == nStr 47 | } 48 | 49 | private def parse(input: String): Seq[NumericRange.Inclusive[BigInt]] = { 50 | val fileContents = Source.fromFile(input).mkString.trim 51 | ArraySeq.unsafeWrapArray(fileContents.split(",")).map { range => 52 | val r = range.split("-") 53 | BigInt(r(0)) to BigInt(r(1)) 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /day1/day1.scala: -------------------------------------------------------------------------------- 1 | package day1 2 | 3 | import scala.io.Source 4 | 5 | object Day1 { 6 | 7 | def main: Unit = { 8 | println("Day 1") 9 | val testP1 = Day1.passwordOne("data/day1.sample") 10 | val testP2 = Day1.passwordTwo("data/day1.sample") 11 | println(s"Sample file: $testP1 / $testP2") 12 | val p1 = Day1.passwordOne("data/day1.input") 13 | val p2 = Day1.passwordTwo("data/day1.input") 14 | println(s"Input file: $p1 / $p2") 15 | } 16 | 17 | def passwordOne(file: String): Int = { 18 | val instructions = parse(file) 19 | 20 | var dial = 50 21 | var zeros = 0 22 | for (inst <- instructions) { 23 | inst match { 24 | case Left(i) => { 25 | dial -= i 26 | while (dial < 0) { 27 | dial += 100 28 | } 29 | } 30 | case Right(i) => { 31 | dial += i 32 | while (dial > 99) { 33 | dial -= 100 34 | } 35 | } 36 | } 37 | if (dial == 0) { 38 | zeros += 1 39 | } 40 | } 41 | zeros 42 | } 43 | 44 | def passwordTwo(file: String): Int = { 45 | val instructions = parse(file) 46 | 47 | var dial = 50 48 | var zeros = 0 49 | 50 | for (inst <- instructions) { 51 | inst match { 52 | case Left(i) => { 53 | dial -= i 54 | if (dial + i == 0) { 55 | zeros -= 1 56 | } 57 | while (dial < 0) { 58 | dial += 100 59 | zeros += 1 60 | } 61 | if (dial == 0) { 62 | zeros += 1 63 | } 64 | } 65 | case Right(i) => { 66 | dial += i 67 | while (dial > 99) { 68 | dial -= 100 69 | zeros += 1 70 | } 71 | } 72 | } 73 | } 74 | zeros 75 | } 76 | 77 | private def parse(file: String): Seq[Either[Int, Int]] = { 78 | val fileContents = Source.fromFile(file).getLines() 79 | 80 | fileContents.map { line => 81 | if (line.startsWith("R")) { 82 | Right(line.substring(1).toInt) 83 | } else { 84 | Left(line.substring(1).toInt) 85 | } 86 | }.toSeq 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /day9/day9.scala: -------------------------------------------------------------------------------- 1 | package day9 2 | 3 | import scala.io.Source 4 | 5 | case class Point(x: Long, y: Long) 6 | 7 | object Day9 { 8 | def partOne(input: String): Long = { 9 | val points = parse(input) 10 | val areas = for { 11 | p1 <- points 12 | p2 <- points 13 | if p1 != p2 14 | } yield area(p1, p2) 15 | areas.max 16 | } 17 | 18 | // 140783340 too low 19 | def partTwo(input: String): Long = { 20 | val points = parse(input) 21 | val areas = for { 22 | p1 <- points 23 | p2 <- points 24 | if p1.x < p2.x && p1.y < p2.y 25 | if p1 != p2 26 | if anotherCornerIsAlsoGreen(p1, p2, points) 27 | if free(p1, p2, points) 28 | } yield area(p1, p2) 29 | areas.max 30 | } 31 | 32 | // not true 33 | def anotherCornerIsAlsoGreen(p1: Point, p2: Point, points: Seq[Point]): Boolean = { 34 | val p3 = Point(p1.x, p2.y) 35 | val p4 = Point(p2.x, p1.y) 36 | isInGreenZone(p3, points) && isInGreenZone(p4, points) 37 | } 38 | 39 | def isInGreenZone(p: Point, points: Seq[Point]): Boolean = { 40 | points.contains(p) || 41 | (points.exists(px => (px.x == p.x && px.y > p.y)) && points.exists(px => (px.x == p.x && px.y < p.y))) || 42 | (points.exists(px => (px.y == p.y && px.x > p.x)) && points.exists(px => (px.y == p.y && px.x < p.x))) 43 | } 44 | 45 | def free(p1: Point, p2: Point, points: Seq[Point]): Boolean = { 46 | // check there are no points inside the area of p1 and p2 47 | !points.exists { p => 48 | val maxX = math.max(p1.x, p2.x) 49 | val minX = math.min(p1.x, p2.x) 50 | val maxY = math.max(p1.y, p2.y) 51 | val minY = math.min(p1.y, p2.y) 52 | minX < p.x && p.x < maxX && 53 | minY < p.y && p.y < maxY 54 | } 55 | } 56 | 57 | def area(p1: Point, p2: Point): Long = { 58 | val x = math.abs(p1.x - p2.x) + 1 59 | val y = math.abs(p1.y - p2.y) + 1 60 | x * y 61 | } 62 | 63 | def parse(input: String): Seq[Point] = { 64 | val fileContents = Source.fromFile(input).getLines 65 | 66 | fileContents.map { line => 67 | val m = line.split(",") 68 | Point( 69 | x = m(0).toLong, 70 | y = m(1).toLong, 71 | ) 72 | }.toSeq 73 | } 74 | } 75 | 76 | -------------------------------------------------------------------------------- /day4/day4.scala: -------------------------------------------------------------------------------- 1 | package day4 2 | 3 | import scala.io.Source 4 | 5 | case class World(grid: Vector[Boolean], width: Int, height: Int) { 6 | def get(x: Int, y: Int): Boolean = { 7 | if (x < 0 || y < 0 || x >= width || y >= height) { 8 | false 9 | } else { 10 | grid(y * width + x) 11 | } 12 | } 13 | 14 | def numberOfRolls: Int = grid.count(_ == true) 15 | 16 | def forkliftAccess(x: Int, y: Int): Boolean = { 17 | val checks = List( 18 | (x - 1, y - 1), 19 | (x , y - 1), 20 | (x + 1, y - 1), 21 | (x - 1, y ), 22 | (x + 1, y ), 23 | (x - 1, y + 1), 24 | (x , y + 1), 25 | (x + 1, y + 1), 26 | ) 27 | checks.count((x,y) => get(x,y)) < 4 28 | } 29 | 30 | def accesses: Int = { 31 | val accesses = for { 32 | x <- 0 until width 33 | y <- 0 until height 34 | if get(x, y) 35 | } yield forkliftAccess(x, y) 36 | accesses.count(_ == true) 37 | } 38 | 39 | def removeRolls: World = { 40 | val newGrid = for { 41 | x <- 0 until width 42 | y <- 0 until height 43 | } yield if (get(x,y)) { 44 | !forkliftAccess(x, y) 45 | } else { 46 | false 47 | } 48 | World(newGrid.toVector, width, height) 49 | } 50 | } 51 | 52 | object Day4 { 53 | 54 | def main: Unit = { 55 | println("Day 4") 56 | val testP1 = partOne("data/day4.sample") 57 | val testP2 = partTwo("data/day4.sample") 58 | println(s"Sample file: $testP1 / $testP2") 59 | val p1 = partOne("data/day4.input") 60 | val p2 = partTwo("data/day4.input") 61 | println(s"Input file: $p1 / $p2") 62 | } 63 | 64 | def partOne(input: String): Int = { 65 | val world = parse(input) 66 | world.accesses 67 | } 68 | 69 | def partTwo(input: String): Int = { 70 | var world = parse(input) 71 | val initialWorldRolls = world.numberOfRolls 72 | while(world.accesses > 0) { 73 | world = world.removeRolls 74 | } 75 | initialWorldRolls - world.numberOfRolls 76 | } 77 | 78 | private def parse(input: String): World = { 79 | val fileContents = Source.fromFile(input).getLines 80 | 81 | var height = 0 82 | val grid = fileContents.flatMap { line => 83 | height += 1 84 | line.map(_ == '@') 85 | }.toVector 86 | val width = grid.size / height 87 | World(grid, width, height) 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /day7/day7.scala: -------------------------------------------------------------------------------- 1 | package day7 2 | 3 | import scala.io.Source 4 | import scala.collection.mutable.Queue 5 | 6 | case class World(startPos: Int, splitters: Seq[Seq[Int]], width: Int) 7 | 8 | object Day7 { 9 | def main: Unit = { 10 | println("Day 7") 11 | val testP1 = partOne("data/day7.sample") 12 | val testP2 = partTwo("data/day7.sample") 13 | println(s"Sample file: $testP1 / $testP2") 14 | val p1 = partOne("data/day7.input") 15 | val p2 = partTwo("data/day7.input") 16 | println(s"Input file: $p1 / $p2") 17 | } 18 | 19 | def partOne(input: String): Int = { 20 | val world = parse(input) 21 | val tachyons = Set(world.startPos) 22 | var splits = 0 23 | world.splitters.foldLeft(tachyons) { (tachyons, worldLine) => 24 | tachyons.flatMap { tachyon => 25 | if (worldLine.contains(tachyon)) { 26 | splits += 1 27 | Set(tachyon - 1, tachyon + 1) 28 | } else { 29 | Set(tachyon) 30 | } 31 | } 32 | } 33 | splits 34 | } 35 | 36 | def partTwo(input: String): Long = { 37 | val world = parse(input) 38 | //var branches = 0 39 | //val explorations = Queue((0, world.startPos)) 40 | //while (explorations.size > 0) { 41 | // val (floor, pos) = explorations.dequeue 42 | // if (floor + 1 == world.splitters.size) { 43 | // branches += 1 44 | // } else { 45 | // if (world.splitters(floor + 1).contains(pos)) { 46 | // explorations ++= List((floor + 1, pos - 1), (floor + 1, pos + 1)) 47 | // } else { 48 | // explorations ++= List((floor + 1, pos)) 49 | // } 50 | // } 51 | //} 52 | //branches 53 | 54 | val timelines = Array.fill(world.width)(0L) 55 | timelines(world.startPos) = 1 56 | for(worldLine <- world.splitters) { 57 | for(splitter <- worldLine) { 58 | timelines(splitter - 1) += timelines(splitter) 59 | timelines(splitter + 1) += timelines(splitter) 60 | timelines(splitter) = 0L 61 | } 62 | } 63 | timelines.sum 64 | } 65 | 66 | def parse(input: String): World = { 67 | val fileContents = Source.fromFile(input).getLines.toArray 68 | val width = fileContents(0).size 69 | val startPos = fileContents(0).indexOf("S") 70 | 71 | val splitters = fileContents.drop(1).map { line => 72 | line.zipWithIndex.filter((c, i) => c == '^').map((c, i) => i) 73 | }.toIndexedSeq 74 | World(startPos, splitters, width) 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /day6/day6.scala: -------------------------------------------------------------------------------- 1 | package day6 2 | 3 | import scala.io.Source 4 | import scala.collection.mutable.ArrayBuffer 5 | 6 | case class WorkSheet(nums: Array[Array[Long]], ops: Array[String]) { 7 | def opsOne: Array[Long] = { 8 | nums 9 | .transpose 10 | .zip(ops) 11 | .map { (ns, op) => 12 | op match { 13 | case "+" => ns.reduce(_ + _) 14 | case "*" => ns.reduce(_ * _) 15 | } 16 | } 17 | } 18 | 19 | def opsTwo: Array[Long] = { 20 | nums 21 | .zip(ops) 22 | .map { (ns, op) => 23 | op match { 24 | case "+" => ns.reduce(_ + _) 25 | case "*" => ns.reduce(_ * _) 26 | } 27 | } 28 | } 29 | } 30 | 31 | 32 | object Day6 { 33 | def main: Unit = { 34 | println("Day 6") 35 | val testP1 = partOne("data/day6.sample") 36 | val testP2 = partTwo("data/day6.sample") 37 | println(s"Sample file: $testP1 / $testP2") 38 | val p1 = partOne("data/day6.input") 39 | val p2 = partTwo("data/day6.input") 40 | println(s"Input file: $p1 / $p2") 41 | } 42 | 43 | def partOne(input: String): Long = { 44 | val worksheet = parse(input) 45 | worksheet.opsOne.sum 46 | } 47 | 48 | def partTwo(input: String): Long = { 49 | val worksheet = parseTwo(input) 50 | worksheet.opsTwo.sum 51 | } 52 | 53 | def parse(input: String): WorkSheet = { 54 | val fileContents = Source.fromFile(input) 55 | 56 | val nLines = fileContents.getLines.size 57 | 58 | val nums = fileContents.reset.getLines.take(nLines - 1).map { line => 59 | line.split(" ").filter(_ != "").map(_.toLong).toArray 60 | }.toArray 61 | val ops = fileContents.reset.getLines.drop(nLines - 1).map { line => 62 | line.split(" ").filter(_ != "").toArray 63 | }.toArray.head 64 | 65 | WorkSheet(nums, ops) 66 | } 67 | 68 | def parseTwo(input: String): WorkSheet = { 69 | val fileContents = Source.fromFile(input).getLines.toArray 70 | 71 | val nLines = fileContents.size 72 | val numsLines = fileContents.take(nLines - 1) 73 | val ops = fileContents(nLines - 1).split(" ").filter(_ != "").toArray 74 | 75 | val worksheet = ArrayBuffer.empty[Array[Long]] 76 | var nums = ArrayBuffer.empty[Long] 77 | 78 | for(i <- 0 until fileContents(0).size) { 79 | val numStr = numsLines.map(_(i)).mkString.trim 80 | if(numStr == "") { 81 | worksheet += nums.toArray 82 | nums = ArrayBuffer.empty[Long] 83 | } else { 84 | nums += numStr.toLong 85 | } 86 | } 87 | worksheet += nums.toArray 88 | WorkSheet(worksheet.toArray, ops) 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /day5/day5.scala: -------------------------------------------------------------------------------- 1 | package day5 2 | 3 | import scala.io.Source 4 | import scala.collection.mutable.ListBuffer 5 | 6 | case class Range(from: Long, end: Long) { 7 | def contains(x: Long): Boolean = 8 | x >= from && x <= end 9 | } 10 | 11 | case class Inventory( 12 | freshRanges: List[Range], 13 | items: List[Long] 14 | ) { 15 | def countFreshItems: Long = { 16 | items.count { item => 17 | freshRanges.exists(_.contains(item)) 18 | } 19 | } 20 | } 21 | 22 | object Day5 { 23 | 24 | def main: Unit = { 25 | println("Day 5") 26 | val testP1 = partOne("data/day5.sample") 27 | val testP2 = partTwo("data/day5.sample") 28 | println(s"Sample file: $testP1 / $testP2") 29 | val p1 = partOne("data/day5.input") 30 | val p2 = partTwo("data/day5.input") 31 | println(s"Input file: $p1 / $p2") 32 | } 33 | 34 | def partOne(input: String): Long = { 35 | val inventory = parse(input) 36 | inventory.countFreshItems 37 | } 38 | 39 | def partTwo(input: String): Long = { 40 | val inventory = parse(input) 41 | var finished = false 42 | var ranges = inventory.freshRanges 43 | while (!finished) { 44 | val oldRanges = ranges 45 | ranges = simplifyRanges(ranges) 46 | if (ranges == oldRanges) { 47 | finished = true 48 | } 49 | } 50 | countRanges(ranges) 51 | } 52 | 53 | def countRanges(ranges: List[Range]): Long = { 54 | ranges.map(x => x.end - x.from + 1).sum 55 | } 56 | 57 | def simplifyRanges(ranges: List[Range]): List[Range] = { 58 | val set = ListBuffer.empty[Range] 59 | for(r <- ranges) { 60 | // range starts in existing range and ends later 61 | val h = set.indexWhere(x => x.from <= r.from && x.end < r.end && x.end >= r.from) 62 | if (h > -1) { 63 | set(h) = Range(set(h).from, r.end) 64 | } else { 65 | // range ends in existing range and starts earlier 66 | val j = set.indexWhere(x => x.from > r.from && r.end <= x.end && x.from <= r.end) 67 | if (j > -1) { 68 | set(j) = Range(r.from, set(j).end) 69 | } else { 70 | // range is bigger than existing range 71 | val q = set.indexWhere(x => x.from >= r.from && x.end <= r.end) 72 | if (q > -1) { 73 | set(q) = r 74 | } else { 75 | // range fits inside existing range 76 | val f = set.indexWhere(x => x.from <= r.from && x.end >= r.end) 77 | if (f == -1) { 78 | // range is new 79 | set += r 80 | } 81 | } 82 | } 83 | } 84 | } 85 | set.toList 86 | } 87 | 88 | def parse(input: String): Inventory = { 89 | val fileContents = Source.fromFile(input).getLines 90 | 91 | val freshRanges = ListBuffer.empty[Range] 92 | val items = ListBuffer.empty[Long] 93 | 94 | var secondPart = false 95 | for(line <- fileContents) { 96 | if(!secondPart) { 97 | if(line == "") { 98 | secondPart = true 99 | } else { 100 | val p = line.split("-") 101 | freshRanges.addOne(Range(p(0).toLong, p(1).toLong)) 102 | } 103 | } else { 104 | items.addOne(line.toLong) 105 | } 106 | } 107 | Inventory(freshRanges.toList, items.toList) 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /day8/day8.scala: -------------------------------------------------------------------------------- 1 | package day8 2 | 3 | import scala.io.Source 4 | import scala.collection.mutable.ArrayBuffer 5 | import scala.collection.mutable.Queue 6 | 7 | case class Point3D(x: Long, y: Long, z: Long) 8 | 9 | object Day8 { 10 | 11 | def main: Unit = { 12 | println("Day 8") 13 | val p1 = partOne("data/day8.input") 14 | val p2 = partTwo("data/day8.input") 15 | println(s"Input file: $p1 / $p2") 16 | } 17 | 18 | def partTwo(input: String): Long = { 19 | val points = parse(input) 20 | val circuits = ArrayBuffer.empty[ArrayBuffer[Point3D]] 21 | 22 | val pairs = for { 23 | p1 <- points 24 | p2 <- points 25 | if p1 != p2 26 | } yield (p1, p2) 27 | 28 | val sortedPairs = Queue[(Point3D, Point3D)]() 29 | sortedPairs ++= pairs.sortBy((a, b) => distance(a, b)) 30 | 31 | while(!(circuits.size == 1 && circuits(0).size == 1000)) { 32 | val (pointA, pointB) = sortedPairs.dequeue 33 | val circuitA = circuits.find(c => c.contains(pointA)) 34 | val circuitB = circuits.find(c => c.contains(pointB)) 35 | 36 | (circuitA, circuitB) match { 37 | case (None, None) => circuits.addOne(ArrayBuffer(pointA, pointB)) 38 | case (Some(cA), None) => cA.addOne(pointB) 39 | case (None, Some(cB)) => cB.addOne(pointA) 40 | case (Some(cA), Some(cB)) => { 41 | if(cA != cB) { 42 | cA.addAll(cB) 43 | circuits.remove(circuits.indexOf(cB)) 44 | } 45 | } 46 | } 47 | } 48 | val (pointA, pointB) = sortedPairs.dequeue 49 | pointA.x * pointB.x 50 | } 51 | 52 | def partOne(input: String): Long = { 53 | val points = parse(input) 54 | val circuits = ArrayBuffer.empty[ArrayBuffer[Point3D]] 55 | 56 | val pairs = for { 57 | p1 <- points 58 | p2 <- points 59 | if p1 != p2 60 | } yield (p1, p2) 61 | 62 | val sortedPairs = pairs.sortBy((a, b) => distance(a, b)) 63 | 64 | for(pair <- sortedPairs.take(2000)) { 65 | val (pointA, pointB) = pair 66 | val circuitA = circuits.find(c => c.contains(pointA)) 67 | val circuitB = circuits.find(c => c.contains(pointB)) 68 | 69 | (circuitA, circuitB) match { 70 | case (None, None) => circuits.addOne(ArrayBuffer(pointA, pointB)) 71 | case (Some(cA), None) => cA.addOne(pointB) 72 | case (None, Some(cB)) => cB.addOne(pointA) 73 | case (Some(cA), Some(cB)) => { 74 | if(cA != cB) { 75 | cA.addAll(cB) 76 | circuits.remove(circuits.indexOf(cB)) 77 | } 78 | } 79 | } 80 | } 81 | circuits.map(_.size).sorted.reverse.take(3).reduce(_ * _) 82 | } 83 | 84 | def unconnectedShortestPair(points: List[Point3D], circuits: ArrayBuffer[ArrayBuffer[Point3D]]): (Point3D, Point3D) = { 85 | val unconnectedPoints = for { 86 | p1 <- points 87 | if !circuits.exists(c => c.contains(p1)) 88 | p2 <- points 89 | if p1 != p2 90 | } yield (p1, p2) 91 | unconnectedPoints.sortBy((a, b) => distance(a, b)).head 92 | } 93 | 94 | def distance(a: Point3D, b: Point3D): Double = { 95 | val x = math.abs(a.x - b.x) 96 | val y = math.abs(a.y - b.y) 97 | val z = math.abs(a.z - b.z) 98 | math.sqrt(x*x + y*y + z*z) 99 | } 100 | 101 | def parse(input: String): List[Point3D] = { 102 | val fileContents = Source.fromFile(input).getLines 103 | fileContents.map { line => 104 | val items = line.split(",") 105 | Point3D(items(0).toLong, items(1).toLong, items(2).toLong) 106 | }.toList 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /data/day9.input: -------------------------------------------------------------------------------- 1 | 97819,50153 2 | 97819,51361 3 | 97695,51361 4 | 97695,52560 5 | 97478,52560 6 | 97478,53816 7 | 98081,53816 8 | 98081,54975 9 | 97418,54975 10 | 97418,56200 11 | 97473,56200 12 | 97473,57459 13 | 97673,57459 14 | 97673,58694 15 | 97628,58694 16 | 97628,59810 17 | 96976,59810 18 | 96976,60944 19 | 96485,60944 20 | 96485,62061 21 | 95974,62061 22 | 95974,63248 23 | 95748,63248 24 | 95748,64662 25 | 96214,64662 26 | 96214,65764 27 | 95642,65764 28 | 95642,66755 29 | 94801,66755 30 | 94801,67896 31 | 94390,67896 32 | 94390,69110 33 | 94141,69110 34 | 94141,70168 35 | 93526,70168 36 | 93526,71446 37 | 93369,71446 38 | 93369,72267 39 | 92298,72267 40 | 92298,73226 41 | 91531,73226 42 | 91531,74355 43 | 91073,74355 44 | 91073,75528 45 | 90666,75528 46 | 90666,76633 47 | 90131,76633 48 | 90131,77691 49 | 89515,77691 50 | 89515,78771 51 | 88919,78771 52 | 88919,79538 53 | 87908,79538 54 | 87908,80478 55 | 87135,80478 56 | 87135,81550 57 | 86514,81550 58 | 86514,81966 59 | 85154,81966 60 | 85154,83369 61 | 84879,83369 62 | 84879,84065 63 | 83848,84065 64 | 83848,84550 65 | 82633,84550 66 | 82633,85553 67 | 81914,85553 68 | 81914,86608 69 | 81224,86608 70 | 81224,87400 71 | 80297,87400 72 | 80297,87882 73 | 79129,87882 74 | 79129,89069 75 | 78496,89069 76 | 78496,89747 77 | 77476,89747 78 | 77476,89792 79 | 76042,89792 80 | 76042,90412 81 | 75009,90412 82 | 75009,91317 83 | 74144,91317 84 | 74144,91746 85 | 72996,91746 86 | 72996,92544 87 | 72050,92544 88 | 72050,93038 89 | 70940,93038 90 | 70940,93570 91 | 69850,93570 92 | 69850,93848 93 | 68650,93848 94 | 68650,94995 95 | 67806,94995 96 | 67806,95319 97 | 66619,95319 98 | 66619,95177 99 | 65280,95177 100 | 65280,95556 101 | 64133,95556 102 | 64133,96445 103 | 63128,96445 104 | 63128,96494 105 | 61879,96494 106 | 61879,96939 107 | 60734,96939 108 | 60734,97073 109 | 59516,97073 110 | 59516,97437 111 | 58345,97437 112 | 58345,97884 113 | 57178,97884 114 | 57178,97310 115 | 55871,97310 116 | 55871,97628 117 | 54689,97628 118 | 54689,97534 119 | 53466,97534 120 | 53466,97639 121 | 52263,97639 122 | 52263,98179 123 | 51066,98179 124 | 51066,98009 125 | 49846,98009 126 | 49846,97587 127 | 48641,97587 128 | 48641,97442 129 | 47441,97442 130 | 47441,97554 131 | 46225,97554 132 | 46225,97865 133 | 44977,97865 134 | 44977,97399 135 | 43808,97399 136 | 43808,97907 137 | 42503,97907 138 | 42503,96814 139 | 41454,96814 140 | 41454,97405 141 | 40099,97405 142 | 40099,96388 143 | 39078,96388 144 | 39078,96382 145 | 37832,96382 146 | 37832,96415 147 | 36557,96415 148 | 36557,95283 149 | 35632,95283 150 | 35632,95832 151 | 34169,95832 152 | 34169,94609 153 | 33315,94609 154 | 33315,94140 155 | 32203,94140 156 | 32203,93620 157 | 31115,93620 158 | 31115,93612 159 | 29791,93612 160 | 29791,92816 161 | 28827,92816 162 | 28827,92854 163 | 27439,92854 164 | 27439,92120 165 | 26444,92120 166 | 26444,91350 167 | 25479,91350 168 | 25479,91029 169 | 24243,91029 170 | 24243,90150 171 | 23354,90150 172 | 23354,88965 173 | 22693,88965 174 | 22693,88616 175 | 21452,88616 176 | 21452,87622 177 | 20684,87622 178 | 20684,87088 179 | 19560,87088 180 | 19560,86108 181 | 18800,86108 182 | 18800,85166 183 | 18022,85166 184 | 18022,84526 185 | 16968,84526 186 | 16968,83798 187 | 15983,83798 188 | 15983,83275 189 | 14768,83275 190 | 14768,82119 191 | 14219,82119 192 | 14219,81229 193 | 13385,81229 194 | 13385,80353 195 | 12529,80353 196 | 12529,78959 197 | 12338,78959 198 | 12338,78258 199 | 11257,78258 200 | 11257,77432 201 | 10316,77432 202 | 10316,76306 203 | 9804,76306 204 | 9804,75257 205 | 9186,75257 206 | 9186,74070 207 | 8808,74070 208 | 8808,73346 209 | 7617,73346 210 | 7617,72112 211 | 7336,72112 212 | 7336,71130 213 | 6571,71130 214 | 6571,69839 215 | 6453,69839 216 | 6453,68884 217 | 5601,68884 218 | 5601,67730 219 | 5195,67730 220 | 5195,66371 221 | 5358,66371 222 | 5358,65433 223 | 4369,65433 224 | 4369,64085 225 | 4595,64085 226 | 4595,62951 227 | 4183,62951 228 | 4183,61942 229 | 3257,61942 230 | 3257,60761 231 | 2939,60761 232 | 2939,59474 233 | 3133,59474 234 | 3133,58235 235 | 3186,58235 236 | 3186,57057 237 | 2924,57057 238 | 2924,55964 239 | 1943,55964 240 | 1943,54727 241 | 1983,54727 242 | 1983,53526 243 | 1643,53526 244 | 1643,52258 245 | 2454,52258 246 | 2454,51063 247 | 1936,51063 248 | 1936,50143 249 | 94800,50143 250 | 94800,48628 251 | 1967,48628 252 | 1967,47420 253 | 2174,47420 254 | 2174,46235 255 | 2572,46235 256 | 2572,45009 257 | 2439,45009 258 | 2439,43789 259 | 2455,43789 260 | 2455,42617 261 | 2817,42617 262 | 2817,41320 263 | 2452,41320 264 | 2452,40171 265 | 2941,40171 266 | 2941,39071 267 | 3579,39071 268 | 3579,37926 269 | 3978,37926 270 | 3978,36593 271 | 3706,36593 272 | 3706,35458 273 | 4168,35458 274 | 4168,34184 275 | 4208,34184 276 | 4208,33283 277 | 5303,33283 278 | 5303,32050 279 | 5479,32050 280 | 5479,31124 281 | 6400,31124 282 | 6400,29843 283 | 6498,29843 284 | 6498,28596 285 | 6717,28596 286 | 6717,27511 287 | 7282,27511 288 | 7282,26340 289 | 7694,26340 290 | 7694,25288 291 | 8327,25288 292 | 8327,24719 293 | 9728,24719 294 | 9728,23535 295 | 10122,23535 296 | 10122,22481 297 | 10731,22481 298 | 10731,21219 299 | 11068,21219 300 | 11068,20260 301 | 11832,20260 302 | 11832,19402 303 | 12719,19402 304 | 12719,18681 305 | 13753,18681 306 | 13753,17399 307 | 14147,17399 308 | 14147,16842 309 | 15341,16842 310 | 15341,15813 311 | 16031,15813 312 | 16031,15227 313 | 17157,15227 314 | 17157,14012 315 | 17695,14012 316 | 17695,13399 317 | 18782,13399 318 | 18782,12438 319 | 19572,12438 320 | 19572,12015 321 | 20791,12015 322 | 20791,11392 323 | 21840,11392 324 | 21840,10247 325 | 22519,10247 326 | 22519,10010 327 | 23828,10010 328 | 23828,9084 329 | 24678,9084 330 | 24678,8491 331 | 25744,8491 332 | 25744,7863 333 | 26788,7863 334 | 26788,6987 335 | 27707,6987 336 | 27707,6573 337 | 28870,6573 338 | 28870,5960 339 | 29935,5960 340 | 29935,5408 341 | 31033,5408 342 | 31033,4964 343 | 32177,4964 344 | 32177,4548 345 | 33332,4548 346 | 33332,4435 347 | 34588,4435 348 | 34588,4188 349 | 35787,4188 350 | 35787,4063 351 | 37014,4063 352 | 37014,3490 353 | 38116,3490 354 | 38116,3175 355 | 39292,3175 356 | 39292,3040 357 | 40506,3040 358 | 40506,2347 359 | 41616,2347 360 | 41616,2950 361 | 42946,2950 362 | 42946,2088 363 | 44053,2088 364 | 44053,2542 365 | 45327,2542 366 | 45327,2293 367 | 46520,2293 368 | 46520,2372 369 | 47737,2372 370 | 47737,1604 371 | 48928,1604 372 | 48928,1823 373 | 50154,1823 374 | 50154,2178 375 | 51365,2178 376 | 51365,1738 377 | 52602,1738 378 | 52602,1788 379 | 53826,1788 380 | 53826,2273 381 | 55007,2273 382 | 55007,2068 383 | 56260,2068 384 | 56260,2614 385 | 57414,2614 386 | 57414,3231 387 | 58537,3231 388 | 58537,2920 389 | 59832,2920 390 | 59832,3681 391 | 60904,3681 392 | 60904,3946 393 | 62081,3946 394 | 62081,4131 395 | 63283,4131 396 | 63283,4652 397 | 64387,4652 398 | 64387,4844 399 | 65596,4844 400 | 65596,5340 401 | 66703,5340 402 | 66703,5487 403 | 67945,5487 404 | 67945,5728 405 | 69166,5728 406 | 69166,6794 407 | 70019,6794 408 | 70019,7116 409 | 71206,7116 410 | 71206,7226 411 | 72517,7226 412 | 72517,7707 413 | 73651,7707 414 | 73651,8446 415 | 74640,8446 416 | 74640,9118 417 | 75664,9118 418 | 75664,10000 419 | 76545,10000 420 | 76545,10362 421 | 77777,10362 422 | 77777,11195 423 | 78686,11195 424 | 78686,12344 425 | 79340,12344 426 | 79340,12818 427 | 80515,12818 428 | 80515,13383 429 | 81638,13383 430 | 81638,14591 431 | 82196,14591 432 | 82196,14977 433 | 83505,14977 434 | 83505,16181 435 | 84036,16181 436 | 84036,16826 437 | 85122,16826 438 | 85122,17980 439 | 85670,17980 440 | 85670,19070 441 | 86263,19070 442 | 86263,19578 443 | 87553,19578 444 | 87553,20767 445 | 88016,20767 446 | 88016,21839 447 | 88608,21839 448 | 88608,22815 449 | 89324,22815 450 | 89324,23773 451 | 90072,23773 452 | 90072,24865 453 | 90613,24865 454 | 90613,25784 455 | 91439,25784 456 | 91439,26819 457 | 92080,26819 458 | 92080,27995 459 | 92456,27995 460 | 92456,28855 461 | 93456,28855 462 | 93456,30075 463 | 93733,30075 464 | 93733,31143 465 | 94332,31143 466 | 94332,32193 467 | 94995,32193 468 | 94995,33560 469 | 94829,33560 470 | 94829,34660 471 | 95352,34660 472 | 95352,35816 473 | 95717,35816 474 | 95717,36836 475 | 96569,36836 476 | 96569,38156 477 | 96354,38156 478 | 96354,39394 479 | 96376,39394 480 | 96376,40441 481 | 97281,40441 482 | 97281,41617 483 | 97650,41617 484 | 97650,42900 485 | 97353,42900 486 | 97353,44047 487 | 97963,44047 488 | 97963,45312 489 | 97609,45312 490 | 97609,46476 491 | 98312,46476 492 | 98312,47743 493 | 97494,47743 494 | 97494,48929 495 | 98347,48929 496 | 98347,50153 497 | -------------------------------------------------------------------------------- /data/day6.input: -------------------------------------------------------------------------------- 1 | 527 781 232 95 3 75 59 66 43 5 68 877 31 4 54 914 15 22 2 29 4 17 5 9176 8 885 97 88 42 6 64 161 1675 36 363 738 71 224 453 72 256 594 914 97 668 95 723 84 738 437 38 1 893 416 5 21 745 18 4566 32 627 16 5 45 8 88 4256 52 9 66 317 691 224 375 17 25 3 3529 42 77 86 9 2 865 793 87 469 86 452 85 51 44 11 43 31 22 15 7 42 5 158 1 462 52 771 74 7 46 62 7587 41 692 9 689 1 31 24 97 399 42 74 73 633 48 9 62 91 66 29 6 92 26 1 98 565 87 71 61 39 5 72 9 286 6 75 7 61 48 255 2 19 4 424 87 11 135 8611 32 4137 6 32 646 63 7 5846 47 572 17 99 993 381 26 46 93 9 519 3 394 5942 764 37 66 297 833 375 92 74 26 673 9 77 32 94 968 62 17 42 22 97 2 71 4891 21 52 4 965 86 525 9259 1 5 643 878 7 99 1548 42 461 87 811 22 2 39 5 91 245 356 4 75 1434 3125 44 666 77 87 24 69 28 8 619 5 8347 96 39 124 4796 54 7 365 78 885 2567 681 964 79 9 42 27 497 727 369 67 668 287 69 226 452 5 33 2863 93 61 539 167 977 193 81 26 8 29 25 7 8 5 9147 41 439 9 23 425 37 829 7339 816 33 34 41 79 41 91 86 75 8 487 15 68 16 4 7 41 855 82 45 77 67 83 69 769 755 5 49 191 13 26 163 11 84 567 32 64 57 63 891 478 33 958 7 376 472 29 7 84 48 3327 76 84 5 4 7 73 6 63 9858 45 39 72 4536 9 31 54 95 82 322 535 2 15 861 7 11 623 26 8 4 327 54 4 8 51 9 7894 7 47 3 525 379 332 4 35 2 4 3992 1 52 984 68 349 59 5 955 6 9678 7 12 157 5 35 75 721 46 65 43 945 382 53 9 2 6 36 55 94 42 21 27 745 67 53 7 8 51 1559 371 852 7 2 3 518 691 476 3 77 462 332 23 5 31 598 4 35 581 1 957 679 86 35 85 567 4 26 415 92 49 739 43 841 99 69 8 65 399 2837 535 19 129 8 84 1 319 985 133 2 89 41 65 93 4 77 51 6132 89 36 8 96 3 33 3 26 29 2716 3 3 81 2116 2839 85 29 5 5 5293 1812 532 713 86 44 949 697 23 657 28 3 888 912 85 59 1 39 73 14 82 347 56 186 6 91 535 17 8 343 17 85 433 4833 3 593 633 3193 414 76 924 91 8 941 88 58 85 2 67 638 75 99 17 76 75 7 215 528 69 6795 42 7 846 1 763 348 8 1 612 2 67 848 916 189 233 251 18 844 73 975 34 65 888 3716 4893 28 6362 4 488 68 6 33 2 1 781 421 72 72 3 22 865 41 778 5554 65 3 53 3 752 27 37 542 68 857 28 5 513 59 1 3327 45 949 324 3 3 87 5 699 52 29 815 3 21 12 3 93 98 9 54 12 6 14 14 22 2644 838 5 11 86 3 5443 433 82 6 86 1 14 41 4 7 28 1 68 26 7 98 443 29 56 9 11 78 15 3 83 53 79 92 7248 8 1166 28 32 4 33 49 66 798 594 5 12 79 887 18 21 28 299 9752 2 91 44 86 96 78 47 145 993 4 2918 68 582 16 962 11 765 62 456 18 633 35 95 63 48 9366 19 1922 3 258 512 3 575 4537 51 28 86 71 35 4 63 2 474 86 47 793 274 84 83 797 77 48 554 9432 5 6 763 2 9 9634 2 86 68 82 97 82 51 24 17 881 497 452 156 12 615 143 3 51 561 3988 32 8 29 3 26 89 139 3 7 981 7 26 551 66 494 64 69 238 12 23 156 857 155 582 42 37 28 232 91 31 3483 93 11 59 453 6348 35 779 193 82 8 23 72 38 65 79 6 96 959 16 2573 595 11 2 72 44 8 18 6 79 44 183 853 52 76 47 976 456 825 2449 54 995 26 233 4 6864 5 332 88 3 39 26 99 272 72 99 73 6 39 94 835 439 99 81 539 8476 88 41 42 845 3 2 5 97 14 6 71 168 9832 92 6 98 17 113 1752 272 853 2154 77 4 71 733 7 4 6 45 4121 91 23 647 52 743 644 728 75 53 4 2 81 11 8 89 69 8 98 73 87 19 3 97 25 2 361 374 8 891 572 811 1632 399 24 894 5 1368 64 484 975 7 963 352 432 31 4 12 647 52 778 94 53 39 54 65 3 79 14 42 561 4475 7483 9565 58 427 95 92 5 856 84 1 279 38 4 23 7 2886 44 3229 261 89 3818 47 999 77 39 674 1 2 | 471 289 691 56 2 16 6 47 35 3 53 959 91 8 771 841 49 81 644 459 99 7874 7 7994 29 993 41 234 34 78 142 146 5353 46 746 939 54 596 36 11 551 471 29 12 477 23 415 29 573 545 16 8 286 429 3 49 792 38 3581 68 557 694 99 23 2 462 3287 54 82 66 585 867 992 168 49 9 39 6394 572 738 47 63 79 11 994 787 928 61 133 17 277 64 748 75 63 63 28 2 44 12 4917 84 576 924 227 12 71 47 68 5688 94 282 92 723 834 46 39 18 128 41 13 52 555 89 9 58 468 68 79 41 74 29 13 93 883 64 42 54 65 13 634 67 341 9 29 81 49 164 678 2 114 65 547 769 33 753 4246 53 791 43 279 112 29 99 6833 23 345 91 38 75 936 163 71 95 5 578 622 832 536 768 17 35 885 182 459 26 51 62 125 66 38 47 66 32 82 22 52 236 51 8 61 8585 73 72 71 821 27 675 1599 18 5 192 258 3 29 954 34 352 42 182 315 427 11 5 11 813 178 59 289 7379 6419 25 798 42 72 95 67 37 87 242 97 5183 678 65 86 5916 75 69 535 96 95 2449 992 771 99 8 35 35 982 7489 415 15 645 462 173 35 491 43 18 1471 95 499 113 712 843 78 24 915 93 25 647 75 8 9 43 73 949 222 3 599 11 138 3145 442 64 48 38 8475 28 43 14 37 7 516 498 91 77 832 87 92 896 63 21 22 351 27 697 787 652 28 28 71 38 27 723 135 277 322 82 4449 36 45 922 599 56 9922 18 393 2647 61 34 52 53 1587 87 165 7 24 6 24 23 22 9649 66 58 21 5842 2 497 68 38 64 232 969 822 48 516 7 24 171 66 9 76 88 47 39 19 86 51 2463 49 72 71 349 878 763 22 96 487 281 822 9 34 584 49 913 45 91 858 5 9632 98 41 86 41 95 279 177 92 55 66 646 4664 79 13 66 857 64 41 9976 65 16 43 13 244 645 37 41 85 6295 331 145 4 44 5 799 847 267 9 45 372 179 86 7 36 66 48 72 495 87 956 989 45 164 33 243 6 27 346 45 77 763 18 894 45 19 27 2428 18 2557 485 8 271 63 32 21 652 983 641 5 86 98 68 28 4 464 52 4459 2287 9 46 63 5 3919 72 15 998 7481 63 3 18 6436 6733 71 85 7 2 6557 1265 718 229 675 212 539 255 82 173 46 121 164 3549 95 11 44 883 28 32 54 287 543 715 93 48 476 76 223 559 91 5 699 5412 771 714 196 2799 1426 55 776 28 5 792 61 1 42 59 77 879 197 87 42 164 792 4 659 367 7967 2742 75 25 64 459 522 356 8 66 643 6494 15 291 851 931 569 144 79 669 49 847 92 3 653 344 341 53 8971 14 271 73 912 55 31 93 339 45 55 361 96 57 574 94 9568 6344 17 828 45 6 916 31 48 128 18 318 89 9 84 75 3 6833 18 954 382 6 4 4374 4 768 56 58 522 46 27 82 216 83 52 6 46 283 4 86 36 6444 2258 949 2 73 66 7 5142 734 78 18 87 7 76 64 2 6 43 2 859 247 71 57 694 61 93 52 46 73 96 5 65 57 917 81 7985 98 1245 73 56 1 267 61 66 934 496 1 64 45 197 76 29 76 58 5633 49 98 25 967 53 897 159 23 564 41 8469 53 532 19 825 39 6728 58 316 55 397 85 816 248 19 4283 53 2391 58 253 865 55 714 4178 66 83 154 31 23 56 51 1 23 85 66 726 874 96 11 929 31 48 996 358 15 43 175 399 28 1546 27 373 47 19 74 3 55 6193 67 516 94 388 788 32 497 4758 8 63 25 322 526 99 71 2 99 48 673 22 962 842 27 61 393 656 124 54 25 887 56 667 463 237 757 495 97 665 778 357 88 49 466 87 31 6 799 512 52 834 6982 26 6 38 55 54 826 491 3 73 72 958 4959 992 96 11 97 46 884 11 83 27 96 5279 256 64 6 67 651 818 478 188 16 513 63 722 48 9198 59 492 15 624 65 56 61 647 88 52 57 5 79 79 412 4452 7 26 58 2772 21 97 16 1392 36 51 75 51 96 42 21 168 3769 96 562 98 46 326 3835 683 838 393 66 3 28 312 49 6 2 719 3832 385 59 341 974 898 536 561 99 74 6 6 75 88 91 61 69 449 77 83 36 2136 62 18 95 772 944 358 651 252 378 383 3611 398 39 786 73 9977 98 844 115 751 711 489 595 62 59 68 825 25 23 73 17 87 7 99 9 36 6 61 746 2786 4337 364 75 1516 23 55 89 837 58 59 611 67 68 79 34 792 419 6631 917 87 3225 99 898 41 13 745 4 3 | 527 84 5159 46 96 74 9 31 1 54 93 2525 19 87 555 328 96 13 698 3168 535 2246 58 5345 63 297 23 235 54 239 445 262 3591 98 7913 674 26 649 9 12 82 329 18 45 178 3 947 65 715 68 47 57 547 938 1 84 653 97 9138 37 341 918 14 4329 375 847 1118 33 99 38 773 498 7 11 48 2 65 246 117 358 36 14 49 26 46 638 724 67 382 16 9749 954 725 86 17 51 47 38 18 42 7913 97 128 491 797 47 865 841 69 358 75 837 553 61 192 89 318 34 418 99 4 86 49 77 174 88 831 36 85 155 13 43 695 28 73 29 14 23 79 23 4872 21 387 27 65 21 81 233 775 191 952 65 234 434 66 392 4417 416 387 54 736 724 234 794 851 69 38 627 69 87 738 964 3 24 94 1 776 237 35 92 71 486 18 826 82 12 21 6 272 66 34 85 71 24 13 691 85 3277 62 66 36 4197 79 82 69 328 944 229 342 82 23 96 282 29 49 427 49 718 251 448 7194 174 3 288 79 261 371 82 2994 728 54 59 646 32 41 91 245 3 62 25 66 7634 2937 7 18 488 56 71 144 36 63 861 59 468 798 11 96 28 93 5118 12 28 13 267 725 77 47 97 37 749 34 245 397 61 59 7 4 982 729 78 5431 57 19 24 13 2 56 353 2 15 74 872 55 361 85 96 4 9759 38 28 59 22 3 323 226 69 98 1188 78 934 873 24 89 58 961 7 456 84 158 32 72 83 86 1536 479 448 536 83 71 2331 9 97 642 782 21 9517 349 268 3916 55 15 33 55 139 52 381 33 93 2 79 353 77 8762 4 97 8 93 829 654 19 891 87 928 53 797 77 827 13 27 57 67 59 56 57 99 86 63 28 953 8149 98 43 416 184 676 959 63 77 997 8714 44 39 66 7994 63 541 69 44 59 38 84 19 46 46 696 23 7539 722 46 72 51 357 4845 74 84 22 871 42 5 1144 85 597 94 69 662 815 69 97 52 4984 331 788 5 54 18 3445 336 189 35 3 23 53 21 35 83 2 474 9 782 423 741 666 28 8679 72 978 954 79 263 9 27 57 4 619 559 72 141 6149 87 1797 172 1 327 14 76 97 5 135 59 523 34 919 43 5993 17 254 17 676 6427 3 47 8 3 8977 448 5 786 511 924 63 73 6718 2592 49 9 4 2 465 267 256 678 175 293 727 985 87 962 21 937 69 7235 13 928 214 783 83 18 54 645 6369 197 425 73 264 58 997 633 81 9 753 8162 6446 99 65 1294 9797 15 411 71 37 58 659 6 44 96 193 73 914 26 22 321 6316 77 453 78 5949 6387 26 83 8 3776 927 2685 7 74 35 7756 67 325 579 84 1 579 869 56 7 36 644 4 27 692 73 8 96 17 693 12 7577 73 56 86 715 2 9 9325 98 5 787 48 3721 2159 46 285 225 947 696 745 16 715 3 678 61 95 58 81 92 1583 77 579 44 11 17 4549 35 771 867 23 33 889 21 49 846 98 29 66 62 753 6 454 41 3258 3179 245 21 63 498 89 8489 897 38 885 45 49 76 29 13 784 12 5 236 965 773 754 14 74 97 59 73 91 63 41 1 4 193 51 6673 76 569 577 96 77 466 57 482 179 264 57 6 69 557 552 96 1 15 939 368 4 93 425 36 727 637 15 394 779 956 38 9521 88 282 675 1225 13 364 77 343 3 5875 918 75 974 85 664 75 995 981 85 78 8211 78 11 199 8 3 824 68 84 36 87 12 71 798 67 44 92 86 29 558 51 27 26 843 9956 86 6855 395 563 19 683 7 4 49 2313 97 443 97 946 391 28 556 3942 41 94 87 289 654 69 1 5 41 13 28 21 262 67 79 51 779 664 394 86 22 78 26 573 782 9 2915 6 12 669 693 925 361 92 395 992 48 4 8 271 87 837 3344 99 4 11 76 66 518 9156 34 75 75 289 8167 25 18 935 9 76 4987 6975 23 789 33 7424 99 21 9 39 668 23 28 81 28 193 48 285 32 7559 46 539 84 454 98 26 95 461 91 54 95 5 67 4 83 6666 5 7 77 684 769 4 23 1367 72 291 52 39 84 82 23 576 3955 28 125 77 38 4 687 619 7193 389 33 35 97 467 883 7 4 535 4617 939 412 474 6691 3 173 538 38 72 74 91 7 5 87 79 5 326 8 6 16 4682 377 37 58 678 684 415 784 63 676 533 514 638 6 971 65 7676 46 911 634 659 282 76 512 15 11 74 83 871 11 16 76 94 1 22 5 16 8 42 369 8726 728 531 92 4361 18 1 35 189 74 33 466 684 54 622 36 886 748 228 179 3193 9714 1 616 11 4 55 45 4 | 96 7 9932 96 25 77 3 6 1 198 33 1758 64 99 928 1738 8 73 373 4115 531 6283 86 71 66 442 58 525 3 328 8563 461 662 6 9546 295 33 662 2 32 95 5 25 96 58 3 921 72 783 92 11 71 1 81 51 41 28 8 9666 5 78 743 11 2264 995 244 74 27 32 64 62 42 3 83 52 1 86 119 234 981 9 85 55 8 27 622 225 4 98 77 4974 7215 491 37 24 75 5 383 5 81 6299 99 435 173 2 64 173 949 47 925 14 982 487 3 491 75 464 43 46 66 5 66 34 7 239 16 334 4 46 757 6 14 264 83 29 51 1 486 1 471 5893 46 513 25 37 59 31 155 793 449 181 33 47 768 2 29 664 983 517 72 486 53 634 586 6 35 8 968 88 25 959 589 2 76 48 2 276 489 9 21 45 796 7 21 32 2 85 6 96 64 64 1 7 5 1 819 11 4278 99 17 27 526 11 31 23 91 167 759 494 482 514 4 437 61 67 88 65 4 926 221 7646 5428 5 385 1 47 98 78 2335 37 53 42 163 67 376 52 219 9 82 6 83 279 5225 5 11 5 26 16 57 2 57 71 49 736 738 45 1 1 54 9168 7 17 3 63 345 79 8 54 66 65 166 361 868 81 12 4 3 977 118 3 3564 67 11 78 72 1 98 455 5 3 2 799 78 48 65 59 1 1262 3 56 9 75 35 69 489 775 63 5684 51 159 197 7 42 92 721 1 448 98 95 92 63 68 2 6961 723 175 174 31 89 6819 1 57 877 596 32 6395 524 922 2951 7 213 18 51 6 1 617 81 12 86 94 843 57 327 6 41 4 66 423 431 52 643 92 94 92 434 23 36 96 7 92 29 89 57 2 5 92 968 18 726 5945 52 13 238 824 924 3 41 36 143 2451 5 34 96 7552 7 329 87 412 8 63 9 57 88 78 863 34 1892 62 97 21 56 848 1327 41 23 62 367 15 9 2145 25 333 78 5 426 319 19 14 57 2455 565 649 37 48 14 5736 663 695 12 3 21 87 34 65 86 3 842 8 963 556 115 53 36 7468 852 821 327 7 218 2 7 36 7 535 815 23 927 5744 16 3842 612 3 7 77 23 14 6 82 1 376 66 728 3 4774 24 3921 92 28 1518 8 11 3 18 5391 884 9 841 111 193 15 72 8 361 928 1 13 26 355 51 25 44 678 267 33 977 98 3858 35 612 5 4234 54 175 613 339 98 26 87 76 3755 58 835 44 4 34 739 166 85 3 73 355 9694 7 82 7779 4317 73 82 65 68 14 368 4 88 83 332 2 522 7 37 333 1689 93 21 13 8529 7282 4 63 8 5214 65 6278 34 37 6 1816 9 157 11 1 6 4 118 86 8 1 824 4 84 25 7 9 2 99 74 58 9985 78 72 82 43 4 2 9971 16 8 541 87 5487 2219 8 948 511 369 8 749 97 324 4 4 8 94 44 4 45 4931 95 646 5 17 64 6467 69 89 324 6 1 654 32 59 775 76 24 95 72 186 87 5399 9 5894 45 248 568 64 343 466 53 698 45 717 5 54 86 1 16 797 32 67 833 549 593 965 39 85 51 99 28 45 63 31 1 6 932 6 3164 92 16 128 87 54 664 25 487 94 677 26 9 4 87 838 47 8 88 62 471 4 3 328 17 599 936 18 4 913 365 72 5187 98 282 563 9281 177 53 12 5 6 4142 286 59 699 94 22 54 124 3 84 8 75 565 5 564 5 4 865 39 81 75 82 7 99 89 6 8 62 87 7 895 78 49 19 432 2761 82 772 864 327 42 435 2 7 66 5762 944 8563 85 585 7 85 337 8183 78 31 83 776 1295 11 3 56 1 889 4 71 751 11 31 6 32 5479 782 48 59 9 18 4485 6 5 2351 9 11 266 428 544 479 11 2 716 6 9 9 89 3 94 6396 26 56 77 4 29 378 1698 96 86 81 527 4927 51 42 113 1 86 3248 4138 15 663 44 5456 62 65 7 31 85 9 9 75 16 442 92 213 59 976 29 266 25 989 29 61 3 98 73 5 52 43 63 2 71 8884 1 8 35 32 644 4 44 9919 85 291 79 12 56 22 1 653 679 21 845 35 36 2 78 722 3959 896 76 16 37 12 954 83 62 219 521 726 565 71 9773 2 332 23 24 84 21 21 5 4 15 95 3 742 3 8 44 3933 676 4 87 372 4 5 765 48 74 7338 447 361 7 795 613 88 4 121 21 219 54 1 883 43 16 2 42 4594 95 81 8 42 3 57 58 42 6 181 146 1971 9 321 6 3761 57 5 46 893 18 62 516 544 35 425 29 652 977 5 662 8679 355 4 342 89 8 73 29 5 | * * + * * + * * * * + + + * * + * + * + + + + + * + + + + * + * + + + + + * + + + + * + * * * * + + * + + * * + * * + + * + * + * * + + * * * * + * + * + + * * + * + + * * * * + * + + * * + * * + * + + * + * * + + * * + + + + * * + * * + + + + * * * * + + * + * * + + + * * * * + + * * + + + * * + * + + + + * * + * + + * + + * + * + * + * + * + + + + + * + * * * * * * + + * * + * + + * * * + + * * + + + + * + * * + * * + * + * + * * * * + + + * * * * * + + + * * + * + + + * * + + + + + + * * * * + + * * + + * * * + * * * * + * * * * + + * + + * + + + * * + + * * + * + + + + + + + * + * + + * * + * * * + * + + + + * + * + * * * * * * + * * + * * + + + + * + * + + + + * + + * + + + + * * + * * + * + * * + + * * + + * + + + * * + * + + * + + * * * * * + + * * * * * * * + + + * + + * * + * + + + + + + * * + * * + * * + + + * + * * + * + * * + * * * * + + + + + * + * * * * + * + + * + + * * + * + + + * + + + * * * * * * + + + + * + * * + * * * * * + * + * * + * + * + + + * + * + + * * + + + * + + + * * * + + * + * * * + + + * * + + * + * + + + + + + * * + * + * + + * * + + + * + + * + * + * * + + * + + + * * * + * * + + + + + * + * + * + * + * + * * * + * + * + + + + + + + + + + * + + * * * + * + * + + + + + + + + * * + + * * + * * * + + + * * * * * + + * + * * * + + * + * * + * + + + + + * * + * + + * * + + + + + + + + + * + * * * + * + * * * + * + + + + + + + * * * * + * + * * * * + + * * + * + * * * + * + + + + + + + * + + * * * + + + + * + + + * * * * * + * * * + * * * * + * + * + * * * + * + + * * * + + + + + * * + + * + + + + * + * + + * * * + + + * + * * * + * + * * * + * * + * + + + * + * + * + * + * + * * * * + * + + * + + + * + + * * * * + * * * * * + + + * + + + + + * + * + + * * * + + + * + + + + + * + * * * * * + + + + + + + * * * + * * + + * * + * + + + * * * + * + + * * * * + + * * + * + * + + + * * * * * * * + * * + * + * + + + * + * * * + * + + * + * * + * + * * * * + * * * + + * * * * * + + * + * * + + + * + + * + * * * * * + * * + * + + + + + * + + * + 6 | -------------------------------------------------------------------------------- /data/day4.input: -------------------------------------------------------------------------------- 1 | @@@..@@....@.@.@@.@.....@@@@@@..@.@@@@@@@@@.@@@@@@..@@@@@.@@.@@.@.@.@..@@@@.@.@.@.@@..@....@.@@@...@@.@@@@...@@@@@@..@@@@@@..@@@@@@.@@..@.@ 2 | @@@@.@@@..@@@.@.@.@@@@..@.@@..@.@@@.@.@...@.@@@@@@@@@@@.@@@.@@@@@.@@.@@@@@.@.@@@.@.@.@@@@@@..@.@..@@.@.@@@.@.@.@@.@@.@@.@@.@@@@.@@@.@@@.@@@ 3 | @@@@.@.@@@@.@@.@@@.@.@@@@@.@..@@@.@@..@@@.@@@..@@.@@...@.@@.@@@.@@@.@.@@.@@@@@@.@@.@@.@@.@@.@@@.@@@@@@@@@@@@@@@@@.@@.@.@@@@@@@@...@@@@@.@@@ 4 | .@@@.@@@@.@@@@@@@..@@..@@.@@@@@@.@@.@@@@@@@.@@@@@@.@.@..@@.@@@..@@.@@@@.@@@@@.@@.@@.@@.@@@@@@@@@@.@@.@@@.@.@@.@@@@.@@@.@.@@@@@@@....@@.@.@@ 5 | ...@.@.@@...@@@@@@@@@.@@.@..@..@@..@@@..@@...@@@@@@@@.@@@.@@....@@@@@@@@@.@@@@@@@@@.@@@@.@.@@@.@@.@@@@@.@@..@@@@..@@@@...@@.@@@..@@@..@@.@@ 6 | @@...@@.@@@@.@..@@@@.@@@@@.@@...@..@..@@.@..@@@.@@@@@@@@@@..@@@..@@@@..@@@@@@@@.@@@.@@@@.@@@..@@.@@.@@@@@...@@@@@@@..@@@.@@@@@..@@.@@..@@.. 7 | .@..@@@@@@...@.@@@.@.@@.@.@.@@@@@.@.@@@@@@@@@@@@..@@@@@@@@@.@@.@..@.@@..@@@@..@.@@..@.@@.@@@@..@@@@@.@...@.@@.@@.@@@@@.@..@.@@@@@@.@.@@.@.. 8 | @@@@@@@@@@@@@@..@@.@...@@.@.@.@@...@@@@@@..@@@@.@@.@@@@.@.@@.....@@...@@@.@...@@...@.@@.@@@@@@..@@@@@@..@.@..@@@@..@@@.@@@@@.@@@@.@@@@.@@@@ 9 | @@@...@@@@.@@@@@@..@@@.@@.@@.@..@@@@..@..@@@...@@@@@....@..@.@.@@@@@.@.@@@..@@@..@.@.@..@.@..@.@@@.@@...@@@..@@...@@@@@..@@@@@@@@.@@@.@@@@@ 10 | .@@@@@...@@@@..@@@@@@@...@@.@@@..@@@..@@@.@...@@@.@@@.@@@.@.@@@.@@.@@@@@@@@.@@.@.@@@@@@@.@@..@@.@.@@@@.@@.@@@..@@@@@@.@.@.@.@@..@@@@@.@@..@ 11 | .@.@@.@..@.@@.@@.@@@@@@@@@.@..@.@@@.@..@@.@.@.@.@......@..@@.@.@@@@@.@@@@@@..@.@@@@...@@@@.@@@@@@@...@@@@.@..@@@@@@.@@..@...@.@@@.@.@@@@.@@ 12 | @@@@..@@@..@@..@@@@.@.@@@.@@.@@@@@@..@@@@@@@@@.@....@.@.@@@...@.@.@.@@..@..@@@..@..@@@@...@.@@.@@@...@.@@@@.@@@.@.@@@@.@@@..@@@@..@@@@@@@@. 13 | @@.@@@.@@@@@@@.@.@.@@@@@@@@...@@.@@@@@@@@..@.@..@@..@@.@.@@.@@@@@@.@@.@@@.@@@@..@.@@@.@@.@@@....@.@@@.@.@@@@@@@@.@.@@@@.@..@@@@..@.@@@@@... 14 | @@@.@@.@..@@.@.@@.@@.@.@@@@.@@@@@@..@@@.@@@@.@.@..@@@@@@@@@@@@@.@@@....@@@@..@@@.@@@@.@@..@@...@@@..@@@@@.@@@@..@.@...@..@@.@@.@.@@@@.@@@@@ 15 | @@@..@@..@.@@@...@@.@@@..@.@@@@@.@@@@@@.@@@.@@@.@@@@@.@..@.@.@@@@.@@.@@@.@@@@.@@..@@...@.@..@.@@@.@@..@@@.@@@@.@...@@@@@.@@@..@@@.@.@.@.@@@ 16 | @@@.@@.@@@@.@@@@@@@.@.@@.@@@@@@..@.@..@.@@@..@.@@.@.@@@@.@..@@@.@@@.@@@@@@...@..@@..@@.@@@@..@.@.@@@@@.@..@...@..@@...@.@...@..@@@.@..@@@@. 17 | @@....@@@@@@@@.@@@..@.@@.@@@@....@@@@..@@.@@..@...@...@@..@@@@..@.@@@.@@.@..@@@@@@@..@@@.@.@@@.@@@@..@@..@@@@@@.@@..@..@.@@@@.@@@.@.@@@@@@. 18 | @@...@@.@.@.@@@@..@@@@@@.@.@.@@@@@@@.@.@@.@@...@.@@@..@@@....@@@@.@..@.....@.@@@@@.@@@.@@@@@@..@....@.@@@@@@@.@@.@.@..@@.@@..@@@.@@@@.@@.@. 19 | @@@@.@..@@@@..@@.@@@@@.@.....@@@@@..@@@@@@@..@.@@..@.@@@@..@@@@@...@.....@@@..@@.@@.....@@@@....@.@@@..@@@@..@@@@@@.@@@@.@@@..@.@@@.@.@@@.. 20 | @@@..@.@@.@.@@.@.@@@@@.@@@@@.@@@@@@.@@@.@@@@@.@@@.@@.@.@@....@...@.@@@@@.@@.@.@@@...@@.@...@@.@@@@.@@..@.@@@@@@@.@.@@@@@@..@@@.@@.@@@@.@@.. 21 | @.@@@@@@@@@@@@..@@@...@..@@@.@@..@@@...@@@....@@@@@..@@@@@.@@@@.@@@@..@.@@.@@@@@.@@@@@..@@@@..@@@@..@@@@@@@@.@@@..@@@@@@...@.@@...@.@.@.@.@ 22 | @@@@@.@.@@@@.@.....@.@@@@@@.@@..@@@@@@.@.@@@@.@@.@@.@@@@.@@@@.@.@@@..@.@@.@@@@.@.@.@.@@.@@.@@.@.@.@@@...@@.@@@@.@@..@@..@..@.@@.@@.@.@@@@@. 23 | @@@.@.@@@@@.@@@@@@..@@..@@@.@@.@....@..@@@@@.@.@@.@@@.@..@@@.@@@@@@..@.@@@@@@@@@@@..@.@@...@@@..@.@@@@@@@@@.@.@@@@@@@@@.@@@..@...@@.@@....@ 24 | .@..@@@@@@@.@@.@@@@@@@@@@..@.@@@@..@@.@@.@....@..@..@@@@@@@@@.@.@@@..@...@.@@@@....@@@@@..@..@@@@.@.@@@@@@@.@..@..@@..@@.@@.@..@.@@@@.@@@@@ 25 | @@@..@.@@......@@.@.@.@@@@.@@@@@@.@.@@.@..@@@@.@.@@@@@@@@@@@@@@...@@@..@@.@@@..@@@..@.@.@@@.@.@..@..@@@@@@@@@@@@..@@@@..@.@@@...@@@@@@@..@@ 26 | @@.@..@..@......@@.@.@@.@.@.@@....@@.@@@@.@@@@@@.@@@@@@@..@.@.@@@@@@@...@@.@.@@..@.@...@@.@@@@@.@@@@..@@.@.@@@.@.@.@@@@@..@@.@@.@.@.@.@@.@. 27 | ..@@@.@@.@@@.@@.@@@@.@@.@@@@....@@@.@.@@@@@.@@.@@@@..@.@.@.@@.@@@.@@@@@.@.@@@@@.@.@@@.@@@.@.@@@.@@@.@@@.@@@@@@.@@@@@@@..@@@@@..@@.@.@...@@@ 28 | @@.@.@@.@.........@@@@@@.@@.@@.@@@.@.@@.@@@.@.@@@...@@.@@.@@..@@@@..@@@..@.@@.@@.@..@.@.@@.@@.@.@.@.@.@.@@@.@@@.@@@@@@@.@@@.@.@@.@@@@....@@ 29 | @@.@@@@@@@..@@@..@.@.@..@@..@.@@@@@.@.@.@....@.@.@@.@@@.@..@@@@@@@@@..@@@.@.@@@@@@.@@@@@.@...@@@@@@@@.@@@@.@@@..@.@...@@.@..@.@@@.@.@@.@.@. 30 | .@@@.@@@.@@@.@@..@@@@.@.@@@@@@@@@@..@@.@@..@@@@.@.@@@@@....@@@@..@@@@..@@.@.@@..@@@.@.@.@.@@@..@@.@@.@@@@.....@.@.@@@@..@@@.@@@..@@@.@..@@@ 31 | @@.@@..@@.@.....@..@@@@@..@.@..@.@.@.....@.@...@@...@.@.@@@@...@@@.@@.@.@.@@.@@.@@..@@.@@...@@@@@.@@.@@@.@@@...@.@.@@@@@@@@.@@@@.@@@@@@..@@ 32 | @.@.@@@@@...@@@@..@@@@@@@..@.@@@@@....@......@@.@@.@.@..@...@.@@.@@@..@@@@..@@@..@@@.....@@@.@@@@@.@@@@@@@@@@@@@@@@@@@.@@@@@@@..@.@@.....@. 33 | @@.@@@@@@@...@@@@.@.@@@@@..@@@@@.@@..@@@@.@@@@@@@@@@..@@.@@...@.@.@.@@@@@@@@@.@@..@@@@@.@@@.@@@.@@..@..@@@@@.@@@@@.@@@@.@@.@@.@.@.@@@.@.@@. 34 | ......@@@@.@@@@@@@@@@@@@@.@@@@@@@@.@@@@@@.@@..@@..@@@@.@@@@@@@..@@.@.@@@@@@.@@@.@@@@@.@.@@@.@@@@.@@@@@@@.@@@@@...@@@.@@..@@...@@.@@...@@..@ 35 | @@@.@.@@@@@.@.@@.@@@.@@@.@@@@@@..@@@.@.@@.@@...@@@@..@@@.@.@.@..@@.@@.@@@@@@.@.@.@@.@@@..@@@@@..@@@..@@..@@.@@@@.@@@@@.@..@.@@@.@...@..@@@@ 36 | @@@@.@.@@.@.@.@.@@@@@@@@@.@@.@@@.@@@@@@.@@.@..@@.@.@.@@@@@@@@.@@@@@@@.@...@@@@@@@@.@.@.@@@.@@@@@...@@.@.@@.@@.@@.@.@..@..@.@.@@.@.@...@.@.@ 37 | @@@.@@@.@@@.@.@..@..@@@.@@@.@@@@.@.@.@.@@...@..@..@@.@@@.@@.@..@@@@@@@.@@.@@@.@@@@...@@.@@@@@@@@.@....@...@..@.@@@@@@...@@@.@.@.@@.@@@.@@@. 38 | @.@@@.@.@.@@@@..@.@@@@@@@@@..@@@@@@@.@.@@@@.@@..@@@..@@..@.......@@@.@@.@@@@.@.@...@@@@.@@@@@.@@..@@@@.@@@@@@@@@@...@@@@.@@.@@.@...@@@@@@.. 39 | @@....@@.@@...@.@..@@.@@@.@.@@.@@@@@@.@@.@@@@@@.@@...@@@@@@@@@@.@..@.@...@@..@@.@.@.@@.@@.@@..@@@@.@@.@@.@@.@@@@@@@@@@.@.@@.@@.@@@@@@@.@@@. 40 | @@..@.@@@@@@@.@@@@@...@@@.@@@.@@.@@@.@@...@@..@@@.@@@@@....@@@.@@@@.@@@@.@@.@.@@.@....@@..@.@.@@@.@..@@..@.@@.@..@..@.@@.@@..@@..@@@..@@.@. 41 | .@@@@.@@@..@@@@@@@@...@@@......@.@.@..@@@@@@@.@@@.@@.@@@@@@.@@@@..@@@@.@.@@@@@@...@.@.@@@.@@@@..@@@@.@.@@@.@.@.@@@..@@..@@@....@.@@.@@.@@@@ 42 | @@@@@@@@@@.@@...@@@@@@@.@@@@@...@.@@@.@@.@@@@.@@..@.@@@@@@@@..@@@@..@@@@@.@@@@@@@@@.@..@@.@@.@..@..@.@@@..@.@..@@@@@@..@.@@@.@@@.@@.@@..@@@ 43 | .@@@.@@..@..@.@.@@@@@@..@@@.@@@@@@@@@@@@.@@.@.@@.@..@@@@@..@..@@@.@@@@@...@@@@@.@.@@@@...@@@@@@..@@@@@@.@@.@@.@...@@.@.@@....@....@@@@.@@.. 44 | @.@...@..@@@.@@@@@@@.@..@..@@@@@.@@@@.@@..@@..@@@@..@@@@..@@@.@@..@@@@.@@@@.@@@@@@@.@....@....@@..@@@@@@.@..@..@@@@...@@@@...@@@@@....@@@.@ 45 | @.@@..@@.@@.@@@.@.@@@.@@@@@@@.@@@@@.@...@@@@@..@....@@@.@.@.@@...@@...@@@..@.@..@@.@@@@@@@.@@...@@@.@@@@@@@@.@@.@.@@@.@.@.@@.@@@@@.@.@@@..@ 46 | @.@@@.@@@@@.@@@@@@.@@@@@@@..@@@.@@@.@..@@@@@.@..@......@..@..@@@@@..@@@..@@@.@..@@@..@.@.@..@.@@.@@@.@@@@.@.@@@@.@@..@@@..@@@@@.@@..@@@@@.@ 47 | @.@@@.@..@@.@.@@@.@@@..@..@@@...@@@@@@@@@.@@@.@@@@@@..@@.@@@@@.@@@@...@....@.@@..@@@@@@@@@...@@.@@@..@@@@.@.@..@@@@@@.@@@@@@@@@@@@...@@..@@ 48 | @@@@..@.@@@@@@@@..@@.@@@.@@.@.@@@.@.@.@@@@@@@....@.@@.@@@@@@@@..@.@..@@.@@@@@@@.@@@.@.@@@@..@.@.@@.@@@@@.@@.@.@..@@@.@.@@.@..@@..@@@@.@..@. 49 | @@@@.@.@.@@.@@@@@@..@.@@@.@.@@.@@@.@@.@.@.@@@..@@.@...@@.@@@@.@@@@..@..@.......@@.@@@@.@.@@..@@@@@@@@@@@@.@@.@@.@@@@@@@.@@@..@@..@@..@@@.@@ 50 | .@@@@@@@@@.@@..@.@@.....@.@@.@.@@@..@...@.@@@@@@@.@@.@@...@.@@....@@@..@@@@@@@@@@@@@@@@@.@@@@.@@@@@@@@..@@@.@@@..@.@..@@......@@@@@@..@@@.@ 51 | @@@@.@..@..@@.@@@..@@@.@@@@@@.@@@@@@.@@..@..@@.@@@@.@...@@@.@@@..@@.@..@@@.@.@@@..@@@..@@@@..@@..@.....@..@..@..@@@@@@@...@.@@@@@@..@.@@.@@ 52 | .@@@@@@@@@@.@@@@@@.@.@@@@.@@@@@@.@@@@@@@@@@@.@..@@..@@@.@@@@@@@@@...@..@.@@@@@@@@@.@@@...@@..@.@@..@@@@@@.@..@@@@@@@@.@@@@@@@@@@..@@@@@@@@@ 53 | .@..@..@@@.@@...@.@@.@.@...@@@...@@@@.@@@@@@@@@.@@@@@@@.@@@@.@.@@@@@@@....@.@@@@@..@@......@@.@@@@.@@@@@@@@.@.@..@@..@@..@@.@@.@@....@@@.@. 54 | @.@@@@..@@@@.@@.@@@@@@.@.@.@@@@@@@..@@@@@@@@..@@.@@@@@@@@.@.@.@@@.@@.@@.@@.@@@@@@.@..@...@@@@@@.@.@@@.@@@@@@@..@@@.@@@.@.@.@@@@.@@@@@@@..@. 55 | .@@@@.@@...@@@@@@@@@..@@.@@..@@@...@@@@@.@@@@...@@@@.@@.@..@@..@@@@@@@.@.....@.@@..@@...@@..@.@@@@@.@.@.@.@@@.@@@@..@..@@@@@@@@@@@@.@.@..@. 56 | @.@@@.@.@@@@.@.@.@.@@@.@@..@@@@.@@@@@@...@.@.....@@.@@@@@...@@..@@@@@@@@@@@@@@..@..@.@@.@@@.@@..@.@.@@@@.@@@@..@@@..@@@..@.@@@@.@@.@.@@@.@@ 57 | .@.@@@@@@@@@@@@@.@@@.@..@@.@..@@@@.@@@@@@@..@...@@@@@...@@.@.@@@@..@.@@.@@@@.@..@@.@.@@@..@@@@@..@@@@@@@@@.@.@@@@@@@..@.@@.@..@@.@@@@@@@@@. 58 | ....@@@@@@@.@.@@@@@@@@...@@.@..@..@..@@@@.@@.@@@@@@@@@@...@.@.@...@@..@.@@.@@.@.@.@.@.@@@...@..@@@@.@@.@@@......@..@@@@@...@.@@@..@@@@.@@.@ 59 | @@@@.@@@@@@@.@.@@@@@...@..@..@@..@@@@.@@@@@@.@@@@@.@.@.@@.@@.@@@.@@@.@@@@@@@@..@@..@@@@@@@.@@@@..@.@@.@..@@@@@@..@@..@...@@@@@@.@@@@.@@@.@@ 60 | .@@@@.@@@@.@@@@.@@@.@@@@...@..@.@@.@@..@@@@@.@@.@.@@.@@@@@@.@.@.@@.@@..@.@@.@@@@.@....@@@@@@@@@@@@..@@..@@.@@..@@.@@.@@@.@..@@@@.@@@.@..@@. 61 | @@...@@@@@@...@@@@.@@@..@....@...@..@@@@..@@@.@.@..@..@.@@@...@@@@@@@@@@.@@@.@@@@..@.@@...@..@@.@...@@..@@@@..@.@@@..@@.@@.@@@@@@@@@..@@@.@ 62 | @.@@@..@@@@@@@@@@.@.@@.@.@@.@...@@.@.@@.@@@@@.@@@@@@.@..@.@@@@.@@@@.@@.@.@..@@@@.@@@..@@..@@@@@@@@.@@.@@.@@.@.@@.@..@@@@@@@@.@@.@@.@.@..@.. 63 | @.@@@@@.@.@....@@@@..@.@@..@..@@@@@@@@@@@@@@.@@..@@@@@@@@..@@@.@@@@@@@@@@.@..@.@@.@@@@@@@..@@@.@@@@@@@@.@.@@.@@@@@@@@.@@@.@@@@.@@.@..@@@@@@ 64 | @@@...@@@@.@@@@@@@@@@.@@.@.@@@@@@@@.@...@@@.@.@@.@@...@@@@@.@@@.@.@.@.@@@@@@..@@@@@@@..@@.@@@@@.@..@@.@.@..@@@.@...@@.@@..@@..@@....@...@.@ 65 | @.@@.@@@@..@@@@.@@@@@.@@...@@@@@@@@.@..@@..@@@@@@.@@...@.@.@..@@@@...@.@@@@......@@@.@@@@@.@.@.@@.@@@@..@@.@....@@..@@.@.@@..@.@.@@.@@@@.@@ 66 | .@@@@.@.@@.@.@@@@.@@...@@@@@@.@.@@@@@.@@.@..@..@...@@..@@@@@.@@@@.@@@@@..@@.@@.@@@@@..@@.@@@@@@@..@@@....@@.@..@@.@@..@@@@@.@@.@@.@@.@.@... 67 | @@...@@.@@@.@.@@..@@@...@@.@..@@@.@@@@@.@@@.@@@.@@..@@@@@..@.@@@@@@.@@..@.@.@@@.@@.@@@.....@@..@.@@@@@...@.@@.@@@.@.@.@@@..@@.@@.@..@.@@.@@ 68 | @..@..@@.@.@@.@.@@.@..@@.@..@@@@@@..@.@@...@...@..@.@@.@@@@.@@..@.@@@@@@@@.@@@.@.@@..@@@@.@@@.@@@@.@@@@@.@@@.@@@@@.@@@..@.@.@@@@..@@@@.@@.@ 69 | @@@..@@.@.@@.@@..@@@@@.@.@.@@@@@@..@@@@@@.@@.@@@@.@..@@.@@@.@@@@@...@@@@@...@@@.@@..@@@@@@@...@@@@@@@@@@@..@.@.@@@@@....@@@@@@..@.@.@..@.@@ 70 | @..@...@@@....@.@..@..@..@..@@.@@@@@@@@@@@.@.@@@..@@.@@..@.@.@..@@.@.@@@@@@.@@@.@@..@@.@@@@.@@@.@@@.@@.@@@.@.@@@@@@..@@.@..@@.@@@@@.@@@.@@. 71 | @@@@@@@@@@.@@@@@..@@.@.@@@@@.@.@@@.@@@.@@..@@@@.@@@@..@@@@@@...@@@@@.@@@.@@..@..@@@@.@.@@@@@@@..@@@.@@@@@@@..@.@@.@@@.@@.@.@.....@.@@.@.@@. 72 | @@@@@@@@@.@@@@@@@.@@@..@@..@@@....@@...@@..@...@@.@@@@.@@@@@@@@@@..@..@..@.@@@@.@@.@@.@@@@@@@@.@....@@..@@@@.@...@@@...@@@@@@@@@@@@@.@@.@@@ 73 | ..@@@@.@.@@@@@@@@.@@.@@@@@.@.@@@.@.@@@.@@@@@@@@@@.@...@@@.....@.@@@.@@@.@@@@@.@@@@...@@@@@@.@@...@@@...@@@@.@.@.@@@@@@@@@.@@....@@@@.@@@@@@ 74 | @.@@@@@.@@@@..@.@.@@..@@@@@.@@@@@@.@@...@.........@.@@@......@@..@@@@...@@.@.@..@.@.@.@@@@@.@@...@.@@@.@@@@..@.@@@@@.@.@@.@@@.@@@@@.@@..@@@ 75 | .@@..@@.@.@..@@@@@.@@.....@@.@@@@@.@.@.@@.@@.@..@..@@@@@.@..@@..@@.@.@@@@@@@@@@@@@@..@@.@.@@@@@.@@..@@.@.@@.@@@@@.@@@@.@@@.@@.@@.@@@.@@@@@@ 76 | @.@@@@..@.@.@@...@@@.@@.@@.@@@@@@@@@.@@@@.@@@@@..@@@@@.@.....@@@@@@...@..@@...@@@@@@.@@..@.@.@.@..@@@.@@@.@..@@@.@.@.@@@@.@@....@@@@@.@@@@@ 77 | @@.@..@@@@@@@@@@.@.@@@@@@@@.@.@..@@@....@.@@@..@@.@@..@@@@@.@@@.@@@@@..@@.@@@@.@@@.@@.@@@.@...@@@@@@@@@.@.@@.@@@@.@....@@.@.@.@@@@@@@@.@.@@ 78 | @.@.@@@@@@@.@..@@@@.@@@@@@@@.@@@@@@@...@@@@......@@@@@@@@@@@@@..@@@@@@@..@..@@@@@@@@.@.@.@@.@.@.@.@@@@@...@@@@@@.@.@@.@...@@@@@@@@@@@.@.@.. 79 | ..@@@@.@@@@@@@..@.@@@@@@..@.@...@@@.@@@@..@@..@@@@@@@.@@.@.@@@@@.@..@@@@.@@@@@..@@@@@@@@.@@...@@@...@.....@@@..@.@@..@..@@.@.@@@@@@@..@@@@. 80 | @@..@...@..@..@..@@@....@@.@..@@@@@@.@@@@.@.@@@@....@@.@@@.@@@.@.@@@@@.@@@.@...@@@..@@@.@@..@@@@@@@.@@@@@@@@..@@@@.@@@.@.@@@.@@..@@..@@.@@. 81 | @@@@.@@@@..@@@.@.@@@@.@.@.@.@@.@.@...@...@.@@..@@..@@@..@@@@@.@@.@@.@@..@@@@@..@.@@.@@..@@@.@@@...@@.@..@@.@@...@@.@@@.@@@@.@@.@..@.@..@.@. 82 | ....@@@..@.@..@@@.@@.@..@@@...@.@..@..@@....@@@@@@.@@.@@@@@@@.@@.@@@@..@.@@.@.@.@.@@.@.@@@@.@@.@.@@@...@.@.@.@@@@.@..@@..@@@..@@@@@.@..@@.. 83 | @@.@@@@..@@@@@@@@@@..@.@@..@@@@@.@@.@.@.@@@@...@@@@@.@.@..@@.@@@.@..@.@.@@@@.@..@@@@.@@.@..@.@.@@.@@@@@@@@@@@@.@@@.@........@@@@...@@@..@@. 84 | .@@...@@.@.@@.@@@.@.@@@@.@@@@@...@@@@@..@.@.@@@...@....@..@@..@@...@@.@.@@.@@.@.@@@.@.@..@@.@.@...@@.@...@@.@.@..@..@@@@.@@@.@@.@.@@.@@@.@@ 85 | @@.@@@..@.@@.@..@@@@@.@@.@@..@@..@@@.@.@@...@.@@.@@.@@@@@@@.@@@.@.@.@@@..@...@.@.@..@@..@.@..@@@@@@@@.@.@@@@..@@@..@.@.@@@.@@@@..@.@@@@@@.@ 86 | ..@..@@.@.@@.@@@@@@@@.@@@.@.@@..@....@@@@@@@.@@...@.@.@@@@@@.@@.@@@@.@@.@@.@@..@@@...@@.@.@@@.@@@@.@.@.@@@@@@@@@@@@.@....@.@.@@@@@@@.@@..@@ 87 | @..@@.@.@.@.@@@@.@@...@..@..@.@.@@.@.@@.@@@@@.@@.@@@.@@@.@....@@@@@@.@.@.@@.@@@@@.@@@.@@@..@@@.@@..@@@@@...@.@@.@.@@.@@...@@.@@@...@@@@@@.. 88 | @..@@@.@@.@.@@.@@@@@@@@.@@@@@@.@.@@@.@...@@@.@.@@.@..@@@.@.@.@@@@@..@@.@@.@@@@.@....@.@@@@.@..@@@@@@..@@@...@@@.@.@.@@@@..@..@..@@.@@.@@..@ 89 | .@@@@@@@.@.@@@@..@.@.@@@...@@@.@@@@@@@@@@@@.@....@@.@@@@@@@.@@@.@@..@@@@@@@.@.@.@@.@@.@@@.@@@...@@@@.@@@@@@@@@@.@@.@@@@@@..@.@.@......@@@@@ 90 | ..@..@@.@@@.@@@.@@@@@@@@@@@@@@@.@@..@.@@.@.@@@.@@..@.@@@@@@.@@@@.@@@@@.@@...@@@@..@@@@.@.@@@@@@.@@..@.@.@@.@.@.@@@@..@@.@@@@@.@@@@@@@@@@@@@ 91 | @@@.@@@@@@@@.@@@.@...@@.@.@..@.@@@@@@@...@@.@.@...@.....@@@@.@@@...@...@.@.@@@@@@@@@@...@@@..@.@.@@@@....@@@.@@@@@@@@@@.@.@.@.@@.@@@@@@..@. 92 | ..@@@@@..@@@.@@@....@@@@@@@@@@@@@@@@@..@@@.@@@@@@@..@@@@@..@@@..@@@@.@@@@@.@.@...@.@.@.@@@..@@.@@@.@@@@.@.@.@@.@@@.@@.@@@..@.@.@@.@@@@.@@@@ 93 | @.@@..@.@@@@.@.@..@@@@@@@@@..@@@.@@.@@.@.@@@@@@@@.@@@@@..@@@@@@@....@.@.@@@@.@@@@@@@@.@@@@@.@.@@..@.@@@@@.@@@@.@@.@@@@...@@.@.@@@@@@@.@@@.. 94 | @.@@@@@...@@@.@.@.@.@.@.@@@.@@..@@@@@@......@@...@@@@.@@@@...@..@@@.@...@..@@@@.@@@@@@@@@@@@.@.@@.@@@@@..@.@@...@@@@.@@@@@.@.@@..@@.......@ 95 | @.@@..@@@@@@.@.@@@.@..@@.@@..@@.@.@@@@@@.@..@@.@@@.@.@.@@.@@.............@@@@.@@@@.@..@..@@.@@@@.@@@.@.@...@@.@..@@@@@.@@.@@.@@@@..@..@@..@ 96 | @@@@@@@..@.@@@.@@@@...@@@@@@@@.@.@.@@@..@@@@.@.@@.@@@.@@.@.@@@@@@@..@.@....@.@@@@@@.@@.@..@@@@@.@...@@@.@.@@@..@..@..@.@@@@..@.@.@@@.@...@. 97 | @@@@.@@@.@@@@@@@@@.@..@.@@..@@..@@.@@.@@@@@@@@@.@..@@@.@@@@@@@.@@@@.@@@.@@@@@@.@@@@@.@@@.@@@@.@....@.@.@@.@@..@....@@@..@..@@..@@...@@.@@.@ 98 | @@@..@@@@@@@@@..@.@.@@.@@@@@@@@.@..@@@........@@@@.@@@@.@@@.@@@@@.@.@@@.@@@@@.@@@@@@@@..@@.@@@@...@.@@.@@@@@.@@...@@...@@@@.@@@@....@.@@@.. 99 | ....@@.@@@.@@@..@@....@@@@.@@@@@.@@.@@@@...@@..@@@@.@@@.@.@.@@.@@@.@@.@@@.@@@.@.@..@@.@@@@...@@@@@@@..@@@@@@@.@@..@@@...@..@.@.@@@@..@.@@.@ 100 | @.@@@@@.@@....@@@@@@@@.@.@..@@@@.@..@@@@..@@@...@@..@@@@....@@....@@@@@@@.@@.@@@.@@.@@@@@..@@@@@@@@@.@@.@@@@@@@@@@@..@@@..@.@.@@..@.@@@@... 101 | ......@@@.@..@@.@@@@@@.@@@.@@@.@@@@@@...@@@@@@@.@.@@@@@.@@.@@@@.@.@@@@@.@@@.@..@@....@..@@..@@@..@.@@@@@@@.@@@..@...@@@@@.@@@..@@...@....@. 102 | @...@@@@.@@@.@....@@..@@@@.@@.@@@@.@@@@@.@@.@@@@@@@@@@..@@@@..@@@@@@@@.@@@.@@@@@@@.@@...@@..@.@@@@.@@@@@@@@@@@.@.@@.@...@@.@@..@@@@@..@@@@@ 103 | ...@@.@@@@@@..@@@@.@@..@..@@@@@@@@@...@@@@..@.@@...@@@@@..@@.@@@@.@@@@@.@@.@@..@@@@.@@@.@@.@@@.@@.@.@@@.@.@.@.@@@@.@..@.@@.@@@@.@..@@@@.@.. 104 | @.@@.@@.@@@@@@@@.@@@.@@..@@@.@..@@..@...@@@@@@@@@@@@@@.@..@..@@@@@@@.@@.@@..@@@@@@@@.@@@@@@@.@@@@@@.@.@@.@.@.@@..@@@.@.@@@.@.@@@@@@....@.@. 105 | ..@@@@@@@@...@@......@@.@@@.@..@@@@@@@@@@@.@..@@.@@@@@.@.@@..@@..@.@@@.@@.@.@@..@.@..@.@.@@.@@@@.@.@..@.@@@..@..@@@.@@@@@..@@@.@@.@.@@@@@@@ 106 | @@@@@@@@@@@...@..@..@@@...@@..@@...@@@@.@@.@@@.@@@@.@@@@@@.@.@@..@@..@.@..@.@@@..@..@..@@...@.@@@..@@@.@...@..@.@...@@..@.@@@@....@@@@.@@.. 107 | @@@@..@@@@.@.@@@@@@@.@@.@...@@@...@@@...@.@....@.@@@@@@@.@@@.@@@@@@.@@...@.@@.@@@@@.@@..@@@@.@@@..@@@..@.@..@@@.@@@@...@@@@.@@.@@@@@@@@@.@. 108 | .@@@.@@..@.@@@@@.@@.@@@@@.@@@...@@.@@..@.@@@....@.@.@@@..@@.....@@..@@@@@@.@@@@.@.@....@@@@@@....@.@@.@.@@@@@@..@@@@@@@@@@@@.@@@.@......... 109 | .@@@..@@@.@@@@@@@@@@....@@@.@@@.@.@...@.@@@@.@.@@@..@@..@@....@@@.@@@....@@.@@.@@....@@.@@.@@.@.@@...@@@@@@@@@@@@@@@@@...@.@..@.@@@.@@@.@.@ 110 | @@@@.@@@.@..@@@...@@@@@@..@.@@@..@.@@@.@..@.@@.@@@.@@@@@@@@@..@.@@@@..@@..@.@.@@.@@@@@.@@@@...@@@@@.@@@..@@@@@@@@@..@@.@@@@@.@.@@@@@@@@@@@@ 111 | @@@.@@.@..@@@.@@@@@.@@@......@@@@@@.@.@.@@@@@@.@@@@.@@.@@..@....@@@@@..@@@@@@@@@.@...@@@@@@..@.@.@@@@..@@@@..@@@@@@..@.@.@@.@@@@.@@.@.@@@@@ 112 | .@@@@@@@@.@@.@@@@.@@@@....@@.@.@@.@@@@@@.@@..@@@.@@@@.@@.@.@@@@.@@@@@@...@@@.@@...@.@.@@...@@@@.@.@.@.@@@@..@@.@..@@..@@.@@...@@.@@.@.@.@@@ 113 | ...@..@@@@..@....@@@..@@..@@.@.@.@@..@@@.@.@@.@@@.@.@.@@...@@@@@@@@.@@...@@@@.@@@@@.@..@@@..@.@@.@..@@.@@..@@@.@..@@....@@@@@.@.@..@..@.@@. 114 | @.@..@.@@@.@@@@@@..@@@.@.@....@@@..@..@.@@@.@@@..@@@@@@@@.@.@.@@@@@@@@@@@@...@.@@@..@@@@@@.@...@@@.@.@@.@@.@@@@@@@.@@@@@....@@@@@.@.@@@@@@@ 115 | @@@@@@..@@....@@@@@...@@.@.@.@@@@.@.@...@@@@@@..@@@.@@@@@@.@@@..@.@@.@@@.@@....@@..@@@@@@@@@.@@@..@.@.@@..@@@@@.@@@.@@..@.@.@..@.@@.@@@.@@@ 116 | .@.@.@@@@@@....@@.@@@@.@.@.@..@.@.@.@@@@.@.@@@@@@@.@..@.@.@...@@@.@@@@@.@.@@..@@@.@@@.@@@@..@@@@.@@@@@...@.@...@@@..@@@@@@.....@@@@@@@.@..@ 117 | ..@@@@@@.@..@@@.@@...@@@@@@..@.@.......@@@..@.@@@.@@.@@.@@..@@.@.@.@@@@.@.@@@.@.@@@@..@.@.@..@@.@@.@...@@@@@.@.@@@@.@@@.@@.@.@@.@@@@....@@@ 118 | .@.@.@@@.@.@...@@.@.@@@@.@@@@@@@@@.@@@...@@@.@@@.@@.@.@@@@@.@.@@@..@.@..@@@@@.@@@....@@@.@@@@@@@.@@@@..@.@.@.@..@.@@.@.@..@.@@@@@@.@..@.@@@ 119 | .@@@@@@@@..@@@.@@.@..@@.@@@@@.@..@@.@@@@.@@.@..@@...@@.@@@.@@@.@..@..@.@@@@@@..@.@@@..@@...@@..@@@@@@@@@.@@@.@@..@.@.@...@@@@@@@@@.@@@@.@.. 120 | ..@..@@@@@.@....@@.@..@@@.@.@@.@@@@.@@..@@@@@.@@@@@@@@@@..@@@@.@.@@@.@.@@@@@@.@@.@@@@@.@.@....@.@@@....@@.@@@.@@@@@@@@@@@@.@@@..@@..@..@@.. 121 | @.@@.@@.@@@.@.@@@@.@.@@..@@@..@@.@@..@@@.@@@..@...@@.@@@.@@@.@@@.@@@@@@@..@@@@@.@@@..@.@@@@...@@.@.@@.@..@@@@@@@@.@..@..@@@@@@@@@..@.@@@@@@ 122 | ..@@@@@@@@@@@@@.@@..@@@@@@@@@@@@..@@..@@.@@.@.@....@@.@.@@@@@.....@.@@@.@@@@.@@@@.@.@.@@@.@@@@@.@@@@@.@.@@@@...@@@@.@.@@@@..@@@.@.@@@@@@@@@ 123 | @.@.@..@@@.@.@@@.@.@.@@.@@@@@.@@@@...@@@@@@.@.@@.@@@.@.@@.@...@@...@@@@..@@.@.@@.@@@.@@@@...@..@@@..@.@@@..@@@.@.@.@@@@@@@@@@@@@@@@....@@@@ 124 | @@@@@.@.@@@.@@.@@@@.@@..@@@@@@@@@@@.@.@@....@@@.@@@.@.@.@@.@@..@.@@@@@@...@@..@@..@.@@@.@..@.@@@@@@.@.@@@@@@@@@@@@@@@@..@.@@@@@...@..@...@@ 125 | @@@@..@@..@@@@@@.@@@@@@.@@@@@@@.@@.@@.@..@.@.@@@@.@...@@.@@.@@@@.@@@@.@@.@..@@.@@.@..@.@@@.@.@@@@..@..@@..@.@@.@@@@@@@@..@@.@.@@...@@@@@@.. 126 | @@@@@@...@.@@.@.@.@@.@..@@.@.@@@....@@@..@@@@@@@@@@.@..@.@@@..@.@@@@@.@@@@.@@.@.@@@@..@@@.@..@@...@@@@.....@..@@@..@@@@@.@.@@.@@...@@.@..@@ 127 | .@..@@.@@@..@@@.@...@.@@.@@@@@@@@.@.@.@@..@.@@@@@@@@@.@@.@@@@.@@@@@@.@@@.@@@@@@.@@@@@.@.@@.@@@@@@.@@@..@.@.@.@.@@@.@@@..@@@.@....@@@@@@.@@. 128 | .@@@......@.@@.@@@..@@.@@@@.@.@@@.@@.@..@@.@@@@.@@.@@@@@@...@@@.@@..@...@@@@@@@@@.@@@..@@..@@@@.@..@@@@@@@.@@@@@.@@@@.@......@...@...@@@... 129 | @.@@@@@.@@@@@@@@@@@@.@@@@@...@@@.@@.@@.@@.@@..@.@@...@@@@@@@.@@...@.@@...@@@.@.@@@.@..@@.@@@..@@.@@@.@@@@@@.@..@@.@.@.@@.@@@@@@@@@.@..@@@@@ 130 | @.@@@@@..@@.@@...@@@@@.@@.@@..@@..@.@@.@.....@@..@..@..@@@..@.@@...@.@@@@@@@@.@@.@@@..@@@.@@.@@@@.@@@@@@@@.@@@@@@@@@.@@..@@.@@@@@@@@@..@@.. 131 | ..@@@@.@..@@@@..@@@.@@@@@.@..@.@.......@@@@@.@@@..@@@@@.@@@@..@@@..@.@@@.@@@@.@@.@@.@@@.@@@@@@@@.@@@@@.@@@..@@@@.@.@..@@..@.@@@.@.@.@....@. 132 | .@@@.@@.@@@@..@@@.@@@.@.@@@.@@.@@.@...@.@@@@@.@.@.@@@@@@@.@@@..@..@........@@@@@@.@@@@@@@@@@@@..@.@@@@@@@.@@.@@..@@@.@@@@..@.@.@..@@..@@.@@ 133 | @@@@@@.@@.@.@@.@@@@@.@@@.@..@@@@@@@..@..@@@@@@@@@@.@@@.@@@@@...@@@.@@@.@@@@@..@@.@@..@.@@..@.@@@@@@@...@.@.@@@@@.@@@@.@@@.@.@@@@@.@.@@.@.@@ 134 | @@.@@@@@..@...@@@@.@..@@@@@@.@@@@.@@@@..@..@.@....@..@.@@..@.@.@@.@@.@@@@@@@@.@@..@@@@@@@..@.@@..@@.@.@.@@@@.@@.@..@...@@@..@@@@@...@@@.@.@ 135 | ...@@.@@..@@@@@@@@..@.@@...@@@.@@.@.@.@@@@@@@.@@@@@@@@.@@..@@@.@....@..@@@....@..@@.@@@.@@@@.@@.@@@@@.@@@@@@@@@@@.@@@@...@@@@@...@@@@@.@@.@ 136 | ...@@.@@@@@@...@.@@@@@@...@@@.@@.@@@@@@@@.@@...@@@@.@@@....@@@@@@.@@@..@..@.@..@.@@@@@@......@@@.@.@..@..@@.@@@@@.@@@.@@@.@.@@.@@@@@.@@@@@@ 137 | @@@@..@@@..@@@.@@@@@.@..@..@@@@.@.@@.@@@@@@@@..@@@@@@@@..@.@.@@@@.@@.@@@.@..@@@@.@...@@@......@@@@@...@.@@.@@@..@@.@@..@@.@@@@..@@@@@@@@.@@ 138 | @@..@...@@@.@..@@@@@.@@.@@.@..@..@@.@@@@@@..@@@@.@@@.@.@@.@@@@@@@@..@@@@.@@@@@@@@@@.@@...@....@.@.@@..@@@......@@@@@@@@@@.@.@@@@@@@.@...@@@ 139 | @..@@.@.@@..@@@@..@@..@.@@..@@@@@@@@@.@@@...@.@@@@.@@@@@@@@@.@...@@...@.@@@.@.@@@.@@...@@@@.@@@.@.@..@.....@@.@@.@@.@@...@@@@@@@@@.@..@.@@@ 140 | -------------------------------------------------------------------------------- /data/day7.input: -------------------------------------------------------------------------------- 1 | ......................................................................S...................................................................... 2 | ............................................................................................................................................. 3 | ......................................................................^...................................................................... 4 | ............................................................................................................................................. 5 | .....................................................................^.^..................................................................... 6 | ............................................................................................................................................. 7 | ....................................................................^.^.^.................................................................... 8 | ............................................................................................................................................. 9 | ...................................................................^.^.^.^................................................................... 10 | ............................................................................................................................................. 11 | ..................................................................^...^...^.................................................................. 12 | ............................................................................................................................................. 13 | .................................................................^.^.....^.^................................................................. 14 | ............................................................................................................................................. 15 | ................................................................^.^.^.^.^.^.^................................................................ 16 | ............................................................................................................................................. 17 | ...............................................................^.^.^.^.^.^.^.^............................................................... 18 | ............................................................................................................................................. 19 | ..............................................................^.^...^.^.^...^.^.............................................................. 20 | ............................................................................................................................................. 21 | .............................................................^...^...^...^.^...^............................................................. 22 | ............................................................................................................................................. 23 | ............................................................^...^.^.^.^.^.^...^.^............................................................ 24 | ............................................................................................................................................. 25 | ...........................................................^.^.^.^.^.^.^.....^.^.^........................................................... 26 | ............................................................................................................................................. 27 | ..........................................................^.^.^.^.^...^.^.^.^.^...^.......................................................... 28 | ............................................................................................................................................. 29 | .........................................................^.^.^...^.......^.^.^.^.^.^......................................................... 30 | ............................................................................................................................................. 31 | ........................................................^.....^.^.^.^.....^.^.^.^.^.^........................................................ 32 | ............................................................................................................................................. 33 | .......................................................^.^.^.^.^.....^.^.^.^...^...^.^....................................................... 34 | ............................................................................................................................................. 35 | ......................................................^...^...^.^.^.....^.^.^...^.^...^...................................................... 36 | ............................................................................................................................................. 37 | .....................................................^.^.......^.^.^.^.^.^.^.^.^...^.^.^..................................................... 38 | ............................................................................................................................................. 39 | ....................................................^.^.^.^.^.^.^.^.^.^...^...^.^.....^.^.................................................... 40 | ............................................................................................................................................. 41 | ...................................................^.^.^.^.^.^.^.^.^.^...^.^...^.^.^.^.^.^................................................... 42 | ............................................................................................................................................. 43 | ..................................................^.^.^.....^.^.^.^.^.^...^.^.^.^.^.^.^...^.................................................. 44 | ............................................................................................................................................. 45 | .................................................^...^.......^.^.^.....^...^.^...^...^.....^................................................. 46 | ............................................................................................................................................. 47 | ................................................^.^.^...^...^.....^.^...^.^.^.^.......^.^.^.^................................................ 48 | ............................................................................................................................................. 49 | ...............................................^.^.^.^.^.^.^...^.^.....^.^.^.^.^.^.^...^.^.^.^............................................... 50 | ............................................................................................................................................. 51 | ..............................................^.^.^.^.^.^.^.^.^.^.^.^.^.^.^...^.^...^.....^.^.^.............................................. 52 | ............................................................................................................................................. 53 | .............................................^...^.^.^...^.....^.^.^.^...^.^.^...^.^.^.^.^.^...^............................................. 54 | ............................................................................................................................................. 55 | ............................................^...^.^.^.^.^.^...^...^.^.^.^.^...^...^.^...^...^.^.^............................................ 56 | ............................................................................................................................................. 57 | ...........................................^.^.^...^.^...^.^.^.^.......^.^.^...^.^.^.^.^...^.^...^........................................... 58 | ............................................................................................................................................. 59 | ..........................................^.^.^...^.^.^.^...^.^.^.^.^...^.^.^.^...^...^.^.^...^...^.......................................... 60 | ............................................................................................................................................. 61 | .........................................^.^.^.^...^.....^.^...^.^...^.^.^.^.^.^.^.^...^...^.^.....^......................................... 62 | ............................................................................................................................................. 63 | ........................................^.....^...^.......^.^.^.^.^.^...^.^.^.....^...^.^.....^.^.^.^........................................ 64 | ............................................................................................................................................. 65 | .......................................^.^.^...^.^.^.^...^.^.^...^.^...^.^.^...^.^.^.^.^.^.^.....^.^.^....................................... 66 | ............................................................................................................................................. 67 | ......................................^.^.^.....^.^.^.^.^.^.^.^.^.^.^.......^.^.^...^.....^.^...^.^...^...................................... 68 | ............................................................................................................................................. 69 | .....................................^.^...^...^.^.^...^.^.^.^.^...^.^.^.^.^.^...^.^...^...^...^.^.^.^.^..................................... 70 | ............................................................................................................................................. 71 | ....................................^.^.^.....^.^.^.^.^...^.^.^.^...^.^.^.^...^...^.^.^.^...^.^.^.^.^.^.^.................................... 72 | ............................................................................................................................................. 73 | ...................................^.^.^.^.^.^.....^.^.^.^...^...^.^.....^.^.^.^.^...^...^.^.^.^.....^.^.^................................... 74 | ............................................................................................................................................. 75 | ..................................^.^...^.^.^.^.....^.^...^.^...^.^.^.........^.^.^...^.......^.^.^.......^.................................. 76 | ............................................................................................................................................. 77 | .................................^.^.^.^.^.....^.^.^.....^.......^...^.^.^.^.^...^.^...^.....^.^...^.^.^...^................................. 78 | ............................................................................................................................................. 79 | ................................^.^...^.^.....^.^.....^...^...^.^.^.^.^.^.^.^.^.....^.^.^.....^.....^.^.^...^................................ 80 | ............................................................................................................................................. 81 | ...............................^...^.^.^.^.......^.^...^.^.....^.....^.^.^.^...^.....^.^.^.^.^.^.^...........^............................... 82 | ............................................................................................................................................. 83 | ..............................^.^.^.^.^.^.^.^.^.^.^.^.^...^.....^.^.^.^.^.^.^...^.^.^.^.^.^.^.^.^...^.....^...^.............................. 84 | ............................................................................................................................................. 85 | .............................^.^...^.^.^.^.^.^.^.^.^.^.^.^...^.....^.^...^...^...^...^...^.^...^...^.^...^.^...^............................. 86 | ............................................................................................................................................. 87 | ............................^.......^.^.....^...^.^...^...^.^...^.^.^.^...^.^...^.^.^.^.^...^...^...^.^.^.....^.^............................ 88 | ............................................................................................................................................. 89 | ...........................^.^.^.^.^...^.^.^...^.^...^.^.^.^.^.^.^.^.^.......^.^.......^.^...^...^.^.^.^.^.^.^...^........................... 90 | ............................................................................................................................................. 91 | ..........................^...^.^.^.^.^.^...^.^.^.^.^.^.^.^.^.^...^.^.^.^.^...^.^.^.^.^...^.^.^...^.......^.^.^.^.^.......................... 92 | ............................................................................................................................................. 93 | .........................^.^...^.^.^.^.^.^.^.^.....^.^.^.^.^.^.^...^.^.^.^.^.^.^...^.^...^.^...^.^.^...^.^.^.^.^.^.^......................... 94 | ............................................................................................................................................. 95 | ........................^...^.^.^...^...^...^...^.^.^.^.....^.^.^.^.^.^...^...^.^.^.^...^.^...^.^.^.^.^.^.^.^.^.^.^.^........................ 96 | ............................................................................................................................................. 97 | .......................^.^.^...^.^.......^.^...^...^...^.^.^.^.^...^.^.^.^.^.....^.^.^.^.^.^.^.^.....^.^...^.....^.^.^....................... 98 | ............................................................................................................................................. 99 | ......................^...^.^.^.....^.^...^.^.^.^.^.^.^.^.^.^.^.^.^.......^.^.^...^...........^.....^.^.^.^.^...^.^...^...................... 100 | ............................................................................................................................................. 101 | .....................^.^.^.^.^...^.^...^.^...^...^.^.^.^.^.....^.^.^.^.^.^.^.^.^.^.^.^.......^.^.^.......^.^.^.^.^.^...^..................... 102 | ............................................................................................................................................. 103 | ....................^...^.....^.^.^.^.^.^.^.^...^.^.^.^.^...^...^.^.^.^...^.^.^.^.^.^.^.^.^.....^.^.^.^.^.^.^.^.^...^...^.................... 104 | ............................................................................................................................................. 105 | ...................^.....^...^.^.^.....^.....^.....^...^...^.^.^.^...^.^.^.^.^.^.^...^.....^.....^.....^.^.^.^...^.^.^...^................... 106 | ............................................................................................................................................. 107 | ..................^.^.^...^.^...^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^...^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.....^.^.......^.^...^.................. 108 | ............................................................................................................................................. 109 | .................^.....^.^.^...^.^...^.^.^.....^...^...^.^.^.^.....^.^.....^.^.^.^...^.^.^.^.^.^.^...^.....^.^.^...^.^.^...^................. 110 | ............................................................................................................................................. 111 | ................^...^.^.^.^.^.^.^.^.^...^.^...^.^.^.....^...^.^...^.^.^.^.^.^.^.^.......^.^.^.^.^.^.^.^.^...^.^.^.....^.^.^.^................ 112 | ............................................................................................................................................. 113 | ...............^.^.^.^.^.^.^...^.^.^.....^.^.....^.....^.^.^.....^.^.^.....^.^.^.^.^.^.....^...^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^............... 114 | ............................................................................................................................................. 115 | ..............^...^.^...^...^.^...^.^.^.^.......^.^.^.^.^.^.^.^.^.......^.^.^.^...^.^.^.^.^...^.^.^.....^.^.^...^.^.^.^.^...^.^.............. 116 | ............................................................................................................................................. 117 | .............^.^.^.^.^...^...^.^...^.....^.....^.^.^...^.^.^...^...^...^.^.^.^.^.^...^.........^.^.^.^.^.^...^.^.^.^.^.^.^.^.^.^............. 118 | ............................................................................................................................................. 119 | ............^...^.^.^.^.^...^.^.^.^...^.^.....^.^...^.^.^.^.^...^.^.^.^.^...^.....^...^.^...^...^.^.^.^.^...^.^...^.^...^.^...^.^............ 120 | ............................................................................................................................................. 121 | ...........^...^.^.^.^.^.^.^.....^.^.^.^.^.......^.^.^.^.......^...^.......^...^.^.^...^.^.^...^.^...^.^.^.^.^.^...^...^.........^........... 122 | ............................................................................................................................................. 123 | ..........^...^.^.^.^.....^.^.^.^.^.^...^.......^.^.^...^.^.^.^.....^...^.^...^.^.^.^.^...^.^.^.^.^.^.^.^.^.^.^...^.^.^.^.^...^...^.......... 124 | ............................................................................................................................................. 125 | .........^.^.^.^.^...^...^.....^.^.^.^.^.^.^...^.^...^...^.^...^.^.^.^.^...^.^.^.^.^.^.^.^...^.^.^.^.^...^.......^.....^.^...^.^.^.^......... 126 | ............................................................................................................................................. 127 | ........^.^.^...^.^.....^...^.....^.^.^.^.^.^.^...^.^.^.^.^...^...^...^.^...^...^.....^.^.^.^.^...^...^.^.^...^...^.....^.......^...^........ 128 | ............................................................................................................................................. 129 | .......^.^.^.^.^.^.^.^.^...^.^.^...^.....^.^.^.....^.^.^.^.^.^.....^...^.^.^.^.^.^.^.^.^...^.^.^...^.^.^.^.^...^.^.^.^.^.^.......^.^.^....... 130 | ............................................................................................................................................. 131 | ......^.^.^...^...^...^.^...^...^.^.^.^.^...^.^.^.....^.^.^.^.^.^.^.^.^.^.........^.....^.^.^.^.^...^.^.^.^.^.^.^.^.^...^.^.^.^.^...^.^...... 132 | ............................................................................................................................................. 133 | .....^.^.^.^.^.^.^.^...^.^.....^...^.....^.^.^.^.^.^.^.^.^.^.^.^.^...^.^.^.^.....^...^.^.....^.^...^.^.^.^.^.^...^.^.^.^...^...^...^.^.^..... 134 | ............................................................................................................................................. 135 | ....^.^.^.^.^.....^.^.^.^.^.....^.^.^...^...^.^.^...^.^...^.^.^.^.^.......^.^...^.^.^.^.^.^.^...^.^.^.^.^.....^.^.^.^.^...^...^...^.^.^.^.... 136 | ............................................................................................................................................. 137 | ...^.^...^.^.^...^.^.^.^.^.^...^.^.......^...^.^.^.^.^...^.^.^.^.^...^...^.^.........^...^.^...^.^.^...^.^.^.....^...^...^...^.^.......^.^... 138 | ............................................................................................................................................. 139 | ..^.^.^.^.^.^.^.^...^.^.....^...^.^.^.^.^.^.^.^.^.^...^.^.^...^...^.^...^.^.^...^...^.^...^...^...^.^.^.^.............^.^.^.^.^...^.^.^.^.^.. 140 | ............................................................................................................................................. 141 | .^.^.^...^...^.....^...^...^.^.^.^...^.^.^.^.^.^.^.^.^...^.^.....^.....^.^.^.^...^.^.^.^...^...^...^.^.^.^.....^.^...^.^...^.^.^...^.....^.^. 142 | ............................................................................................................................................. 143 | -------------------------------------------------------------------------------- /data/day3.input: -------------------------------------------------------------------------------- 1 | 5966546654588755548354591946657465889859765969657756889447669666979883895847755487857956955568577855 2 | 4542746645767855433451537445453466457263428353646434434876784556524857444555654342425558296642647865 3 | 5422251221224555623173322266326732412226343722532361271223275221532113734725256725254212236227222221 4 | 2324224426223243523532255245222222132222322212312412227525212622115222222422233212314232235522221282 5 | 3425335254326242335625565223334643464624361863233224152423533244376533232372522332643344363223232343 6 | 3323233325233222363224231232322322233232322313334122322327222324232232121323535223223323423333234333 7 | 2322422254231122221232525212231322423522221222282422162223425222232222652214222222232454212324522222 8 | 4415447714455363455685537565354363676452954665753777666562457835446656284751447993777546734467675755 9 | 1321372222222122333322332123323422222322252223222122222332122222322232125211331223132323222331122332 10 | 2242236323222342222112272221213212334114222323242122132214324232233232222263223222222432432223322122 11 | 8666442549563855473429495687888487174444636934689888567563752469997857776888435384749968858433947468 12 | 2324313232246343222224342234422321245212242423323411424213432222224342232332324232413423243423233121 13 | 2683781715168555587665344823228541542218165425258188531728734552264673257425771487447756633636163149 14 | 1222223226221322222222223222212222322122125422222222324224424422232223225223281322213534227324222222 15 | 5453552445153545644522534554544354555623563556577572237374753435463833254947544334526638415427343432 16 | 3342222252323515234222627222212413112534241272422423223227282252222254242224333544215112522943221225 17 | 7695333726436944223333723215353562935131693232362577267258343264534326334936632133292734373323684433 18 | 3232532232532213351332221323343312123432222223162223263333325232221224213321122397232432943333323223 19 | 2112422344232232513332265243223234713344645443375227325332223332723334345263432322512425374152552325 20 | 2112223322222265325221122221122322344221322222212222623122162212222222622273252415212543236224282226 21 | 3522223324214143232445522222552232222425242341322325223221441354225135322232144422223312633322314451 22 | 3553546964645433646854444545654684586664444554557344656544674454866542455564244724584635864456553552 23 | 2712132121124212228421333223222232222222232124122134222312221222233132212432223222423223222142222242 24 | 5243944565445115245394423332345325453227656933441445744435386341486555446252345552545553153155414455 25 | 5772447636633536424366261954729934453835645363432553634652753366355883885321733333657475668366474567 26 | 2232222423224213542322311322117222322242124212222212222222224222221311222411142122222233222241221222 27 | 2172222222222212172122543112232222222221222222244522122321235322221222223222222222222222215222232332 28 | 3232253411243335242423333323332232433322544313233221242223512322333233223626228323312243113212231323 29 | 4354444244443444424444454477434344455432453523444454343422334434444643644422433443243433445424346344 30 | 5654443436244425651246555333445346246614244246522445624445547356466332343845372444136585636453343646 31 | 2261413264273432522132262224336131112623313612262232223531724262612623213426342123442222222261225132 32 | 4373423443864444237444325623423232442462514423354435433543444556446334342465349435334635744411243244 33 | 5422222243422233424421322322425222213133122221222322251421223223211124225122323421322631212321522223 34 | 5963425243163332355331441641433333326335525213433232232231326234615232642432634222826632333323924451 35 | 2324222222132312333321322225434334223323234141273322325342323213653322322335412222326323331363123524 36 | 5333224514863533453264233532582633373331444536362422774345533363335783331322425432393454336733374523 37 | 6664464844646545643544454444254444265353434444542454344566441844433442436253654434566284334643344434 38 | 1124522111242222322227222224224221222327222122221212125252251222222252223323221232224522122222321222 39 | 3333442334343434244343225353423354573442454223433432513444343433243231444354135144434435452344224333 40 | 2262236237137225321226221221236253135467323313327813423513926312252334262272412611566632233361342242 41 | 5392592455444746485543643423688666547355365445734465633539744375937844375476945332576556454437338526 42 | 5332322363334313543655443375335343337333334325233352317335354433136535354333533334332542343322331334 43 | 2628652623641252526739354945246675138456355651565467436384464627556352765562222374242655131322464255 44 | 4252232443221482452342244241632224852342234454453297576353341322331334334324427462226124222634324484 45 | 2343524324251432343246435412256145211311154332123623231522124342233124542142122212433532122132314313 46 | 3121112232232226342222252124122252313222212223221212212112333422222222321222222222214122222324222121 47 | 4545155455423544422347654224443555454345452455344535453555555454463645445339625143555465443335555441 48 | 5232112323357534334442634546523833463236681345253623329255242273527442366224324461232145276286752531 49 | 2222242544156542442622344421254632325542352232224232645322232332516644243263334234224265151224422625 50 | 3232111512134223231412251249322622243314221121242521732332241112222322122253222213225222212223133223 51 | 2137456446344823253847425324457735964736765465454553665529426837274845146672425239823723678622542976 52 | 3232431332441314142343443324323133323333443343343343433343324433333354331423453433543659333221333543 53 | 3792349222426221232328521274527712222212236287629895275222522285952122145272182426478113226763322359 54 | 7232242443222323253213237222232437322224232242342222243173422251162244332422472222162238221422741244 55 | 3866476683744737663346554542536441642942416535726656534356736771635556445574363637258365544336427341 56 | 6989475847166863753683472846257524673255552682346416464575366742647387437723554233365788818885437874 57 | 2321312261931222324262621424212222257228613642222221822242471224242627237377383462243392325323532494 58 | 5526448865492548412356563325695884355822787558444326673637562977684644265493677563655114625574666445 59 | 5161451222522622612543222524225232224124243232224273553261338242221526212222523422253426472261572522 60 | 2234435355325343525422555553333545233523355252232535452333233332545354435452244553547542455323522343 61 | 3323333333433422433342333423532333383333333333332333433324742333234312334333233333332143332333134323 62 | 6274624676266423372423166657524747572423742244422172765691253246455536287625642573414593394834966487 63 | 2492462814355722424462725721442241222555686632111535122622554256225338242262642443624528243355562557 64 | 2222222322222212212224321132322224223222212122212228212217222124222152332222222122222223311233221223 65 | 3323222322223232324213223224224212233422222232222422222223324223623231332222333433325223323222312331 66 | 6843444733422331541526232332253335334454344296626313322444235544444523231322534513484224344543484475 67 | 3322212221222221222222212122522211122223322212248222122272222222352432112212221214423113223222232422 68 | 2954465557768644246662646996625779626629677338557847267476472846655567884645856765775586665366284525 69 | 4144434432182345324664773444643333434322737444536337329324733674332444634343443423531335322454345815 70 | 6337323722422446423612813562356353443433335371325263243235432566633124336463565756725343331423346356 71 | 1321467267713441124514622232756371645651116755716557177213236767653267434122662432455424215765442689 72 | 1352422333742333426333422332143314232133234341322343344334254332332342641423633444522255353235273232 73 | 5666486465666676663165636645468553453634666665636576548584666696678656766576678645665786669576567765 74 | 2233233223333342323221423332323332323533363213224334327233323212423121524433523322323332223432227355 75 | 2332125232123221222222322235232522222324222222222621122532222232341315224223224222223224321321645312 76 | 3433441344344444354461454433313325643331523224462434323465433523434234354333544342233444423344534634 77 | 3243223424221322133322434313123353432232134322334224232212233332223432223221334142224124223124342352 78 | 3321233333533313333343384446574333243333232313443354442362343333333423322453443144333345443232233421 79 | 5143343533454435554332443333343424355444253453433228343324245435433543333333513434535355233233543355 80 | 5493355975555767457451576475466757564945655386654644844364595655467684446534246847763251655467536853 81 | 1422232252222244223314342442214222222212432252222222232142212232211211223312222364443282282422334221 82 | 2422222142221232333321222231222422212422222222223222222322222121172222222122212211231222222222222213 83 | 4232332233445435543544132223432323134222223341333133443534421423232422323332332424452132322324343334 84 | 5333333232555553422337547533354245234652554554545433542552354453343555554315333343544743353447462554 85 | 8223564221936743763777324425733373415526479287562386241766624787522626327237265478331332285223424926 86 | 4641336733527335563784257333348885332443483535372331648749334829374337737534666733378445369363327372 87 | 2537623646443355552263644746464533355345433343357535564354351565545523168233536655546436642352434645 88 | 2152134125311143243351453321232142342155135343143523135515252121341442514331135454354321433512526789 89 | 3223133234721443432311332332323252343332222223222233153232253313347332433333333423232222333223231151 90 | 6572776785737735753946665862896387826755845269998549992857936376966753465489955574499145885395549264 91 | 3141326224334322222322335353443263223322352235242463222246552324423655422152543223252235211334744288 92 | 3452233433334233364225523335333335373442233553332656432633136366326453533353333343322745334533354633 93 | 4453358679558455454455655559433243495345474175545835555345754152535555854455455855355336525874354525 94 | 2112842221322212341241272227521929124282284244723222422218426224222623222222112169257225162226132221 95 | 6354323563231433446256927333437365936353452553234357451134663245626563744445354132664332645425713545 96 | 6442322366534344344123323733265342632232323313935373343333424334233341335335412843344433233244422635 97 | 3225212222124222222422222323121242222142222222222141122322224222244222222132222212223122221132242242 98 | 3568364547563266273735644938534578738465559383615775337332835678843357435868448872838933847745336847 99 | 4565754312212444453434544642553633622423452554362372424752734435485236336275344554436555524244136553 100 | 6436114624354253213444646233634112136433156435465442232252352226442553541464113336226514346645525789 101 | 1423311231234334321123424413141224312412313434222242221322433114341324432221211441424443323334456789 102 | 8552543584793363447722232252568544516923637822434363233257335437727438383533435336322465745452365423 103 | 3363432162212712133312222223241235211324122222143123222222623222222212713521322242233123234351222731 104 | 3323443314443353143332413122124243322242323332233333443346243522242323424233134133343225532344433462 105 | 5354454225434314351546442422332222443456242462336354846647332542333222232421344525245464426323223434 106 | 2152322321342232222421332222224121221212232223222332323522122231234241422112311122412121112242211322 107 | 2227145451222236213322564255646212212222224421222223421124123231621222267241322225221122912222262111 108 | 3546344553226433252323357324365336323524624546454333336735923445345366433787754247453744353353342466 109 | 4266155222212222131222512122232326222252621428124221122222222261222262454111122452231215221233232222 110 | 8462466626545326243532255335417443361226666625556926634465451545654312563666643444245586556644463534 111 | 5235123522251251652235324212242113221157622332255332222512221242221152224251262213225242422126223115 112 | 2542433334352333335225232234333433352123422324243334333552333233335235324452533452133232235722334333 113 | 2433343532225534434332235134334323333531334413242341124332334333442333133432333443653223333343333423 114 | 2222132122233242422242233224232221132422362222221224223241332233554222341122112313135225222122123222 115 | 2313434442451151114122212333221262442222442144223242232243342242432222233434223222423433441232252544 116 | 2324243623121264363332236122243226332331672232522733513222321335342553233235433332153233212624623323 117 | 5635333443333733324334334133322442432413253334354213133334333433343233285345933236327212734353221355 118 | 2222225422242428332142142234222241362412332523331415224112264523322222212452222422424631322314441143 119 | 4475657476878685867484639857645948655788668536475657788484657753555949667865645465763786488978775655 120 | 9848447474667345747435326259288747656536755884544764343644543338453359234332463632566275454636438687 121 | 6432363437755273265623524444533257237334336234321623235433252366433633255655225756312564253446457442 122 | 5546856627678773727172469177764592642687586647529895336678557676388743572936655854414676423547775383 123 | 7162633493716443455872541433245413484313733452444734444443735433449334449544355743436223666644343321 124 | 2572563533546546653354454645455555474464655365344755454455837555674442464654441346646546564663523445 125 | 1224322522324224633241324433731212125512121249343714322251226522232461225334521312243332243623222352 126 | 1352322131221222222232723221222122222232122222223233222222321311234122222122222224222112222223122221 127 | 3252231432252243451335351534337232434323534236222243234234334323432243435242334347434385222134223375 128 | 7443335445434424253427657435264354445443444244432347543425337444525314336543354843158465439435434316 129 | 3222982682222612772861233572624864321221122224223321224722213122286123222313323327132224238422431222 130 | 3583331732927282422534313323233223335233653324539244123233272535833341233333569473249435233422612333 131 | 3222322333222112233233221223222122331223121232131233323333323222221332322222222221213221222212214212 132 | 6353363846364648646668363433543348755462736564266654664453642653554245665434426463444435537354765558 133 | 3423333221233336431243133223632523221433632333342223243323223324343333432132323344332426313344332342 134 | 3223322333221132513222232222362312227222735233422222322233233223222223223223232226225233323223223122 135 | 6553646555554651555648765744544555364165855566558717565344555444356452556585231755555456564479565439 136 | 4243222422224233113222422222112424162122224121242342222322322123212311442223212214322221222322241324 137 | 4233211543232214522345423233436232542235243214452245225123332423232243456321244122322222312122323322 138 | 3345533464734436856864333868255322554635832443937355244434533849338945443344624545452467334964497233 139 | 3173224222412521239312233219224352422712312214135124322721322122127132219242229418225222714223142229 140 | 3162432244234745352223325184245322847342714422522321223235843322224286225632528466615689683136253244 141 | 4235443335446233232464634343733642242443444434214422633443441431321563412352243134322344333553324343 142 | 3823325334231322342312235313542113322854675333642436345333333232531131233232626343323233333533333532 143 | 2236143222222523311264442153341623316366132121222421125234232535222325263212221322122122365172122231 144 | 2434224457335331163122536122434244143142522464253442243472644243571345241145436593432425324332423365 145 | 2393223335343332233333237234333233212345383133223233323323332235323222321372335352133233838233239423 146 | 3322854732234455221443232154445442444225411441433343434243234425445345255152343245414242344253335552 147 | 2232332342424222322222234422361112222222422322252432413233223222242322322211222233222233212312221242 148 | 4563322912162552292222214622227125363121673551222224137354217832622292422242916312432222811222724552 149 | 4635352525532364322423332412333463553534533523434455333433353352542335433533443332234247335523433493 150 | 2294444542133424422422355444452438347432242333213614242435223332422131212345324224323233443833544331 151 | 4174736724576257235447954142252828447241324247253444226752582818365231137562835462123244353224243232 152 | 3242227322323232212623222222222132223113336371123243334233232234212122213313232218725322223224232254 153 | 2133441334322223442352317742724334343433121235333423243331331125224343533332233324231327438334334523 154 | 3221123111122234331232432532132222223232224322322223223221313422232631312444241232222322311123342222 155 | 3272222123233224222312222232222212223352121252232221221223423322212222322122324612222222522232442222 156 | 2311225212524174125221222193462121825412221213612462225273423252722222221272622111324238221191232262 157 | 2237623172221535335987425563349754836432546631871455984471335427235235532464413722536613447344235432 158 | 2262423412535112233123337922362144535322434433123322223249332324323423423333524438823224332544254321 159 | 2222222212222222222322122122222222222232211222231222323122221223222222122222222152112121121122222222 160 | 1323248243324353637234224642171243534222442341434429323432221228446322212322143373243342291216636342 161 | 7987579256589679753389663399597634538395537994734689877374477535869584689979667957875566992768596673 162 | 2652275416222222324126622163122244262281372524225672432226252743252665552521225722236347352467233452 163 | 2212231222223222432225332112224323141232232222223323221213211222222222222422221222222376226122232215 164 | 2224222253352211132221241422371214221343729211422222112223222224123222222122112122422233221132324251 165 | 9344534654223744453425555324553554447523553756365549453243434443352524444554434534342534595552364353 166 | 4322533534436362432354233246542455564333253354335433326656617455342452366323366355535416243634743223 167 | 4676645447577676445654544665577775772363446565564575486544444744446745576456554457544455464445455755 168 | 3322212242324222312533322332313323431323322253323213382253316323222231723232142322223133321222212123 169 | 2572222122232422221792522242122325212232442424222442222221454523341222122231222227322224327122222623 170 | 7334447633626359444442545837435676143333574646264533755445555625464676753765324645434643544454464766 171 | 2322222132232334332233233463313323322322333323334226323333123323233332333333442361223212222322343722 172 | 2242336244446434444435444534143433444374746464444543443433374435345543347444464474344454444473444434 173 | 3123322313262231332225222113322234342221233722212322323414433331233442223262212313373332332224234252 174 | 9352412214242122232222432123422662232322321134242342223323222212232226233212222233121122322222332242 175 | 4736431626714323842651212533433573342355532543222331333554366272447555533135242642244334645355545545 176 | 2472223225223243422342419362233325227851222222225242452223222164223324321552243322112524411453122232 177 | 2252322413521221142342133233231422232424122551252542322222224421121733213592228612333464563262324334 178 | 2523553215362323542323338155821424424443834352254226529566534556453564333642524272924632627535323515 179 | 6554345479377685374765446735558667354545646558567463863444555854579473554268452646777677778774564657 180 | 3232235235333537433236234445553345231333333433332333373152532243352338335343431584424323433351523433 181 | 1521522241532122522222222521222222222342322111233253322221222522322222232221352231233213214122121251 182 | 2444223414441453424247563364834454154582463338424436545334355334254634244444523444344844443264385333 183 | 8484934248686434424347878474937455235484656654643299454444433676573457675578544556428594354533924344 184 | 2264221112146221123225222222222121212222221213116212225222222122222122251132222165224522228222222222 185 | 4335444334342436244432332354332753314422524434765543359335522243353625433234235233622335433186522222 186 | 6774525555567545566345585775465752455561583545555448595552556353555655555455555445653264634545452196 187 | 8767574132734963847872834724176579773753887822475446995355475274834842122652346537485587595572495594 188 | 4221222343422545312522321222431243542321254223245125252435324613262223723223252121232422262256166262 189 | 6334632424242442512232423442441312715342234423462344432423332224422344342234222662314423413134235224 190 | 2323342323322333323213322223333323111273141111113332435424423223533243132332333432233324232333213114 191 | 2346135221242136352126332345432632222325132632265232622213272522321222242252345833222539235313123122 192 | 3383444684433314435473444453291443543434443434868443824343535464233463744433834743433443439814453584 193 | 2352254744214432641473842923244324222273123342344423232423232322344222331834342253932222622235423241 194 | 1332314211242422222221322222322112222222221222323223231422223222313212322314222212123221323323312112 195 | 2232344422342333212212421231222132123222221227224233332232222235222212332452212322232233142534213421 196 | 6445776542465468544242457727683445544443962648646641476446476776636454444646664864745529576337624474 197 | 7722122222234222472214222222212422223812223742415321422228423223331323222242346242622222284222221121 198 | 4531123234334233233248633323343142333332444234332323234434414148453332244343442223152333442433345823 199 | 2221316224345532222214424621334432622232324326226223222222212342223244232513433522145226533232122623 200 | 9454527354735656537472876857246747554763445832354347645346455852255465346827664554778667358636366668 201 | -------------------------------------------------------------------------------- /data/day8.input: -------------------------------------------------------------------------------- 1 | 58660,9565,9912 2 | 87631,12487,66875 3 | 84510,67581,57621 4 | 75066,51710,19906 5 | 90551,35141,1233 6 | 67277,94030,35458 7 | 99544,44381,29558 8 | 46811,28327,92124 9 | 81278,66135,49048 10 | 2233,39855,69048 11 | 31220,37287,28119 12 | 11512,32739,79167 13 | 96906,48754,47378 14 | 27411,14515,79573 15 | 80512,65088,49799 16 | 41761,93214,84212 17 | 2708,72096,76137 18 | 55492,70772,45928 19 | 7384,92272,92114 20 | 47187,87691,89025 21 | 69056,11798,76593 22 | 67682,28668,84337 23 | 15229,86834,2166 24 | 29572,75772,19442 25 | 21929,23847,29888 26 | 83650,18280,94388 27 | 55633,81875,6568 28 | 82254,75291,18005 29 | 54460,33227,27619 30 | 87859,8769,3321 31 | 64227,79505,97179 32 | 36247,28700,47242 33 | 42626,90161,31483 34 | 94847,84021,72949 35 | 96679,92647,66811 36 | 78252,97146,70987 37 | 88391,89291,50371 38 | 55687,77579,51357 39 | 53764,3911,82666 40 | 75717,48481,40615 41 | 581,72803,15449 42 | 4436,19500,68051 43 | 95973,69627,71057 44 | 3094,57388,88735 45 | 5809,93287,77413 46 | 84200,59603,1470 47 | 30131,30534,69505 48 | 543,22977,297 49 | 9034,63871,54624 50 | 74407,35101,23776 51 | 54785,31741,96797 52 | 32597,91191,65167 53 | 31100,7368,18689 54 | 15697,26926,24053 55 | 28446,57002,49413 56 | 88222,79782,96955 57 | 85688,60099,56622 58 | 27869,65054,68815 59 | 48725,53585,65935 60 | 55819,73872,39571 61 | 2966,34414,10299 62 | 75534,76512,11910 63 | 23777,52007,8059 64 | 64716,45686,39886 65 | 5200,83484,77673 66 | 21308,34454,65213 67 | 75580,61719,96305 68 | 48663,56333,85839 69 | 20333,96823,2508 70 | 37921,37329,80187 71 | 32135,71538,55987 72 | 13688,97643,42781 73 | 23044,31143,65043 74 | 28593,84350,28491 75 | 59929,78848,79915 76 | 81962,3593,45164 77 | 95669,12271,73412 78 | 34266,88910,59992 79 | 25473,70691,90986 80 | 1398,2546,48693 81 | 40589,35228,1438 82 | 21216,92655,28251 83 | 94536,43913,92780 84 | 16220,40947,32286 85 | 74436,14107,2879 86 | 32373,78192,18683 87 | 18291,71141,68501 88 | 62831,6840,77132 89 | 26990,56004,83886 90 | 19223,82214,72203 91 | 77937,40101,27665 92 | 5646,37057,88488 93 | 23653,36044,36349 94 | 21930,48469,38316 95 | 73750,40584,91573 96 | 44792,47706,66557 97 | 81199,57847,25559 98 | 36596,32882,4769 99 | 33863,76172,49329 100 | 88876,74785,56954 101 | 8673,87105,10029 102 | 58220,43268,66680 103 | 64449,95962,38506 104 | 86130,15006,5089 105 | 6960,28969,21780 106 | 53542,11815,14013 107 | 71327,89251,2074 108 | 82943,79112,17912 109 | 65231,83544,97726 110 | 41880,18737,22607 111 | 7039,57305,25083 112 | 34162,97617,71321 113 | 85025,1076,71256 114 | 16209,5423,37663 115 | 64197,69358,51404 116 | 20591,86764,42215 117 | 33717,79548,75270 118 | 47766,90798,88907 119 | 70888,53257,48652 120 | 49502,99051,45472 121 | 60214,4961,90061 122 | 91799,77534,90266 123 | 95976,47466,15575 124 | 78941,54395,2529 125 | 54341,48003,80934 126 | 60638,57905,62357 127 | 38758,13116,83751 128 | 39201,5364,98843 129 | 16025,62178,99415 130 | 93856,91327,99302 131 | 29300,39746,38587 132 | 39817,11261,21275 133 | 25505,6436,79717 134 | 29359,76620,50504 135 | 72217,73236,93183 136 | 79972,33423,26745 137 | 86624,61503,8630 138 | 38682,17423,38144 139 | 20264,903,73855 140 | 98651,68273,33780 141 | 3123,61495,15566 142 | 14694,25585,9901 143 | 6082,78111,84568 144 | 49720,79469,56475 145 | 54941,1756,51753 146 | 99452,7306,78246 147 | 5267,9163,87337 148 | 99990,98139,3769 149 | 66076,57920,58799 150 | 78539,73576,9514 151 | 64617,68246,80392 152 | 76235,26691,37890 153 | 6374,99903,70609 154 | 89481,39819,51778 155 | 42398,84442,50346 156 | 22976,1031,46417 157 | 92155,64892,26003 158 | 44562,69441,76588 159 | 57595,18149,79427 160 | 37069,56149,9297 161 | 50343,64968,67791 162 | 30442,48988,19139 163 | 90715,29637,75544 164 | 69999,66768,91606 165 | 79992,14071,66544 166 | 76475,18317,69134 167 | 4042,37962,26076 168 | 86422,24321,81073 169 | 45031,13780,73404 170 | 58850,82705,54820 171 | 25862,38013,56858 172 | 15470,19278,73651 173 | 22885,72552,29748 174 | 70088,85035,2286 175 | 19711,58991,43413 176 | 78236,59368,55384 177 | 56627,34659,85711 178 | 49457,74357,84772 179 | 53326,69235,95595 180 | 15954,57927,88628 181 | 81583,69772,13186 182 | 35142,31138,76521 183 | 21320,69586,57908 184 | 6609,62390,10050 185 | 80937,37893,1943 186 | 67868,2661,14484 187 | 73844,63480,41971 188 | 92427,78756,24299 189 | 68384,67356,69089 190 | 9708,39545,52915 191 | 90379,5065,35600 192 | 3613,65486,17519 193 | 56447,36565,41801 194 | 52111,61753,21032 195 | 49535,53014,88407 196 | 48229,19275,38171 197 | 38884,24927,84204 198 | 7547,49494,18888 199 | 2970,57646,86044 200 | 21236,16078,25054 201 | 81666,37107,26439 202 | 17079,97117,10897 203 | 34144,70890,6353 204 | 83587,69549,37086 205 | 62452,47040,46233 206 | 77721,92789,41868 207 | 87235,41417,83604 208 | 62291,81374,63137 209 | 7754,11912,70320 210 | 88173,4476,59945 211 | 96764,38309,54417 212 | 97487,6561,93250 213 | 89279,89780,66567 214 | 17406,4222,73159 215 | 60238,6721,87997 216 | 97010,56448,93378 217 | 75020,62179,16789 218 | 29131,43402,41107 219 | 42478,67362,11125 220 | 72672,45333,96576 221 | 10182,30221,16033 222 | 6106,76516,46266 223 | 16446,20967,76383 224 | 6421,27258,54698 225 | 81133,70666,75092 226 | 44998,90,47179 227 | 58907,50312,21977 228 | 95669,9376,60149 229 | 166,19340,89603 230 | 66759,35717,70717 231 | 74606,40400,68903 232 | 33186,988,69371 233 | 27564,91349,29165 234 | 64395,6508,96332 235 | 6773,75039,62312 236 | 1737,13720,34410 237 | 12641,59805,33357 238 | 93211,77852,51022 239 | 58601,51762,8605 240 | 81978,61462,70234 241 | 8820,42257,35475 242 | 75197,5263,9980 243 | 46145,71604,88660 244 | 44481,78912,71284 245 | 76405,92705,68583 246 | 14570,32065,60873 247 | 91098,64033,45053 248 | 94778,37196,6944 249 | 86540,58850,8570 250 | 4681,41028,76570 251 | 47938,57088,81846 252 | 71643,53808,12014 253 | 42170,41853,34014 254 | 94730,99059,75096 255 | 16409,78597,68668 256 | 31663,83815,82617 257 | 27247,28296,8695 258 | 98930,60257,60685 259 | 82510,4946,75034 260 | 42140,18844,51828 261 | 29386,50713,37527 262 | 90114,56806,6064 263 | 40953,61204,49998 264 | 14703,81076,62535 265 | 78820,59868,95933 266 | 66968,11155,84480 267 | 3887,21083,9236 268 | 44975,69726,60876 269 | 37519,55330,63486 270 | 10198,27847,7408 271 | 86062,80963,54582 272 | 41498,27667,83781 273 | 16286,53427,99818 274 | 12571,55517,98074 275 | 59149,61678,67486 276 | 77963,44012,13990 277 | 8676,66758,21030 278 | 43910,64422,95877 279 | 88564,70414,30011 280 | 45703,84228,78776 281 | 2443,6557,72184 282 | 81136,33049,66909 283 | 47959,77490,6951 284 | 13464,50093,1838 285 | 60602,88603,42141 286 | 30275,28772,2002 287 | 59733,96328,96962 288 | 74544,66709,6633 289 | 83219,51411,44276 290 | 242,57146,37404 291 | 36954,15978,35686 292 | 19431,89385,62959 293 | 50588,69169,46278 294 | 63906,26558,92017 295 | 22612,13448,20704 296 | 67920,28197,64074 297 | 71275,34714,96708 298 | 90666,68882,97408 299 | 97930,55997,67579 300 | 17076,28310,89920 301 | 81688,83524,80592 302 | 35029,91303,7084 303 | 91584,2722,93473 304 | 60047,87776,22377 305 | 64488,48548,72859 306 | 69686,33080,25001 307 | 87240,90197,35193 308 | 41309,76675,23474 309 | 22932,58475,21433 310 | 9668,17041,41315 311 | 36319,71920,21610 312 | 82973,69759,8371 313 | 98366,85738,22618 314 | 60316,26832,18114 315 | 16773,7422,45790 316 | 26839,63617,56142 317 | 84798,92977,83896 318 | 58462,95062,27539 319 | 84740,19607,83990 320 | 31407,5783,16005 321 | 43272,31567,54123 322 | 58986,46736,18265 323 | 84136,61521,30785 324 | 71462,71049,21014 325 | 70271,87949,31543 326 | 42302,28744,18896 327 | 66743,33485,10507 328 | 50399,25811,291 329 | 28512,13469,96260 330 | 99736,46343,84338 331 | 31348,43927,63150 332 | 28530,87821,42834 333 | 10136,82751,8233 334 | 59513,77816,45531 335 | 81630,11045,20791 336 | 31310,21984,67669 337 | 5935,12065,34103 338 | 85577,9959,36940 339 | 87364,5180,1031 340 | 52951,85368,76602 341 | 88962,766,28169 342 | 52846,20341,88618 343 | 88030,54178,64293 344 | 47318,11541,35922 345 | 55597,90510,73384 346 | 37022,72946,80236 347 | 20187,95293,58851 348 | 69341,87633,53917 349 | 75318,33573,58763 350 | 64769,16753,48800 351 | 65135,99,13066 352 | 27390,51718,92681 353 | 85399,24632,18279 354 | 34083,12036,16522 355 | 79075,14453,9679 356 | 47031,14349,99190 357 | 86288,42133,13889 358 | 16864,15991,92887 359 | 78552,8399,78219 360 | 57183,70537,34472 361 | 85258,13676,9376 362 | 1183,51930,98914 363 | 46552,83957,84387 364 | 54618,17528,66644 365 | 42230,24191,42319 366 | 73122,58590,41267 367 | 2947,28502,50058 368 | 6782,72818,17872 369 | 64482,20750,65702 370 | 4416,66595,19646 371 | 43420,62689,54387 372 | 26662,6094,84618 373 | 2973,89789,47849 374 | 27969,6008,8948 375 | 6844,22998,244 376 | 18471,60541,1011 377 | 28410,33127,6004 378 | 97515,95158,5321 379 | 37932,46576,65229 380 | 6786,63042,76276 381 | 21277,1351,13615 382 | 37607,59070,35552 383 | 92568,20542,32105 384 | 42915,70845,97038 385 | 37247,45587,90205 386 | 66660,43177,86332 387 | 2516,97592,28352 388 | 35134,3403,55137 389 | 3380,71171,23542 390 | 88034,21563,33782 391 | 6278,16963,22347 392 | 89176,83463,1561 393 | 36178,54842,22081 394 | 84857,344,25300 395 | 38153,54835,77542 396 | 23575,99452,70191 397 | 29851,67519,78633 398 | 64647,17376,52021 399 | 89382,35170,63903 400 | 52921,82334,93226 401 | 51415,9793,88625 402 | 94205,75273,28934 403 | 47495,82988,55380 404 | 9420,12282,98461 405 | 62691,60664,94976 406 | 56789,81458,84703 407 | 33377,93188,95568 408 | 7967,73392,40748 409 | 11803,91022,80476 410 | 88713,27059,29159 411 | 83277,13246,13001 412 | 97663,15729,52892 413 | 46796,42237,43873 414 | 95956,16027,73959 415 | 25199,15300,89280 416 | 89001,62214,80570 417 | 79883,93400,40954 418 | 71608,61639,2655 419 | 28295,28325,83953 420 | 92870,80087,90369 421 | 5355,75259,52417 422 | 88571,34027,27771 423 | 29705,53807,60585 424 | 57856,81223,57266 425 | 60042,58020,28884 426 | 9241,58790,3099 427 | 77455,36650,29739 428 | 84817,98711,68418 429 | 29670,77927,25121 430 | 63312,1798,33498 431 | 49710,68294,71775 432 | 32125,26572,43424 433 | 94405,43957,52339 434 | 98689,2666,7497 435 | 90866,71134,50828 436 | 86849,90706,9789 437 | 74115,11995,73859 438 | 8947,42204,71120 439 | 32243,35575,10619 440 | 63262,19601,77369 441 | 59624,46436,36788 442 | 8069,5334,26885 443 | 69910,35191,12486 444 | 32676,97415,91629 445 | 86604,36053,54427 446 | 31455,68197,27885 447 | 52279,36618,50316 448 | 81407,46939,75537 449 | 39458,55977,31860 450 | 37328,38618,2487 451 | 75474,2680,49720 452 | 15926,9214,80397 453 | 33905,95533,3421 454 | 8934,84810,85332 455 | 2190,86789,28465 456 | 76303,56843,91641 457 | 69307,12966,36030 458 | 82941,24821,1107 459 | 59220,59459,89936 460 | 7260,12385,84854 461 | 19561,54458,48946 462 | 69333,25073,90721 463 | 46471,42641,24310 464 | 57537,97274,6976 465 | 29372,43831,28002 466 | 72449,81525,38057 467 | 14762,52042,65620 468 | 6238,33413,97698 469 | 39903,29237,32802 470 | 59582,72105,37941 471 | 67083,32224,64454 472 | 33188,73520,45279 473 | 3083,68611,37418 474 | 64170,69677,92385 475 | 76079,83566,82398 476 | 79330,80034,41384 477 | 80769,61765,30326 478 | 14935,65875,67772 479 | 24761,16582,47419 480 | 63601,79800,11563 481 | 16749,45194,65743 482 | 83689,57535,37423 483 | 95241,68863,60289 484 | 1623,34703,25552 485 | 24064,68097,87017 486 | 74619,98648,54192 487 | 96200,97570,47130 488 | 86573,20352,57103 489 | 35070,62880,80774 490 | 91881,85815,89893 491 | 20695,28873,77770 492 | 57703,46884,62303 493 | 9159,19680,8311 494 | 23938,68121,71948 495 | 15833,41563,34339 496 | 71680,80884,72537 497 | 5222,17140,55183 498 | 49216,1513,82835 499 | 70898,69988,19473 500 | 67136,95660,71165 501 | 79396,56885,40545 502 | 73910,81515,41165 503 | 54116,89863,43444 504 | 44730,41102,7558 505 | 19658,88566,875 506 | 58033,19344,91546 507 | 56007,56104,58887 508 | 81620,53612,38126 509 | 38572,99071,67228 510 | 17417,87633,17096 511 | 1901,74782,9861 512 | 28560,33119,9187 513 | 4608,12010,66633 514 | 28194,70689,87544 515 | 42571,40244,97398 516 | 54564,76797,72510 517 | 46307,1873,15066 518 | 25467,56926,37363 519 | 2378,55384,10267 520 | 73390,49152,60911 521 | 37422,56726,16669 522 | 22201,10106,63212 523 | 82900,78591,30293 524 | 94555,20681,19041 525 | 68834,32062,55164 526 | 78460,28763,54530 527 | 98924,84790,92187 528 | 51489,45150,92087 529 | 93378,69165,59357 530 | 41775,2575,19076 531 | 29535,69882,57163 532 | 30294,69491,34989 533 | 68734,33315,74878 534 | 44199,61512,4011 535 | 41133,71397,11909 536 | 2393,16460,76234 537 | 35102,76337,39325 538 | 48565,74374,17473 539 | 64783,77668,84141 540 | 21530,16315,11623 541 | 95557,24269,66402 542 | 63901,21682,26186 543 | 89395,2890,369 544 | 43289,91645,38003 545 | 10328,43,86633 546 | 82657,97791,25981 547 | 84846,20272,56537 548 | 5292,30284,41908 549 | 46894,23907,66259 550 | 32102,74024,40163 551 | 14162,98167,72097 552 | 91187,19117,14863 553 | 28854,19736,58231 554 | 64199,99890,36604 555 | 30122,14579,89413 556 | 7137,91397,5942 557 | 45133,91104,77159 558 | 91406,30759,61678 559 | 21771,60853,96660 560 | 58861,74140,19301 561 | 84698,87011,2581 562 | 70735,39142,75632 563 | 89614,25659,84508 564 | 81963,91509,94171 565 | 919,6836,53156 566 | 83416,26314,19517 567 | 31339,2831,36071 568 | 79583,51514,8710 569 | 57948,5250,50650 570 | 33213,33002,57867 571 | 95138,36134,10488 572 | 95549,94721,60814 573 | 91547,38130,4922 574 | 40550,7681,88075 575 | 48813,87189,25944 576 | 63672,28861,49522 577 | 24138,32158,8720 578 | 82109,31967,30648 579 | 48851,43668,14414 580 | 45236,86765,2744 581 | 3104,85852,78894 582 | 15334,19744,92852 583 | 97057,87795,31429 584 | 99914,94868,24600 585 | 16111,98069,10364 586 | 1745,2898,32128 587 | 6560,26271,88910 588 | 81722,95829,55181 589 | 91019,40059,97631 590 | 30976,76186,62531 591 | 22595,61962,47049 592 | 86226,1821,63359 593 | 51800,73640,97788 594 | 73081,65713,13393 595 | 90384,15972,79514 596 | 32822,49677,72049 597 | 2166,77564,21285 598 | 748,94243,72675 599 | 34854,34534,46219 600 | 49680,39731,15148 601 | 83212,50837,1690 602 | 44998,45781,72635 603 | 2225,38970,72672 604 | 97462,47854,19756 605 | 5889,67893,65842 606 | 17389,86840,60038 607 | 68375,33287,2325 608 | 8990,57264,65957 609 | 34911,74067,2567 610 | 82616,39546,18082 611 | 11941,54100,99250 612 | 22233,53034,53154 613 | 51473,96032,52771 614 | 68113,68682,90688 615 | 66582,59827,92344 616 | 31408,25840,50208 617 | 17989,76659,766 618 | 67874,15223,53823 619 | 23101,76860,51161 620 | 76858,89033,16857 621 | 99496,81211,81349 622 | 98824,29667,75978 623 | 45423,71992,93222 624 | 29256,61945,9951 625 | 96075,47912,60623 626 | 24749,71984,1335 627 | 24671,67416,1645 628 | 82776,68957,83765 629 | 33312,90697,3562 630 | 77626,92993,36982 631 | 58048,65606,45703 632 | 66092,74074,53072 633 | 12662,68174,29330 634 | 99279,24088,35146 635 | 34073,88473,12652 636 | 88885,12621,65567 637 | 30685,78347,11433 638 | 48549,2473,67815 639 | 73150,67027,26718 640 | 77785,75741,78985 641 | 21448,37585,82486 642 | 83463,74635,45146 643 | 39968,27425,95618 644 | 92241,64887,17087 645 | 81740,58503,34568 646 | 8893,783,88584 647 | 74470,43677,38045 648 | 13685,47665,81980 649 | 12777,89971,58181 650 | 46655,98925,28530 651 | 86630,44490,90651 652 | 30266,24972,80732 653 | 23762,68221,61440 654 | 78479,4092,65499 655 | 57020,93639,45997 656 | 43656,23289,70572 657 | 95684,91064,56624 658 | 3897,1197,58212 659 | 55637,69018,3846 660 | 94956,74043,13542 661 | 13981,28703,68129 662 | 90256,10631,50839 663 | 41394,81328,72154 664 | 47482,75129,54645 665 | 20143,28674,45548 666 | 94098,96929,84348 667 | 50132,13529,17881 668 | 15187,9094,51873 669 | 51811,49295,34864 670 | 27950,9127,91618 671 | 12511,25663,19559 672 | 50137,47652,73114 673 | 85348,12027,83043 674 | 56077,16544,82632 675 | 79459,72074,21610 676 | 61791,96146,35526 677 | 6929,84996,87962 678 | 7130,65078,53082 679 | 83907,57126,25247 680 | 73530,149,18114 681 | 35017,31669,21528 682 | 19398,15310,51597 683 | 12146,72956,17988 684 | 27797,67716,47409 685 | 45787,50293,31305 686 | 87846,8524,82752 687 | 67762,28234,68382 688 | 15876,40084,81818 689 | 15135,22294,89089 690 | 61417,43226,6413 691 | 73833,73747,24291 692 | 28322,48260,93620 693 | 67900,98057,95320 694 | 68478,90883,80934 695 | 5672,40664,11469 696 | 30022,17698,33246 697 | 2673,4456,49604 698 | 99922,72968,36500 699 | 74553,35534,48380 700 | 53072,64812,21352 701 | 54951,23711,60823 702 | 99172,4301,14398 703 | 82526,36381,67067 704 | 50685,71530,36759 705 | 42721,92561,38478 706 | 40473,52034,63533 707 | 46677,33353,56928 708 | 56369,23526,87394 709 | 56972,14701,90114 710 | 88940,92195,2623 711 | 97442,81047,56734 712 | 71033,67756,75300 713 | 69931,89865,50626 714 | 44153,72698,77518 715 | 6280,26664,93009 716 | 43612,40748,2219 717 | 20422,97118,7277 718 | 62964,24344,20558 719 | 1796,45850,62621 720 | 91416,63796,39504 721 | 37866,46308,21465 722 | 24882,40147,41604 723 | 16312,27474,51337 724 | 8848,9554,83670 725 | 2914,34861,13391 726 | 56074,63805,98261 727 | 34765,68575,65220 728 | 57271,48654,88850 729 | 37014,32163,90258 730 | 25753,65427,41181 731 | 30129,64383,79689 732 | 95806,59311,60322 733 | 18685,12240,661 734 | 4629,16427,56078 735 | 91612,46335,13177 736 | 69367,68792,82953 737 | 48715,79307,68003 738 | 61126,15342,9518 739 | 28357,48333,44697 740 | 94329,26890,67282 741 | 17551,78313,42017 742 | 49069,80833,82941 743 | 87527,39053,19790 744 | 58129,62807,49405 745 | 45203,16409,90840 746 | 30960,230,79154 747 | 45505,3536,77054 748 | 18207,50449,79740 749 | 14192,63214,57599 750 | 45738,62357,57179 751 | 58816,63248,3380 752 | 34623,38109,10088 753 | 58857,34309,2213 754 | 69550,1896,16413 755 | 12169,51228,4555 756 | 94128,65723,17996 757 | 4512,37878,20855 758 | 73330,40921,81448 759 | 82955,48512,95898 760 | 82599,13743,16260 761 | 34248,33919,27970 762 | 42637,79947,15161 763 | 76566,96471,18878 764 | 47181,31784,39899 765 | 8941,85077,83988 766 | 76847,92034,48605 767 | 81304,91346,88639 768 | 69776,25841,44442 769 | 61514,68125,24663 770 | 48424,27189,85027 771 | 54055,8044,84750 772 | 209,63638,19819 773 | 3324,60797,37124 774 | 88465,40563,9688 775 | 61260,41537,52462 776 | 53311,89058,63673 777 | 43377,46018,30618 778 | 96161,8052,39930 779 | 60629,48095,43776 780 | 95461,99575,86108 781 | 89944,22499,42097 782 | 30927,58954,18739 783 | 65270,12677,1569 784 | 46925,28705,71731 785 | 41977,92926,62185 786 | 37751,83339,32013 787 | 42855,53314,29705 788 | 649,68048,8293 789 | 70987,88938,90210 790 | 21646,5814,87090 791 | 62922,5049,24421 792 | 4297,50896,500 793 | 77578,35896,38608 794 | 36412,25204,54217 795 | 71488,54510,92885 796 | 98726,27827,35965 797 | 88933,14874,28711 798 | 88534,17409,50073 799 | 85641,37939,2518 800 | 35512,81504,13456 801 | 50984,28825,9199 802 | 98688,75793,44206 803 | 14597,79002,86893 804 | 71218,26098,4258 805 | 91905,63602,3740 806 | 72684,8121,35921 807 | 16569,54180,51546 808 | 70602,71376,60118 809 | 39923,32399,76324 810 | 42409,633,45057 811 | 77931,13425,42695 812 | 27033,17498,44563 813 | 41614,76209,72866 814 | 33007,59827,80025 815 | 73499,15587,32719 816 | 71041,75131,53521 817 | 31542,18213,91706 818 | 74465,6975,46159 819 | 88386,20586,80616 820 | 56759,33139,12811 821 | 69679,48456,75929 822 | 55594,96343,68111 823 | 12959,89111,99234 824 | 91110,20942,89331 825 | 59756,42508,37063 826 | 32071,40318,33062 827 | 31820,23546,61243 828 | 59517,31324,19913 829 | 86962,11503,23615 830 | 97194,57541,10028 831 | 53579,14906,78328 832 | 23061,51534,83025 833 | 82652,60021,45342 834 | 5840,66836,76101 835 | 40235,35285,89257 836 | 80093,67260,29372 837 | 23132,98467,73552 838 | 814,86365,42923 839 | 73904,19013,29091 840 | 99375,92206,20858 841 | 11291,70457,77200 842 | 7336,27745,80096 843 | 84204,82827,46888 844 | 82915,22560,67 845 | 93247,10076,97693 846 | 38357,72023,50292 847 | 42064,86911,68881 848 | 85203,66666,64284 849 | 50941,23662,55040 850 | 53267,96573,63189 851 | 16172,6546,25477 852 | 28415,57939,9430 853 | 27514,27339,5605 854 | 13476,72996,34423 855 | 82621,59475,60208 856 | 64504,76149,34648 857 | 32501,79201,5019 858 | 90666,99647,55563 859 | 91598,34130,81498 860 | 9270,54551,76067 861 | 69288,67539,544 862 | 42907,67057,22220 863 | 8819,47993,36125 864 | 55866,37391,57730 865 | 17968,28392,27608 866 | 69135,47936,70199 867 | 96601,86628,90080 868 | 35292,57971,62391 869 | 14363,19337,98029 870 | 58860,38932,78632 871 | 22788,82574,38274 872 | 19310,96154,74899 873 | 797,37359,32097 874 | 8887,92932,17748 875 | 58530,47251,57223 876 | 87740,76551,17380 877 | 90506,5187,56245 878 | 58279,73944,94276 879 | 52398,14453,32053 880 | 94820,49445,41831 881 | 86390,1379,34549 882 | 8457,45987,80469 883 | 13960,69911,44955 884 | 51091,75529,52436 885 | 8247,24290,53498 886 | 542,44043,66239 887 | 74794,2689,29922 888 | 53648,61301,68135 889 | 32744,6192,42481 890 | 12655,3504,1474 891 | 19332,88813,52194 892 | 74423,71901,54509 893 | 10152,38797,19253 894 | 72462,31004,13606 895 | 15170,57952,40001 896 | 39256,16034,11760 897 | 24130,95732,51824 898 | 61467,76424,16712 899 | 81983,91990,81656 900 | 22508,61797,38610 901 | 72626,34972,82876 902 | 88489,39031,47951 903 | 73167,43503,28082 904 | 87140,51746,24350 905 | 8227,27737,74441 906 | 87872,46291,42314 907 | 85317,13111,72833 908 | 15102,2317,21833 909 | 30431,92992,23262 910 | 90166,41132,26697 911 | 87839,8892,78900 912 | 95889,67659,89961 913 | 84641,56457,1319 914 | 71352,30177,70396 915 | 49848,60883,17658 916 | 87862,74257,14064 917 | 50949,50525,50033 918 | 51585,18924,85096 919 | 57525,41856,39705 920 | 23993,79551,89876 921 | 2256,39210,4800 922 | 10178,4843,24495 923 | 81008,33550,7302 924 | 28326,89760,33710 925 | 97201,21678,74799 926 | 29117,88186,76960 927 | 68113,48893,73979 928 | 61364,37877,71434 929 | 13630,84320,65431 930 | 85086,15308,36466 931 | 25703,56516,67680 932 | 73076,73819,19929 933 | 72240,6240,38973 934 | 55093,21538,77266 935 | 97508,90472,50935 936 | 12034,77138,92633 937 | 63010,57645,88678 938 | 91025,36704,73691 939 | 18386,62925,10024 940 | 45341,18894,66771 941 | 75408,94000,86363 942 | 64468,77000,57841 943 | 78331,36939,98881 944 | 79109,10637,40375 945 | 73242,9574,85392 946 | 2438,91769,66423 947 | 52928,76649,81487 948 | 84550,57468,76933 949 | 80181,38253,60517 950 | 21244,61899,91602 951 | 88713,76772,9362 952 | 74550,90780,52551 953 | 93669,88256,20247 954 | 71400,85654,44128 955 | 42826,34762,66744 956 | 6766,50031,56002 957 | 86876,4025,1475 958 | 92060,28214,45345 959 | 54934,38201,85876 960 | 27925,39703,59126 961 | 95590,26652,18800 962 | 76857,51947,26669 963 | 23854,608,30981 964 | 12552,32539,84303 965 | 76530,22224,62340 966 | 15794,33202,80492 967 | 41533,49046,19641 968 | 71535,74178,72297 969 | 76956,93519,71644 970 | 85291,98930,64894 971 | 79957,25910,36434 972 | 50714,86649,18080 973 | 59409,29810,59741 974 | 338,79679,87760 975 | 17174,68392,68601 976 | 55831,79909,20114 977 | 9586,8387,53999 978 | 11272,79253,18393 979 | 64119,12757,57564 980 | 66579,17096,41843 981 | 89725,20441,72300 982 | 22133,6732,86748 983 | 95798,99011,10790 984 | 89478,56021,3964 985 | 32890,4463,5265 986 | 64744,16795,64629 987 | 78565,6551,3622 988 | 33847,19672,77974 989 | 19059,83400,23712 990 | 75072,68501,19475 991 | 23589,76531,49776 992 | 31079,68474,56140 993 | 6713,10302,69506 994 | 7903,85896,47018 995 | 61957,20850,72318 996 | 1142,41753,30226 997 | 74144,91554,35003 998 | 69158,91925,23204 999 | 4829,58596,40700 1000 | 64893,63441,26196 1001 | -------------------------------------------------------------------------------- /data/day5.input: -------------------------------------------------------------------------------- 1 | 6599865270709-7145917173963 2 | 4373362882884-4819235740505 3 | 422402841811995-423720547181817 4 | 3306639218023-3930395453270 5 | 102813354819910-107681928813023 6 | 289387002124438-290996017773384 7 | 514140747509962-514392156555684 8 | 294259534783904-297036663343596 9 | 377779814566959-377779814566959 10 | 175549668599716-178010517690690 11 | 163280894543189-163950752859283 12 | 336091165735748-336676477368893 13 | 373655247232868-377779814566958 14 | 224184456364375-228554233328876 15 | 303476382960027-309559880706003 16 | 31171521918398-39458668730077 17 | 283178468389809-284974632848406 18 | 463886641420035-471102575698060 19 | 305029727857916-308616862344215 20 | 152762544827564-159961497448295 21 | 144157403255937-148826733249743 22 | 326273021125655-331285131802790 23 | 518688586548662-519177123847009 24 | 519253827192123-519504511287003 25 | 45564468152441-48945054633932 26 | 446400770323713-450677603560962 27 | 6316885185595-6953984944598 28 | 194303127336385-195622353802125 29 | 164803984043794-165472030129438 30 | 536003082526789-542384396650947 31 | 196221520000946-197646255003404 32 | 403687109137425-410679383395921 33 | 414026322933322-417773238903645 34 | 42498051344930-48945054633932 35 | 514587451888060-515391128535079 36 | 526346158451774-528748135312066 37 | 474688005170000-480837552765153 38 | 63411197693248-65117858037564 39 | 13182740949772-19454672582171 40 | 169995728172020-170320985638205 41 | 288323334858203-290009320154692 42 | 21015643582719-28044145932231 43 | 474688005170000-474688005170000 44 | 514392156555684-514727961098894 45 | 423409765218177-424658505776812 46 | 84866696711796-89586048500593 47 | 202245072059218-208353226613654 48 | 167037843702903-167796085096689 49 | 428033148159488-429288313248500 50 | 495520332064751-499912550957722 51 | 516289151419788-516661487097711 52 | 165037783929704-165794328512600 53 | 62593246885939-64156982854998 54 | 183723050133280-190207056062812 55 | 504826913046504-509998808259597 56 | 132251468956482-138324788786380 57 | 393218184940494-400293238294979 58 | 384124039430243-387954179293559 59 | 335197668166498-335368542384241 60 | 365616715057775-370913555893268 61 | 231920302229762-237452178963140 62 | 208353226613654-208353226613654 63 | 335623292192772-336430907563365 64 | 61686926667835-62906229087727 65 | 199439612858395-200671984757445 66 | 453708366053063-460582608125924 67 | 172382858968667-175549668599715 68 | 335197668166498-335875887464422 69 | 5724369079693-6316885185595 70 | 426835628929327-428335796984319 71 | 281828242995243-283738942173960 72 | 430836255860495-431949789265124 73 | 414026322933322-414026322933322 74 | 263563419616610-263563419616610 75 | 193459994123666-194942890985011 76 | 8513370735670-8575156596103 77 | 191384222860954-192574066920231 78 | 333854835738754-334293309198190 79 | 60533283512083-61970160746666 80 | 436490339366448-441801088217370 81 | 192412835698563-193680562533418 82 | 138324788786381-138324788786381 83 | 245150117854813-250506215767210 84 | 74707987153291-79866592379297 85 | 400293238294979-400293238294979 86 | 337444595663269-338226582597653 87 | 119380991717092-119380991717092 88 | 485196483140844-490325175216718 89 | 185948444441404-190207056062812 90 | 123082224652118-129457657497702 91 | 286738955255045-288704258417768 92 | 385570619940629-389862453271809 93 | 2703654996517-3306639218023 94 | 353266958685101-357300529017225 95 | 495520332064751-497729704074856 96 | 526346158451773-526346158451773 97 | 5724369079693-6135933227448 98 | 519177123847009-519253827192123 99 | 215558815637109-219523079891389 100 | 13182740949771-13182740949771 101 | 554752091273827-558601829106238 102 | 195159967580933-196906860747529 103 | 31171521918398-39458668730077 104 | 284198501252161-286340596090708 105 | 337708674914505-338451964865987 106 | 285577292780802-287430881365470 107 | 275802197128569-278350309208397 108 | 520130685209492-520377675016360 109 | 426207405717689-427648936982125 110 | 339944115182227-340470721373135 111 | 521013640249556-521290786341304 112 | 332455900728442-333096484571889 113 | 332640860125206-333096484571889 114 | 66771062458750-68245200182546 115 | 516749000112063-517271743622294 116 | 215558815637109-219523079891389 117 | 551568311547550-551568311547550 118 | 3930395453270-4584257776802 119 | 166745259663424-167532321619358 120 | 314656092924165-319436096893084 121 | 4584257776802-4819235740505 122 | 152762544827563-152762544827563 123 | 340113235854807-340470721373135 124 | 424267288659547-425779968265074 125 | 71666087391467-76339056167338 126 | 102813354819910-105862535842602 127 | 197287147242137-198847162307716 128 | 333558033766180-334293309198190 129 | 323315503931010-331285131802790 130 | 67429677399311-69082415485208 131 | 235320247501111-240576105435674 132 | 169446245572059-169995728172020 133 | 4373362882884-4584257776802 134 | 55968379665893-58073159086260 135 | 94582609025350-94582609025350 136 | 252024217233070-259490407335421 137 | 331840328131613-332640860125206 138 | 516749000112063-517518453880947 139 | 403687109137424-403687109137424 140 | 198430256027711-199620635574445 141 | 242426022007059-245150117854811 142 | 333096484571889-333273537787731 143 | 364835740149012-365616715057774 144 | 509998808259597-509998808259597 145 | 294259534783904-298938797327022 146 | 271933881210423-280728899078659 147 | 112230401204917-119380991717092 148 | 64407576571743-66059971479062 149 | 2703654996517-3306639218023 150 | 432638740795720-436490339366447 151 | 52694621956718-55968379665892 152 | 166511892237309-166745259663424 153 | 429011588092586-430238234024131 154 | 338711085526296-339109695965448 155 | 314656092924165-319436096893084 156 | 165037783929704-165472030129438 157 | 338451964865987-338711085526296 158 | 544417051981776-551568311547549 159 | 334293309198190-334530880199037 160 | 485196483140844-490325175216718 161 | 68455412202170-69957877152983 162 | 228554233328877-228554233328877 163 | 94582609025350-96408549816850 164 | 336920064813755-337708674914505 165 | 425074241640930-426658954682581 166 | 161412573402353-162239632532404 167 | 516749000112063-517518453880947 168 | 82337398865525-84866696711794 169 | 252024217233070-256193968190447 170 | 534772392063868-539851121304605 171 | 7379548891723-7944884099945 172 | 344365319178800-349685437215593 173 | 558601829106240-562068246267502 174 | 429930894463301-431264808072131 175 | 161918056568763-162544662273724 176 | 23596951358270-26954971819183 177 | 65768672437504-67046115765011 178 | 263563419616610-270428636117884 179 | 467243958843169-471102575698060 180 | 163021985276507-163496364809087 181 | 456515522309849-458870651316671 182 | 357300529017227-360967590727082 183 | 184 | 378491365844183 185 | 358741185211476 186 | 454071999180594 187 | 140744179213659 188 | 459215988425174 189 | 521715552716565 190 | 459672874012009 191 | 54518206482189 192 | 344526407130587 193 | 206170020206783 194 | 555945994443857 195 | 411332487406877 196 | 456361217073528 197 | 365238043338420 198 | 529429743947845 199 | 89485488068547 200 | 7198367263416 201 | 105827419330789 202 | 160610858603652 203 | 408241185005581 204 | 556450604001766 205 | 230675345826653 206 | 533558851357754 207 | 330420144020915 208 | 510367263173043 209 | 409948399204460 210 | 87380408873497 211 | 533898850839475 212 | 234565836713190 213 | 169897705575228 214 | 6515243880931 215 | 542859476146573 216 | 410380023367789 217 | 207780898951627 218 | 428318217452329 219 | 182740685826109 220 | 435828857393648 221 | 87938635304227 222 | 204040705430571 223 | 262446923187338 224 | 11799539204720 225 | 539853852486350 226 | 328071572351032 227 | 410637610367526 228 | 377485535214375 229 | 309411565367855 230 | 150290392607179 231 | 2744221668714 232 | 490545713152135 233 | 122639325170011 234 | 383854288281111 235 | 478998766037001 236 | 547707948760980 237 | 47012693747801 238 | 320965767130985 239 | 36950641992507 240 | 87209150015325 241 | 454057882949633 242 | 404830064205978 243 | 295283183837888 244 | 214412851855135 245 | 95942802195932 246 | 99432147866015 247 | 24718515350759 248 | 489275478212529 249 | 380787629905981 250 | 309895744018037 251 | 462399303145563 252 | 144086259547483 253 | 426487154759321 254 | 122282068454718 255 | 311960854478744 256 | 48094813000579 257 | 3522366856539 258 | 178840715990048 259 | 390556691246034 260 | 359534305870729 261 | 101488800820552 262 | 438477582553592 263 | 281109202426055 264 | 12291577114528 265 | 527267968897027 266 | 110135825482729 267 | 393063164759867 268 | 529121122312832 269 | 403327977161902 270 | 169589304133979 271 | 211744096922282 272 | 150088707262760 273 | 389347285314745 274 | 356977636562000 275 | 501556961824032 276 | 323743614356391 277 | 551374404234963 278 | 445086790486276 279 | 367746252129954 280 | 416847144877549 281 | 234220484427208 282 | 386547424765189 283 | 134656657174337 284 | 504539780597869 285 | 85771327146387 286 | 19949629736867 287 | 440460853678822 288 | 96589326277784 289 | 187949846834258 290 | 66699122515183 291 | 246251718076821 292 | 79885226203325 293 | 85009933910291 294 | 149593857197468 295 | 412395864688048 296 | 326832348606511 297 | 180032269343900 298 | 364215616743757 299 | 501258631611373 300 | 14694944047357 301 | 400169582618369 302 | 85548670615027 303 | 97950589706643 304 | 28184053440040 305 | 230476834683461 306 | 470503233170841 307 | 553053495390830 308 | 124634892533659 309 | 112939842923652 310 | 355015213515043 311 | 546137185561854 312 | 26212584337732 313 | 241522028603821 314 | 510474939556432 315 | 356576571850146 316 | 26978524272967 317 | 318212499249667 318 | 9336526492778 319 | 235487234616858 320 | 51510057642705 321 | 3081856546656 322 | 560941743964320 323 | 346414185813375 324 | 271048854842975 325 | 427206235966112 326 | 121316712745282 327 | 202647351891412 328 | 65019768906398 329 | 474997903330670 330 | 273384541759746 331 | 363747463004577 332 | 374726816876463 333 | 553622819277669 334 | 193849985009102 335 | 411092542896614 336 | 332048410867271 337 | 217405518748433 338 | 80006945222445 339 | 321358902786351 340 | 323302353246759 341 | 308942005725363 342 | 228913356578135 343 | 200911470901474 344 | 38973801550072 345 | 307327623687737 346 | 291161101614821 347 | 68871604405932 348 | 399978943108527 349 | 428375377625867 350 | 49673457181666 351 | 313509837660121 352 | 46365970551506 353 | 5599377725592 354 | 508827734176760 355 | 476747432232226 356 | 9084604264020 357 | 515422580989623 358 | 177439646826931 359 | 212567443129961 360 | 21293829603588 361 | 97293118917507 362 | 481107190952495 363 | 157599459839932 364 | 561269754440970 365 | 475229175060735 366 | 380490248025437 367 | 267696559720641 368 | 444624445201215 369 | 414542884446710 370 | 218836945620321 371 | 354484933331402 372 | 397791017123812 373 | 51984859337263 374 | 368826307648862 375 | 477470088867235 376 | 284287200958103 377 | 337950367328247 378 | 28295579596314 379 | 167993833653066 380 | 401414338850657 381 | 460758726133276 382 | 479531713433170 383 | 373826520584346 384 | 231068863366201 385 | 191395561922894 386 | 508245373524054 387 | 548132840167395 388 | 523671884275900 389 | 232134721127472 390 | 72175145250495 391 | 296543871986786 392 | 380170723864870 393 | 462845048862653 394 | 110289039202593 395 | 58042042312420 396 | 23504652615925 397 | 175567720956834 398 | 387440689304766 399 | 154045765398389 400 | 408750730507821 401 | 16292443301505 402 | 435527358039928 403 | 368824114191547 404 | 540886527130308 405 | 232140648100280 406 | 284769491242196 407 | 299465514483326 408 | 553177128711085 409 | 3593075354372 410 | 7795453596787 411 | 59710471860563 412 | 210763331979989 413 | 249715096335268 414 | 440678052906187 415 | 34349635851467 416 | 442007243004764 417 | 191483233756055 418 | 319714341327106 419 | 497037463527688 420 | 172185309599796 421 | 214184409357989 422 | 499470892974482 423 | 185540052264052 424 | 468282631518526 425 | 232028200614473 426 | 311897350808735 427 | 522606153114573 428 | 5108175855731 429 | 372555541090914 430 | 557501220916049 431 | 152388003125524 432 | 503071765543208 433 | 81870009522632 434 | 211885437866284 435 | 258571461747178 436 | 333787545364338 437 | 205130223748567 438 | 290768088265264 439 | 156881022669563 440 | 27804301778771 441 | 348294257582613 442 | 131030045571668 443 | 285602580118790 444 | 75119747071847 445 | 401532874932624 446 | 314618332885921 447 | 62997781168642 448 | 552792113314470 449 | 461471010352413 450 | 297374902590684 451 | 275519269680382 452 | 370386053571208 453 | 23839919083069 454 | 468760519526838 455 | 315094195065112 456 | 117715533624656 457 | 143632265495819 458 | 376424973199914 459 | 262608864652904 460 | 246062263960219 461 | 6898387518084 462 | 519707650671622 463 | 456947523642653 464 | 366779693732820 465 | 507164642676874 466 | 96884771880811 467 | 11122764725266 468 | 515267898264174 469 | 380065585980399 470 | 452575848430211 471 | 240482308690325 472 | 39576218907177 473 | 510875730126305 474 | 88512317366231 475 | 335186784330328 476 | 80783320333200 477 | 67007607704740 478 | 210695888326077 479 | 16536557169736 480 | 432301480607082 481 | 317668993004975 482 | 80153706387587 483 | 498414560820325 484 | 74578142639726 485 | 30196287184631 486 | 275789104965584 487 | 240378501306607 488 | 431460359997740 489 | 417011990839685 490 | 215578543220627 491 | 32709171004213 492 | 292737593885832 493 | 461008711810256 494 | 556917871087899 495 | 223721246968069 496 | 350939530261087 497 | 328345825745126 498 | 215721579664152 499 | 248452348080741 500 | 250329953674362 501 | 174822905694862 502 | 134217280164375 503 | 240882478208243 504 | 345858223545654 505 | 35029361287450 506 | 123113337407507 507 | 451150810892385 508 | 236494144316371 509 | 396350167149513 510 | 508793681869523 511 | 56839638013277 512 | 560809427217711 513 | 375707964766612 514 | 472585075833800 515 | 198339621247117 516 | 264996059965694 517 | 358147427394715 518 | 171988328574497 519 | 96150061555819 520 | 93937033685336 521 | 369257567739693 522 | 291101245049473 523 | 498657366369485 524 | 448939342029917 525 | 285164275687791 526 | 350908254949443 527 | 218091925080452 528 | 247921853841041 529 | 294019322656268 530 | 220552937822748 531 | 313595265558013 532 | 415052666127931 533 | 394367315060073 534 | 324330453931484 535 | 288194892864883 536 | 213075273243682 537 | 166480075284077 538 | 325778316252400 539 | 155489369941134 540 | 349680109382531 541 | 296422522284231 542 | 409907407456930 543 | 83417200411660 544 | 166095152768177 545 | 154835272471645 546 | 32712047959735 547 | 383818029128818 548 | 238166142088792 549 | 186913719351131 550 | 456903917619245 551 | 265191680307956 552 | 319111124251894 553 | 284414975991865 554 | 425932306976740 555 | 216236700915946 556 | 557385237992664 557 | 403425650684411 558 | 283997597176832 559 | 55579333075199 560 | 318020871415888 561 | 200228109492166 562 | 296655098339187 563 | 16996775540635 564 | 208121181557928 565 | 401073406789747 566 | 412422536125439 567 | 379727783521093 568 | 406672500847881 569 | 179174339770313 570 | 517613216630799 571 | 239056643306859 572 | 176906365419640 573 | 484395225479400 574 | 279777619867269 575 | 357958381069277 576 | 417491654449332 577 | 240274578669350 578 | 301413750044611 579 | 94707912772754 580 | 293930635102063 581 | 490456137475267 582 | 440731973362928 583 | 340273992802017 584 | 313804462146733 585 | 503543762587819 586 | 152841817935631 587 | 487293398292468 588 | 83922374177266 589 | 541845042819808 590 | 205378294790096 591 | 211820610984486 592 | 77117836569753 593 | 444322342827293 594 | 209155116810596 595 | 392890573346357 596 | 126977574801094 597 | 81472205138951 598 | 517282944352611 599 | 381930692449069 600 | 542666511397686 601 | 105655058806668 602 | 468200498345290 603 | 561916881421372 604 | 341934874547567 605 | 84636835141818 606 | 79312527077777 607 | 239357713268256 608 | 111596028129697 609 | 489403497768126 610 | 42294485326168 611 | 95152989575418 612 | 1007718178712 613 | 142469375524306 614 | 93653124358833 615 | 440664035803711 616 | 144804053881937 617 | 443676033507910 618 | 111441602482088 619 | 316269038112908 620 | 451634878298616 621 | 299021010977914 622 | 547664011121571 623 | 451892493693703 624 | 294143318287822 625 | 200308472294633 626 | 130572931569738 627 | 441289859605114 628 | 489730151228873 629 | 115676285844052 630 | 491279558323947 631 | 30045618747251 632 | 432507101934226 633 | 321745500119311 634 | 193498371250269 635 | 435018889244505 636 | 334882554994310 637 | 107990588237584 638 | 392170290770899 639 | 19039242194436 640 | 181627576414337 641 | 177357075663931 642 | 229012786501417 643 | 307568421027789 644 | 73842195679883 645 | 453444601140508 646 | 344031518646220 647 | 217600506703166 648 | 340536721177261 649 | 416483885715587 650 | 269526052845532 651 | 526472626383532 652 | 68287545974861 653 | 61485826968376 654 | 459920913784971 655 | 65494683328966 656 | 203144837494108 657 | 350410967736888 658 | 416166924147162 659 | 430292122063242 660 | 513790552839545 661 | 218160643598194 662 | 352874148654545 663 | 547083408362130 664 | 297413365163219 665 | 521237318963878 666 | 524538563067347 667 | 499450711326135 668 | 479438893432288 669 | 439558945434781 670 | 343749887863485 671 | 14960681651547 672 | 422199000291398 673 | 215784286951601 674 | 371376343671853 675 | 153287413641055 676 | 436885478978941 677 | 43392191437902 678 | 293878433245302 679 | 257646411382877 680 | 246948699957203 681 | 376089157170430 682 | 325504344936315 683 | 79133834147372 684 | 188090739645597 685 | 481591890167850 686 | 13144700673487 687 | 310578809113857 688 | 493951471886359 689 | 106583499929184 690 | 29643705692251 691 | 514972136093797 692 | 164756494230418 693 | 305145015898426 694 | 538295545305941 695 | 234384035670418 696 | 189427986433608 697 | 244873436634215 698 | 400966549718784 699 | 10618382900398 700 | 17998098784697 701 | 102050603415967 702 | 149385846511569 703 | 326267516105989 704 | 176179270570047 705 | 513642529813726 706 | 298407163492824 707 | 67017021205417 708 | 246920733529991 709 | 113282463614384 710 | 287017430069768 711 | 413694514080859 712 | 227278813128810 713 | 221887140419688 714 | 99895695863890 715 | 93141147025100 716 | 285459451955638 717 | 522812623958652 718 | 374434414725157 719 | 183453141927904 720 | 26514274357527 721 | 220304713403134 722 | 59101440477878 723 | 89563776179972 724 | 360203728357757 725 | 482018375274779 726 | 339343764049712 727 | 496303194212197 728 | 311039076725515 729 | 177429663212140 730 | 381055413100774 731 | 470885828125405 732 | 323657369714087 733 | 526323487154120 734 | 536112943270992 735 | 273245339708907 736 | 330754676209077 737 | 143663457069621 738 | 543549791032826 739 | 379042769132610 740 | 304410074510063 741 | 12022883817604 742 | 30238363448369 743 | 89483601254219 744 | 395689780936522 745 | 436801155537040 746 | 126012650630226 747 | 18324032437011 748 | 355287423301498 749 | 537459643610517 750 | 312825041543194 751 | 507846877747084 752 | 551234682552723 753 | 388280786400349 754 | 318816874696061 755 | 288378669889418 756 | 494362994575467 757 | 202671028370933 758 | 34114585486362 759 | 390517238800402 760 | 16788001515565 761 | 58538590620658 762 | 419197192604935 763 | 424123798667052 764 | 65501542242384 765 | 260879053654449 766 | 333834699963421 767 | 347111726436329 768 | 414851483801395 769 | 537212295681324 770 | 270809253553794 771 | 230072508355085 772 | 220490648479321 773 | 400174715699902 774 | 132441132080223 775 | 262185018497838 776 | 350245481646558 777 | 7839316797482 778 | 482729855859870 779 | 401559526806260 780 | 414299998583026 781 | 288358501764291 782 | 294564372612276 783 | 205395417053710 784 | 320819875316431 785 | 37041059031616 786 | 357394590373884 787 | 66862365833040 788 | 200053159670903 789 | 249380423486500 790 | 191461740589892 791 | 237140449749872 792 | 170880312555812 793 | 481473869425401 794 | 283654977744011 795 | 358332646773021 796 | 130879705591659 797 | 272828091512896 798 | 137641630507820 799 | 553979488966267 800 | 398845727727723 801 | 461049770550671 802 | 492091980880987 803 | 461749500859101 804 | 540597428031472 805 | 429774770346942 806 | 98422906651659 807 | 272516986196145 808 | 276927721179541 809 | 173828552300326 810 | 266824115830760 811 | 317305288992716 812 | 431604347619275 813 | 206575756778527 814 | 225895180926585 815 | 101661185603501 816 | 25589680222352 817 | 102752258743092 818 | 404319560501707 819 | 517795204507253 820 | 282088338800457 821 | 551920675768461 822 | 175360040933550 823 | 299212317732530 824 | 199383538624758 825 | 335760527654943 826 | 544776926938931 827 | 363387653802042 828 | 54476558645188 829 | 180902644299991 830 | 523079497138517 831 | 163626795250372 832 | 338711295048915 833 | 85166836187215 834 | 371774785872394 835 | 51718564394311 836 | 237829625747067 837 | 286666217885219 838 | 509507226722718 839 | 464545366615128 840 | 93573478915189 841 | 499024143405464 842 | 98646751643598 843 | 486191535447760 844 | 374197686480296 845 | 426833257273032 846 | 57422717313044 847 | 95603241454511 848 | 4516836989360 849 | 115719241901582 850 | 181985574816445 851 | 170627941026887 852 | 12672497118282 853 | 179984205508285 854 | 194314862352132 855 | 40548194158172 856 | 497278681189513 857 | 75725127106805 858 | 105331161660563 859 | 433867595032042 860 | 1953646611773 861 | 155346205132756 862 | 205513639386312 863 | 263565890727447 864 | 315814688701415 865 | 194418842364597 866 | 454551870075903 867 | 374650566360159 868 | 140488873480059 869 | 178397489394003 870 | 185547364501232 871 | 454126514994914 872 | 319670473060480 873 | 90264610207655 874 | 375973057302640 875 | 400389674682784 876 | 299407475714292 877 | 329044902878432 878 | 139825709035445 879 | 358278770997841 880 | 370103991063312 881 | 365203157780430 882 | 24552172457308 883 | 133049702964314 884 | 510886594875209 885 | 281190707773110 886 | 105963119392437 887 | 441640933652841 888 | 103570001708656 889 | 348258535164439 890 | 474731764449753 891 | 302013947840331 892 | 377858929819581 893 | 403099154408997 894 | 555612707283891 895 | 330258136548723 896 | 7695765369132 897 | 97378255722024 898 | 23449191527732 899 | 181506790942204 900 | 401458446171890 901 | 282626255814799 902 | 144573379978142 903 | 507350467787272 904 | 172311785634661 905 | 355411294213716 906 | 69487579600777 907 | 357657111201980 908 | 51371640058874 909 | 203930555546730 910 | 80250212637349 911 | 291965393014134 912 | 341172887358634 913 | 485855797076091 914 | 166665115213349 915 | 528355824305966 916 | 184325251026316 917 | 19983099684937 918 | 160985912543960 919 | 377653768748677 920 | 319514399343559 921 | 436517440983553 922 | 483226421223661 923 | 129061074466172 924 | 291992026400302 925 | 500239696051722 926 | 509716547884012 927 | 145432051446715 928 | 214083049940538 929 | 405847455400102 930 | 146447056468874 931 | 475038974548270 932 | 519474039296228 933 | 313004039443585 934 | 148635510159537 935 | 391110617199044 936 | 478097500459091 937 | 285485084713222 938 | 347434999246050 939 | 285066404901153 940 | 254524503903103 941 | 353628901863520 942 | 506886489976558 943 | 321480646320606 944 | 25787189734344 945 | 398885175578154 946 | 422345813407160 947 | 52646680819463 948 | 329146771413510 949 | 441683668690127 950 | 293832357457654 951 | 530472198381059 952 | 40107657162319 953 | 44076771638668 954 | 438249889286902 955 | 269379366522590 956 | 393909971988212 957 | 251275126528820 958 | 363620437833979 959 | 199260987466840 960 | 144566647687592 961 | 152579101721717 962 | 298531745895069 963 | 381473207197081 964 | 443410251738047 965 | 414798292082392 966 | 164112185795864 967 | 254492527358178 968 | 542787466585923 969 | 296676779288601 970 | 330598594016222 971 | 99100385512138 972 | 452761864235589 973 | 325274993759104 974 | 7547035422405 975 | 274277711017281 976 | 59241420424476 977 | 92187145530691 978 | 269231109160632 979 | 129864511323874 980 | 540486657779063 981 | 492725603387367 982 | 227528943569201 983 | 148282931747290 984 | 311764428562350 985 | 226909020122510 986 | 364405901747744 987 | 259368025896797 988 | 50956572683968 989 | 79033034285850 990 | 447022452733341 991 | 280584850372240 992 | 189638243744760 993 | 64094079730686 994 | 465942157179560 995 | 141747491714634 996 | 27606853738052 997 | 522618445798649 998 | 490279714396126 999 | 348475561962545 1000 | 207251460443187 1001 | 305859538312248 1002 | 456950955685375 1003 | 56655420529317 1004 | 297338975266888 1005 | 423542016502081 1006 | 50415523503952 1007 | 167289867834194 1008 | 202356624374107 1009 | 91418323004458 1010 | 526110140910066 1011 | 280161122461208 1012 | 428016458248140 1013 | 292383028453639 1014 | 420563531416994 1015 | 561820245116236 1016 | 118118755396031 1017 | 487075585958371 1018 | 357696842572812 1019 | 96025632566093 1020 | 244697173123854 1021 | 288356563313803 1022 | 321067740791582 1023 | 335281225660731 1024 | 319068844561090 1025 | 462242088101597 1026 | 175724787340889 1027 | 387831795654202 1028 | 344438992081254 1029 | 333325927111420 1030 | 131566805906490 1031 | 84979777871811 1032 | 294026692338952 1033 | 300490697907530 1034 | 233133182204784 1035 | 154684048884762 1036 | 391410052499278 1037 | 490445962416062 1038 | 177865047540387 1039 | 389201535364883 1040 | 162639535909546 1041 | 273032243579899 1042 | 263247316208197 1043 | 523358037743508 1044 | 448005429638952 1045 | 492498204596830 1046 | 418010634156251 1047 | 12966222535642 1048 | 523814102652620 1049 | 369265015176339 1050 | 104060274751208 1051 | 328282237021403 1052 | 260858834141323 1053 | 149467933901845 1054 | 130695568586557 1055 | 105176558282028 1056 | 551033388082198 1057 | 528021043422781 1058 | 482968693309320 1059 | 542617962307887 1060 | 361561484935496 1061 | 494684066378666 1062 | 554208294062960 1063 | 306502401158261 1064 | 478639860144457 1065 | 524442025564714 1066 | 436211755916173 1067 | 107566724799852 1068 | 141365528626947 1069 | 478660827644216 1070 | 219070292812851 1071 | 485681638525756 1072 | 371295649326448 1073 | 352118685932220 1074 | 481632006019008 1075 | 46490709529071 1076 | 31445974305713 1077 | 54669262572303 1078 | 33670350957189 1079 | 393003164785849 1080 | 505692398810043 1081 | 286279065392645 1082 | 125819329709834 1083 | 114228696829852 1084 | 202844725796620 1085 | 236250681152835 1086 | 156758780283980 1087 | 23056475239930 1088 | 263076484180490 1089 | 110189151583857 1090 | 301253539939109 1091 | 90072200146793 1092 | 398780895552612 1093 | 253400843594435 1094 | 64066865844643 1095 | 73918975727011 1096 | 158208841985811 1097 | 423139292553017 1098 | 227871568836896 1099 | 206520111866401 1100 | 516071497209379 1101 | 224775736263959 1102 | 172346744467633 1103 | 223470200650723 1104 | 385806570088547 1105 | 95010289002579 1106 | 171397264406760 1107 | 73209937893712 1108 | 118526387098179 1109 | 218808026553509 1110 | 390975783901676 1111 | 36130924502357 1112 | 144768773950282 1113 | 351845591720861 1114 | 274645794866698 1115 | 301421659800703 1116 | 311031223237984 1117 | 379747823900491 1118 | 235492036133629 1119 | 13121916352364 1120 | 425864852869385 1121 | 396110528761935 1122 | 47222514631789 1123 | 275724411076766 1124 | 489714677185206 1125 | 145587648562462 1126 | 211642587944152 1127 | 233937256210357 1128 | 475056579258143 1129 | 331436678849474 1130 | 143496316738239 1131 | 317193143629524 1132 | 92771285496220 1133 | 230691909360406 1134 | 40780597118362 1135 | 103856612647224 1136 | 117873788534063 1137 | 393162601774612 1138 | 448975521717451 1139 | 475216873692372 1140 | 499997290326112 1141 | 26089748330475 1142 | 346558745610863 1143 | 349375031038093 1144 | 156959104326414 1145 | 27669837333921 1146 | 519311145152920 1147 | 35737115111887 1148 | 301526359056389 1149 | 371386964739174 1150 | 282165333336800 1151 | 453383387190245 1152 | 355168925240524 1153 | 192695632837687 1154 | 313319147023000 1155 | 453844717159748 1156 | 155973001477620 1157 | 429883345949986 1158 | 561754996858933 1159 | 155534080356389 1160 | 201847319909911 1161 | 247442777933441 1162 | 54665953262630 1163 | 352209297938869 1164 | 26773763177990 1165 | 442136566687784 1166 | 35736542206472 1167 | 242948547341741 1168 | 163241688398789 1169 | 304400573702720 1170 | 552370072760928 1171 | 521687442188975 1172 | 238544689721154 1173 | 484587377222063 1174 | 193211187565390 1175 | 124511313236794 1176 | 262368375067965 1177 | 317395700999187 1178 | 118792526402897 1179 | 283157761798523 1180 | 88682142959208 1181 | 426484906378028 1182 | 516565871293352 1183 | 421773823029285 1184 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published 637 | by the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | --------------------------------------------------------------------------------