finished day 5

This commit is contained in:
Misaka Mikoto 2020-12-05 09:21:01 +02:00
parent d8dad6eec5
commit 702dba36a6
3 changed files with 976 additions and 0 deletions

908
2020/5 Normal file
View file

@ -0,0 +1,908 @@
FBFBFBFRRR
BBFBFBFRRR
BFFFFFBRRR
BFFFFBBLRR
BBFFBBFLRR
BBFFFFBRLL
BBFBFFBLLL
FBFFBFBRLR
FBFFBFBLLR
FBFBBFFLLR
BFBFBBFLLL
FFFBFFBRLR
FFFBBBFRRR
BBFFFFFLRL
FFFFBBFRLR
BBBFFFFRLL
BBFFBFFRLL
BFBFFFBLRR
FFBBBFFRRL
FBFFFFFLRL
FBFFBBBRRR
BFFFBFFLRR
FFFBBBBLLR
BFFBFFFLLL
BFFBBBFLRR
FBFBBFFRRR
BBBFFBFRRL
BFBBBFFRRR
FFFBFBBLRL
BBFFFBBRRR
FFFBBFFRLR
BFFFFFBRRL
BFFFBBFRLR
FBBBBBBLLR
BFFBBBBLLL
FFFFBBFLRL
FBFBBFBLRR
FBBBBFBLRL
FBBBFFFRLL
BBFBFBBLRL
FBFFBFFRLL
FFBFBFFLRL
BFBFBBBLRR
FFBFFBFLRR
BFBFFBFLRR
BFFBFFFLLR
BBBFFFBLRR
FBFBBBFRRL
FBBFFFFLRR
FFBBBBFLRL
FFFFBBBLRL
FBBFFFBRRR
FBBBFFFRRR
FBFBBFFRLL
FFBBBBFLLR
FBBFFBBRRL
BBFBFFBLLR
FFBBBBFRLR
BBFBFFFLRR
FFFBFBFRLR
BFBBFBFLLR
BFBBBFFRRL
FFBBBFBRLR
BFBFFFFLRL
FBBFBFFRRR
BBFBFBBLLR
BFFBFBBRRL
FFFBFFFRRL
BFFFBFFRRR
FFBBFBBLLL
FBBFFBFLLR
BFBBBBFLRL
BFBFFFFRRL
BBBFBFFRRL
FFBFBFBLLL
FBBBBFBRRR
BFFFBBBLRR
FBFFFBFRLR
BFFBFFFRLL
BBBFBBFLLR
BFBBBFBLLL
BFBFFBFRLR
BBFFFFFRR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FRRR
FFBFFFBLLL
FFBBFBFLLR
BFBFBBFRRL
BBFBFBBLLL
FFBBBBBRLL
BBFFBFFLRR
BBBFBBFRRR
FBBBFBBRLR
FFFFBFBRLR
FFFFBBBLRR
FBFBFFFRLR
BBFFBBFRRL
BFFFBBFRRR
FFBBFBBRRL
FFFBBFFLLL
BBBFFBBRLL
FBBBBBFRLL
BFFBFBFLRL
BBFBBBBRLR
FFFBBFBRLR
FBFBFFFLRR
BFFFFBBLLR
BBBFFBFLLR
BBFBBFFRRR
BFFBFBFLRR
FBFFFBFLLL
BFFFFBFLLL
BBBFBFFRLL
BBFFBFFLLL
BBFBBFFLLL
BFFFBFFRLR
BFFBBBFLLR
FFFFBBBLLL
BFFFBFBLRR
BBBFBFBLLL
FBFFBFBLLL
FBBFBBFLRL
FBBBBFBRLR
BBFBBBBRRL
BFBBBFFLRL
FFBFFBFLRL
FFBFFBBLLL
BFBFBBBLLL
FBBFFFBRRL
BFFBFBBRRR
BFFFFFFRRL
FBBFFBBLLL
BBFBFBFLRR
FFBFFFFLLR
FBFBBFFLRL
FBBFFFFRLL
FBBBBFFLLR
BBBFFBBRLR
FBFFFFBRRL
FFFFBFBRRL
BFFFBFBRLR
BFBBBBFLRR
BBBFFBFLLL
FBFBFBBLLR
FFBFBFBLRR
BBFFBBFRLL
BFBFBBBLRL
BFFFBBBRLL
FFBBBFBLRL
FBFFFBBLRL
FBBFFBFRLL
FFFBFBBRLR
FBBBFBBLRR
FBBFFBBLRR
BFBBBBBRRR
BFBBFBFRRR
BFBFFBFRRL
FFBFBBBRLL
BFBBBBBLRL
BFFBBBFLLL
FFBBBFFLRL
FFBFFBBLLR
FBFFFBFLRL
FBBFBFFLRR
FBBBBBFRRL

34
2020/5-1.c Normal file
View file

@ -0,0 +1,34 @@
#include <stdio.h>
int
main (void)
{
const int hrange = 128;
const int wrange = 8;
int all[1000] = {0};
freopen ("5", "r", stdin);
do {
int hstart = 0;
int hsize = hrange;
int wstart = 0;
int wsize = wrange;
for (int i = 0; i < 7; i++)
{
if (getchar () == 'B')
hstart = hstart + hsize / 2;
hsize /= 2;
}
for (int i = 0; i < 3; i++)
{
if (getchar () == 'R')
wstart = wstart + wsize / 2;
wsize /= 2;
}
all[hstart * wrange + wstart] = 1;
} while (getchar() == '\n');
for (int i = 1; i < 999; i++)
if (all[i-1] && !all[i] && all[i + 1])
printf ("%d\n", i);
}

34
2020/5.c Normal file
View file

@ -0,0 +1,34 @@
#include <stdio.h>
int
main (void)
{
const int hrange = 128;
const int wrange = 8;
int max = 0;
freopen ("5", "r", stdin);
do {
int hstart = 0;
int hsize = hrange;
int wstart = 0;
int wsize = wrange;
int res;
for (int i = 0; i < 7; i++)
{
if (getchar () == 'B')
hstart = hstart + hsize / 2;
hsize /= 2;
}
for (int i = 0; i < 3; i++)
{
if (getchar () == 'R')
wstart = wstart + wsize / 2;
wsize /= 2;
}
res = hstart * wrange + wstart;
if (res > max)
max = res;
} while (getchar() == '\n');
printf ("%d\n", max);
}