aoc

My solutions for the Advent of Code
git clone https://git.tronto.net/aoc
Download | Log | Files | Refs | README

commit 02ad64a8dba8bdeaee4f8c52b06e1decf5681d48
parent b8ab70840b1568b02685b9416d8746fffe54e695
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Wed, 13 Dec 2023 23:01:17 +0100

Added solution for 13

Diffstat:
A2023/13/13a.c | 42++++++++++++++++++++++++++++++++++++++++++
A2023/13/13b.c | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
A2023/13/example.txt | 15+++++++++++++++
A2023/13/in.txt | 1339+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 1448 insertions(+), 0 deletions(-)

diff --git a/2023/13/13a.c b/2023/13/13a.c @@ -0,0 +1,42 @@ +#include <inttypes.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#define N 64 + +#define MAX(a,b) ((a)>(b)?(a):(b)) + +char *buf, line[N]; +int64_t i, s, nc, nr, r[N], c[N]; + +int64_t ismirror(int64_t i, int64_t a[], int64_t n) { + for (int64_t j = MAX(0, 2*i-n+2); j <= i && 2*i-j+1 < n; j++) + if (a[j] != a[2*i-j+1]) + return 0; + return 1; +} + +int main() { + do { + buf = fgets(line, N, stdin); + if (buf == NULL || line[0] == '\n') { + for (i = 0; i < nc-1; i++) + s += (i + 1) * ismirror(i, c, nc); + for (i = 0; i < nr-1; i++) + s += 100 * (i + 1) * ismirror(i, r, nr); + nr = nc = 0; + memset(r, 0, N * sizeof(int64_t)); + memset(c, 0, N * sizeof(int64_t)); + } else { + for (nc = 0; line[nc] != '\n'; nc++) { + r[nr] = (r[nr] << 1) + (line[nc] == '#'); + c[nc] = (c[nc] << 1) + (line[nc] == '#'); + } + nr++; + } + } while (buf != NULL); + + printf("%" PRId64 "\n", s); + return 0; +} diff --git a/2023/13/13b.c b/2023/13/13b.c @@ -0,0 +1,52 @@ +#include <inttypes.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#define N 64 + +#define MAX(a,b) ((a)>(b)?(a):(b)) + +char *buf, line[N]; +int64_t i, s, nc, nr, r[N], c[N]; + +int64_t onebit(int64_t x) { + while (x % 2 == 0) x >>= 1; + return !(x-1); +} + +int64_t issmudgedmirror(int64_t i, int64_t a[], int64_t n) { + int64_t smudge = 0; + for (int64_t j = MAX(0, 2*i-n+2); j <= i && 2*i-j+1 < n; j++) { + if (a[j] == a[2*i-j+1]) continue; + if (onebit(a[j] ^ a[2*i-j+1])) + smudge++; + else + return 0; + } + return smudge == 1; +} + +int main() { + do { + buf = fgets(line, N, stdin); + if (buf == NULL || line[0] == '\n') { + for (i = 0; i < nc-1; i++) + s += (i + 1) * issmudgedmirror(i, c, nc); + for (i = 0; i < nr-1; i++) + s += 100 * (i + 1) * issmudgedmirror(i, r, nr); + nr = nc = 0; + memset(r, 0, N * sizeof(int64_t)); + memset(c, 0, N * sizeof(int64_t)); + } else { + for (nc = 0; line[nc] != '\n'; nc++) { + r[nr] = (r[nr] << 1) + (line[nc] == '#'); + c[nc] = (c[nc] << 1) + (line[nc] == '#'); + } + nr++; + } + } while (buf != NULL); + + printf("%" PRId64 "\n", s); + return 0; +} diff --git a/2023/13/example.txt b/2023/13/example.txt @@ -0,0 +1,15 @@ +#.##..##. +..#.##.#. +##......# +##......# +..#.##.#. +..##..##. +#.#.##.#. + +#...##..# +#....#..# +..##..### +#####.##. +#####.##. +..##..### +#....#..# diff --git a/2023/13/in.txt b/2023/13/in.txt @@ -0,0 +1,1339 @@ +#.###.##..#.... +.#.###.....#### +...##...###.##. +...######..#..# +##.#..#.##..##. +.#.##..#....##. +##..##.#...#### +.####..##.##### +#.####.#....##. +..#.###.#..#..# +##...####...##. +##...####...##. +..#.###.#..#..# +#.###..#....##. +.####..##.##### + +##..#.#......#..# +.....#..#.####### +...########...##. +..#.#.#.###...##. +..#.#..#.#.#.#..# +..##...#.##.#.##. +###.####..##.#... +....#..#.#..#.##. +....#.###..##.... +..##.#..##.###### +...##..#.#.##.... +...#.#..#........ +###....##..###### +..#...##..##.#..# +..#.......#...##. + +#####.### +.#.###..# +##...##.# +....###.# +....###.# +##...##.# +.#.###..# +#####.### +..##.#.## +###...##. +.##.#.### +.##.#.#.# +###...##. + +..###...##### +#######..#..# +########.#..# +..###...##### +##.###..##### +#.....###.##. +#..###..##..# +.#.#.##...##. +.#.########## +..###.###.##. +####..#.#.... +##.##.....##. +###...##..... +...#.#.##.... +.##..#.#.#..# + +#......#... +.#.#.##.... +##..####.## +...##....## +..#...##... +#..#....... +##..#.#..## +###..#.#### +###..#.#.## + +..#......#... +###.####.#### +.#..#..#.##.. +.#..#..#..#.. +##..####..### +##..####..### +.....##...... +.###.##.###.. +##..####..### +#.########.## +.##......##.. +.#..#..#..#.. +#...####...## + +#....##.#..#.## +.#..#.##.####.# +.#..#.##.####.# +#....##.#..#### +#.##.#..#.####. +......#..#....# +.#..#...#..##.# +.#..#.###.##.## +..##...##...#.# +......#.####.#. +#.##.#..#...... +..##...###.#.#. +......#..##.#.# + +..##.###### +##.....#..# +..#.###.##. +#.###..#### +.##.#..#..# +.##....#..# +#.###..#### + +...#.####.# +##.#..##..# +##......... +..##..##..# +##..#....#. +##....##... +..#........ +##..#.##.#. +...#......# +...#.###..# +...######## +####..##..# +..#.##..##. +###..####.. +..#.######. + +##.....###... +##.....###... +##.##.####.## +###..###.##.. +........#..#. +#.#..#.#..##. +##.##.###..#. + +...##.####.#.#. +..####.#...#... +.....##.#.#..## +##.....###.#.#. +######.###.#... +##.##....#.#### +...#.####..#### +..###....##.##. +..###..#...#..# +..###..##..#..# +..###....##.##. +...#.####..#### +##.##....#.#### +######.###.#... +##.....###.#.#. + +##.#####.####.. +..#.##..#.##.#. +..#.########... +###.###.###.... +...#####.##.#.. +##.#..#..#...#. +...##....#..#.. +##..##...##.##. +##..##..####.#. +##....#.#.##..# +###...#.#.##..# +##..##..####.#. +##..##...##.##. + +...#.##.##.##.#.. +#....#..##..#.... +.#..#.##..##.#..# +.#..#.##..##.#..# +#....#..##..#.... +...#.##.##.##.#.. +####.##....##.### +.#.##........##.# +######.#..#.##### +#.##...#..#...#.. +.#.#....##....#.# +....#.#.##.#.#... +##..###.##.###..# +#.#.#.#....#.#.#. +.######....###### + +..#..###. +..#.#.### +..#...### +.##....## +....#.#.# +####.##.. +####.##.. +....#.#.# +.##....## +..#...### +..#.#.### + +....##.## +#.##..... +###....#. +###....#. +#.##..... +....##.## +#.#..#### +#.#.....# +.##.#.#.# +##...#.#. +##...#.#. +.#..#.#.# +#.#.....# +#.#..#### +....##.## +#.##..... +###....#. + +###.#........ +#.#.#.#.##.#. +##.##.#.##.#. +..##.#.#..#.# +.##...#....#. +.#...##.##.## +.#...##.##.## +.##...#....#. +..##.#.#..#.# +##.##.#.##.#. +#.#...#.##.#. +###.#........ +#.....#.##.#. + +#.##..###..#### +.##...#..###..# +.##...#..#.#..# +.#.######..##.# +#....##.###.### +.###..#.##.##.. +...#.#.##..#... +#.........###.# +###.#.....##..# +###.#.....##..# +#.........###.# +...#.#.##..#... +.###..#.##.##.. +#....##.###.### +.#.######..##.# +.##...#..#.#..# +.##...#..###..# + +.....######.... +..#.#..##..#.#. +##.#........#.# +###....##....## +##.....##.....# +..############. +..#...#..#..... + +##...## +#..###. +#...#.# +#...#.# +#..###. +##...## +###.##. +#.#..## +..##..# +.#..#.. +#.##..# +#....#. +#....#. +#.#...# +.#..#.. + +#..##.###.. +.##....#.#. +......##.#. +#..#.###.## +######..... +######..... +#..#.###### + +...##..##.#..###. +..#.#..#.#....##. +####.##.####....# +.##.#..#.##..#..# +.#.#....#.#...### +##..####..###..#. +##..####..###..#. +.#.#....#.#...### +.##.#..#.##..#..# +####.##.####....# +..#.#..#.#....##. + +####.#... +...#.#### +##...##.. +###.#.... +..#.#.#.. +###....## +####.#### +..##.#..# +##.###..# +.#.#..#.# +###.###.. +###.#.### +######.#. +..#.#.### +####....# +####....# +..#.#.### + +#..##..##..##..## +##.#....####....# +##.######..###### +...######..###### +#..#.##.#..#.##.# +#####.########.## +###..##..##..##.. + +###....#### +####...##.# +##.##.##..# +####..##..# +##.##.#.##. +##.###.#### +####.###### +####.#..##. +.....#.#..# + +..##.#... +..##.##.. +..#..##.# +##.###### +..#.#..#. +##.#.#.## +...##..#. + +....###..###... +.....##..##.... +..##..#..#..##. +...###....###.. +##.##########.# +##.........#..# +####.#....#.### +..#.###..###.#. +##....#..#....# + +.....#.#.####.# +#....##.#..#..# +##..##.#.....#. +#....####...... +..##..##..#.... +.####.#####.##. +##..##.##.##.## +##..##.#.....#. +######.##.###.# +..##..#.##..#.# +..##..#.##..#.# +######.##.###.# +##..##.#.....#. + +.#####...#. +.#..####..# +#####.##.## +#.#.##.###. +.###..####. +#.##....... +..##.##.... +..##.##.... +#.##....... +.###..####. +#.#.##.###. +.####.##.## +.#..####..# +.#####...#. +##.....#### +.#.#..###.. +.#.#..###.. + +#.#.##..... +#..#####..# +..#..#..... +..#..#..... +#..#####..# +#.#.##..... +#......#### +##.#.#..##. +.#.####...# +..###.#.... +..#...##### +....####..# +#.#.####..# +#..####.... +#.#.#.##### +#..#.#..... +...#.###### + +##..##........# +..##..#..#.#.#. +..##..#..#.#.#. +##..##........# +.####.#.#.#.... +..##.....##..## +#....######.#.. +.####....##.#.. +.####.#.#...#.# +######.###.#..# +.........##.... +.####.#..###..# +########..#.... +.####......#..# +........#####.# +#...###.....#.# +......#.....##. + +#..##...##. +###..####.# +####...#### +.##.#..#..# +....##....# +####..#...# +####..#...# +....##....# +.##.#..#..# + +.######.#.. +#..##..#.## +##.##.##... +.######.... +..#..#..... +#########.. +.##..##.... +##.....#.## +..####..... +#########.. +#.####.#.## +.######.... +.##..##.### +#......#... +##....##.## +#......#.## +...##...#.. + +#....###.#.#..# +#....###.###..# +..#..####..#### +.###..##.##.##. +...###.##.#.... +....###....#### +..#..#.#...#..# +.#.####..#..##. +#..#.###..##### +###.#.###..#### +..######..##..# + +###.##.#### +##.####.### +####..##### +##......##. +.#.####.#.. +..#.##.#... +..#.##.#..# +...####.... +##.#..#.### + +.########## +....#...#.# +....#...### +.########## +......###.# +#..#.###.#. +#..#.###.#. + +#######..## +##..##.#### +##..###.### +.#..#.###.. +..##....... +....#.##.## +..##...##.. +.#..#.#.#.. +..##..##.## +.####.###.. +#....###### +......#.#.. +######.#... + +..#..#.##..## +###.#...#..#. +..####.###### +...#...#.##.# +#..#.#....... +#.#..##..##.. +#.###........ +#.#.#........ +#.#..##..##.. + +...####..#..#.# +###....#..#..## +.#....#.#.#.### +.#.....#....... +#.##...##.#..## +####..#......## +#...#.#.#.#.#.. +#.##.#####..#.. +.....####.##### +.....####.##### +#.##.#####..#.. + +........##... +########...#. +##########... +#########.#.. +#########.#.. +#..##..#.#.## +.##..##..#### +########..#.# +##.##.##.#.#. + +..#...###.####.#. +..#...###.####.#. +#.#......#..#...# +#..#...#######... +##.##...#####.#.# +######...###..##. +#######..###..##. + +##..#...### +..###.#.##. +##.#.#.#.#. +..#.##.#... +####.####.. +####.#.#... +...#..##.## +...#..#.#.. +..####..### +...#.####.# +...######.# + +.##..##....##.. +.##..##....##.# +##########...#. +#.#..#.##..#.#. +##....##.####.# +#.####.#..#.... +#.#..#.#.#..#.. + +####.....#.##.# +..##...#....### +..##...#....### +####.....#.##.# +#...#..##.#..## +#..##.....#...# +#.##....##.##.# +#.##.##..##..#. +.#....##.#.#.## +##.#.#####...#. +##.#.#####..##. + +....#..## +.##...### +....#.... +.##.##.#. +.##...#.# +.##...#.# +.##.##.#. +....#.... +.##...### +....#..## +.###...#. +#..#..... +.....#..# +#..#.#### +........# +######... +####..... + +.#....#.#.#.. +#.####.###.## +.#####..#..## +########.##.. +##.##.##..... +#..##..#...## +#########.#.. +##.##.###..## +.#.##.#...... + +#..###..### +......##... +.....#..#.. +##..#....#. +....##..##. +##.#.#..#.# +..####..### +##.##.##.## +..##.####.# +..##.####.# +....#.##.#. +....#....#. +..#........ +###........ +##.#.####.# + +#....#...#...#.## +.#..#...##..#.... +.####.##..#..##.. +..###.....##..#.. +.####..#..##.#### +..##..###.#.#.### +##..##.#.###.#### +######...#.##.... +#######.....##.## +#....##..#.#..... +.#..#.#...#...#.. + +#.####...## +##..##..#.# +.####...... +..##..#.... +.#..#..#.## +.####.#.... +#....###.#. +##..###.#.. +#.##.##.### +.#..#.##..# +.......#... +.####.#..#. +##..###.... +##..###.... +.####.#..#. + +.##...#..## +..##.#.##.. +#.#..#..### +.#####.#.## +..#..###... +###..#...## +####.##.... +..#..###... +...#.##.... +....#....## +.....#..#.. +####..#.#.. +###.#.#.#.. +#..##...... +#..#.#..#.. +.#.#..#..## +.#.#.##..## + +####..#...#..#. +####.....##..## +#..#.....##..## +#..#.##.#..##.. +#####..###.##.# +...#........... +.##..#...###### +#..#.#.#...##.. +#..##.....#..#. +.....#...##..## +#..####...#..#. +.##...#.##....# +.##.####..#..#. +.....####...... +.....##...#..#. +####.....##..## +####..#.##....# + +...#...##...# +##.##.####.## +##.##..##..## +#######..#### +#######..#### +##.##..##..## +##.##.####.## +...#...##...# +#......##.... +.##.#......#. +#..##.#..#.## +.#.#.######.# +##.#...##.#.# + +.#.###.#. +.######.# +##.#...## +#.##....# +####.#### +#.##....# +#.##....# +#.##.#### +#.##....# +##.#...## +.######.# +.#.###.#. +.#..#...# +.###.#.#. +.###.#.#. + +.....## +......# +#.#...# +.#.##.# +.#.##.# +#.#...# +......# +.....## +.####.. + +.#####.......#..# +#.#.#.#....#....# +...#...#.##....## +######...##.#.#.. +#.#..####...##.## +####....##....##. +####....##...###. +#.#..####...##.## +######...##.#.#.. +...#...#.##....## +#.#.#.#....#....# +.#####.......#..# +.#.##...#.###...# +..####.###..####. +..#.#..#.##.#.... +..#.#..#.##.#.... +..####.###..####. + +.#..#.#.#.#.# +.#..#.#.#.... +..##..#..#.## +##..####...## +##..####...## +..##..#.##.## +.#..#.#.#.... +.#..#.#.#.#.# +#.##.##...#.# +..##...##...# +......##.#.#. +######....... +##..#######.. +#.##.###..... +######....##. + +.###..####.##..#. +..#....##..##.#.# +..#.#.....##.#.#. +..###.##..#..#### +.#.#.#.#.#..###.# +......#########.# +.....##########.# +###..##..######.. +##.###.......###. +##.###.......###. +###..##..######.. +.....##########.# +......#########.# + +#.##... +##.#### +..##... +...#... +##.##.. +.#...## +##...## +.##.#.. +..###.. +.#.#### +#..#... +#####.. +.##.... +.##.... +###.#.. + +#....##..##..## +#.##.#..####..# +##..###.#..#.## +.........##.... +.#..#.##.##.##. +#.##.####..#### +..##....#.##... +.#..#..##..##.. +#.##.##.#..#.## + +###.##....##. +##........... +##.##......## +...##.#..#.## +..####....### +..####....### +...##.#..#.## +##.##......## +##........... +###.##....##. +.####.#..#.## +##.#.#.##.#.# +..##.#....#.# +#...#..##..#. +..#.#..##..#. +##.....##.... +.###.######.. + +#....#.######.#.. +##..##.###.##.##. +.#..#.#.####.#.#. +######.#....#.### +######.#....#.### +######.#....#.### +.####.#......#.## + +.#.#.##....##.# +...#..##..##..# +..###........## +.#...#.####.#.. +..##.##.##.##.# +###...##..##... +..###.##..##.#. +##..##..##..##. +###...#.##.#... +.#..##..##..##. +...###......### +##.###.#..#.### +.####........## +.####........## +##.###.#..#.### + +#.##.####.##. +....##..##... +..#.#....#.#. +.###......### +.###......### +..#.#....#.#. +....##..##... +#.##.####.##. +.#.#..#...#.# +...###..###.. +....######... + +#........##.# +####.#.#.##.. +####.#.#..#.. +#........##.# +.#.##.#..#.#. +.#.##.#..#.#. +#........##.# +####.#.#..#.. +####.#.#.##.. +#........##.# +.....##..###. +##...##.###.. +..#....##.#.# +....##.#..### +.##....#.#.#. +.########.#.# +#.#####..#### + +....#.#..#. +....#.#..#. +.#.###..#.. +..###...... +##...##...# +####.#.###. +..##....... +..##....... +####.#.###. +##...##...# +..###...... +.#.###..#.# +....#.#..#. + +...##.###.##. +#....#..##.## +.#.#..#..##.. +.##....#..##. +###....#..##. +##..#.#.##.## +.#..#..#..#.. +.#..#..#..#.. +##..#.#.##.## +###....#..##. +.##....#..##. + +#.#...#..#...#. +#.#...#..#...#. +...#....#..#..# +###..#.#.####.# +..#.#.##.###... +....###.##.#### +#.####...#.##.# +.##.#...##..#.# +.##.##......#.# +.###.#.#....### +..#......###.## +.#.##...#....## +.#..#..#.#.##.# +.#..##.#.#.##.# +.#.##...#....## +..#......###.## +.###.#.#....### + +#.####.##.. +#..##..#### +#......#### +#.####.##.# +#.####.#.#. +#.####.###. +..#..#..### +#.#..#.##.# +.#....#.### +.##..##.##. +..#..#....# +.#..#.#.#.# +###..###... +###..#####. +###..#####. + +#.##.#.#... +.####..##.. +.#..#..#### +##..###.### +#....###... +#.##.#...## +.#..#...... +.####...### +########.## +#....#..### +.#..#...#.. +##..#.##### +##..###.### + +............### +#.########.##.. +#.#..##..#.#.## +...######...#.. +.##########.#.. +#.#..##....#... +.##......##.... +..#.####.#..... +#..#.##.#..#.## +#..##..##..#.## +.#.######.#.#.. + +#..##..#.#### +#########.##. +#..####.##### +#..##...##### +#######...... +.##.##....##. +#..#..##..... +.##......#... +#..#..#...##. +#########.##. +#..####..#### +########..##. +.##...##.#### + +...##..#### +...##..###. +##.#.#####. +...#.#..### +##...##.... +..#.....##. +..#.##.#.## + +.##..#. +####... +...##.# +.##.#.. +####..# +.##.#.. +....### +....### +.##.#.. + +#.#.....##..##. +.###.##..#..#.# +##.#...#..#.### +.....#........# +##..#.##...#.## +....#..#####..# +##..#.#..#.###. +##..#.#..#.###. +#...#..#####..# +##..#.##...#.## +.....#........# +##.#...#..#.### +.###.##..#..#.# +#.#.....##..##. +#.#.....##..##. + +####...###...#..# +.##.##.#....##..# +.##....##.#.#..## +....##.......##.# +.##.##...#.#.##.. +####..###.#.#.#.. +#..###.##........ +.##..##.#..###... +#..##.#.#..##.... +.#...#.#.#.#.#### +....#....#.#...## +#..####..###..#.# +#..##...###.##... +.##....#.#.#..### +####.###.#...#... +####.###.#...#... +.##....#.#.#..### + +.#...####.####### +.#.#.#..#........ +..#.#...#..##..## +..###.#.#.###..## +###......##.####. +#.####..#...####. +...#####...#...## +#...#..#.#.##..## +##.....#.#..####. +##.....#.#..####. +#...#..#.#.##..## + +..#....#. +..#.###.. +##...#### +.....#... +..#...### +..#.##.#. +..#.##.#. +..#...### +.....#... +##...##.# +..#.###.. +..#....#. +##.....## +..#...##. +####..... +..#.##.## +...#...#. + +#....#...#### +#.##.#.#.#### +######...##.. +##..####..#.. +##..###..##.. +.#..#..#.#... +......###..#. +.#..#.####### +#######.##.## +######..##.## +##..###.###.. +.####.##..#.. +.......##..## + +.#....##....# +.#....##....# +#...#.##.#... +#....####..#. +..#.######.#. +#..#.#..#.#.. +###.#.##.#.## + +#....## +.####.# +.####.. +#....## +#.##.#. +#....## +#.##.## + +..#####.#.###..## +##.#.#..##...#.#. +#..#..#########.# +#..#..#########.# +##.#.#..##...#.#. +..#####.#.###..## +..#.#.###.#.#...# +..#.#...#.#...... +.#####......#.##. +.#..#.###.##..### +.####..##...#..#. +.####..##...#..#. +.#..#.#.#.##..### + +#####...# +#.##..##. +...#.#..# +..##.#.#. +..####.#. +...#.#..# +#.##..##. +#####...# +.......#. +##..###.# +..#.#.#.. +#...#...# +###..##.# +.#..##..# +.#..##..# + +###....#####.##.# +###....#####.##.# +.########..#.#### +...#..#....#.#..# +#.#.##.#.###.#### +.#.####.#.#.##... +#.#....#.#..##... +...#..#..#.#..... +##..##..#####.### +.###..###.#...#.. +..######...##.... +.###..###....#..# +....##.....#####. +#........###.#..# +#...##...##.##### + +###.##. +##.#..# +##.#..# +###.##. +.##.... +.##..#. +#..#### + +######. +###.#.. +..###.# +..###.# +###.#.. +######. +#.#.#.. +..###.# +......# +####..# +##.#### +##.#### +####..# +......# +..#.#.# +#.#.#.. +######. + +...##.......#.#.. +..#..#.#...#..##. +...##.......#.##. +............#.#.# +###########.###.. +#.#..#.##..#...#. +..#..#.......##.. +..####...###..... +..####...###..... +..#..#.......##.. +#.#..#.##..#...#. + +.####...#..## +#.##..####.## +.#####.#.##.. +##..###...### +.##.##.###### +#..#####...## +##.#..#.#.##. +#..#...#...## +.##..#..#.### +#.##....#.### +...#####.#... +#.###.....#.. +#.###.....#.. +...#####.#... +#.##....#.### + +.#.##.#.. +#..##..## +..#..#.## +##.##.### +.#.##.#.. +.######.. +##.##.### + +..##..##..# +.###.#..#.. +....#....## +....#....## +.###....#.. +..##..##..# +#.##..#.#.. +#.##..#.#.. +..##..##..# +.###....#.. +....#....## + +##.#..# +..#.... +...#..# +##..##. +...#### +....##. +...#.## + +#.##.#... +######.## +..##..... +.####..## +.####..#. +.#..#.... +..##..### +#....##.. +......### +#.##.##.. +#....#... + +..#.#......#.#... +###..##..##..#### +.#.##########.#.. +.#...######.#.#.. +.####.#..#.####.. +##.###....###.### +#..##########..## +.###.#....#.###.. +...#.#....#.#.... +###....##....#### +.#...##..##...#.. +###.##.##.##.#### +##.###.##.###.### +####...##...##### +####..#..#..##### +##.#..#..#..#.### +....##.##.##..... + +#..########..## +..#.#....#.#... +#..#..##..#..## +##.#.####.#.### +....##..##..... +##.####.###.### +#.###....###.## +..#.##..##.#... +...##....##.... +.##.#....#.##.. +##....##....### +..#.######.#... +##..######..### + +....#..#. +###.####. +...###### +.#.#.##.# +#.###..## +..####### +#.####### +#.#...... +.#.#....# +#..#.#..# +.####..## +#.#..##.. +#.#..##.. + +..####..##..####. +...##.#.##.#.##.. +..#...##..##...#. +##.##..#####.##.# +....##.#..#.##... +..#.##.#..#.##.#. +##.####....####.# +...##.######.##.. +##.##..#..#..##.# +###.#.######.#.## +##.#.###..###.#.# +....#........#... +..###.#....#.###. + +#.##.#......#..#. +......###.##...## +#....#....##....# +#.##.#...####..## +..##..#.#.#...... +..##...###...##.. +.#..#..###....... + +####.##.#..##.# +..#...##..##### +.##..#.......#. +.##..#.......#. +..#...##..##### +####.##.#..##.# +####...#..#.... +....###.###.### +..###.#.#.##.## +.####.#.######. +.####.#.###.##. +..###.#.#.##.## +....###.###.### +####...#..#.... +####.##.#..##.# + +#####...##..#.. +...#.#.#.#.##.# +.#.####..#.#### +#...##.#.#..##. +....##.#.#####. +##..#....###.#. +#######.....##. +##..#####..#... +##..#####..#... +#######.....##. +##..#....###.#. +....##.#.#####. +#...##.#.#..##. +.#.####..#.#### +...#.#.#.#.#..# +#####...##..#.. +#####...##..#.. + +..#......#..#.... +.###.##.###..#..# +.##..##..##..#### +##.##..##.##.#### +#.##.##.##.##.##. +.##.####.##...... +#..#.##.#..#.#### +..###..###....... +..##.##.##...#..# +.#..#..#..#.#.##. +#..#####...#..##. +##.######.###.##. +.#.##..##.#...##. +##........##.#..# +.##.#..#.##.##..# + +..#.########.#. +...#.######.#.. +##.#.#....#.#.# +##....####....# +..#######.####. +###.#......#.## +##..#..##..#..# + +.#.##.. +.##.### +##.##.. +##..... +..##### +..#.### +###.#.. +.#.#... +....#.. +#..#.## +#....## +..#.### +..#.### +#.#..## +#..#.## +....#.. +.#.#...