Skip to content

Instantly share code, notes, and snippets.

@francois-roseberry
Created December 14, 2023 15:03
Show Gist options
  • Save francois-roseberry/e54d64e079f1f71986af4ec6ca1b7ceb to your computer and use it in GitHub Desktop.
Save francois-roseberry/e54d64e079f1f71986af4ec6ca1b7ceb to your computer and use it in GitHub Desktop.
Advent of code 2023 - 13 décembre
function solve(lines) {
console.log(lines)
const blocks = splitBlocks(lines)
console.log('# of blocks: ', blocks.length)
var total = 0;
for (var i = 0; i < blocks.length; i++) {
const summary = summarizeBlock(blocks[i])
total += summary
console.log('Block', i+1, ': summary=', summary, ', total=', total)
}
return total
}
function splitBlocks(lines) {
var blocks = [[]]
for (var i = 0; i < lines.length; i++) {
if (lines[i] === "") {
blocks.push([])
} else {
blocks[blocks.length - 1].push(lines[i])
}
}
return blocks
}
function summarizeBlock(lines) {
const horizontal = findHorizontalSymmetry(lines)
if (horizontal === -1) {
return findVerticalSymmetry(lines)
}
return horizontal
}
function findHorizontalSymmetry(lines) {
var index = 0;
while (index < lines.length - 1) {
if (lines[index] === lines[index + 1]) {
const symmetry = (index + 1)
return (symmetry <= (lines.length-1)/2) ? symmetry * 100 : (lines.length-1)/2 * 100
}
index++
}
return -1
}
function findVerticalSymmetry(lines) {
var index = 0
while (index < lines[0].length - 1) {
if (getVerticalLine(lines, index) === (getVerticalLine(lines, index + 1))) {
const symmetry = (index + 1)
return (symmetry <= (lines[0].length-1)/2) ? symmetry : (lines[0].length-1)/2
}
index++
}
return -1
}
function getVerticalLine(lines, index) {
var line = ""
for (var i = 0; i < lines.length; i++) {
line = line + lines[i][index];
}
return line
}
exports.solve = solve
const functions = require('./functions')
test('given 1 line above of horizontal symmetry', () => {
const solution = functions.solve(['.#','.#'])
expect(solution).toBe(100)
})
test('given 2 lines above horizontal symmetry', () => {
const solution = functions.solve(['##','.#','.#'])
expect(solution).toBe(200)
})
test('given many lines above horizontal symmetry', () => {
const solution = functions.solve(['..','##','#.','.#','.#'])
expect(solution).toBe(400)
})
test('given 1 line to the left of vertical symmetry ', () => {
const solution = functions.solve(['..','##'])
expect(solution).toBe(1)
})
test('given 2 lines to the left of vertical symmetry ', () => {
const solution = functions.solve(['#..','.##'])
expect(solution).toBe(2)
})
test('given many lines to the left of vertical symmetry ', () => {
const solution = functions.solve(['..#..','.#.##'])
expect(solution).toBe(4)
})
test('given many blocks will sum up', () => {
const solution = functions.solve(['..','##','','.#','.#','','##','..'])
expect(solution).toBe(102)
})
test('given first test block', () => {
const solution = functions.solve([
'.#..####..#',
'#....##....',
'..##....##.',
'#..#....#..',
'##..####..#',
'.#..####..#',
'#####..####'])
expect(solution).toBe(6)
})
const readline = require('readline');
const functions = require('./functions')
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
});
const lines = []
rl.on('line', (line) => {
lines.push(line)
});
rl.once('close', () => {
// end of input
console.log(functions.solve(lines))
});
.#..####..#
#....##....
..##....##.
#..#....#..
##..####..#
.#..####..#
#####..####
###.###.#.#
...##......
..#########
###.#......
##....#####
......#..##
###....#...
...##....##
##...#..###
#.#.#.##.#.
......##...
.#..#....#.
#..#..##..#
.#.#.#..#.#
.##...##...
.#.#......#
.#.#......#
.##...##...
.#.#.#..#.#
#..#..##..#
.#..#....#.
......##...
#.#.#.##.#.
#.#..####..
##...###...
#.###.##.##
#...#..##
#.#.#..##
###..##..
#..##.###
..#.#.#..
#####..##
.#....#..
.##....####
...#.###...
.##..#.#.#.
#....#...##
#...###.###
.##.#.#....
.##.#.#....
#...###.###
#....#...##
.##..#.#.#.
...#.###...
.##....####
#.##.#..##.
..#.####..#
....####..#
##..###....
##..###....
..#.#.###..
.#..#.#..#.
#####...#..
.....#####.
...#.#.####
#..#..##.
#..#..##.
.####.#.#
..#..#...
#.###.#..
#.###.##.
..#..#...
.....##........
....####....###
##........##.##
#....##....#..#
#....##....#..#
##........##.##
....####....###
.....##........
##.#....#.##...
##..####..####.
..#...#..#..###
.#........#..#.
#.#......#.#..#
.#.#.##.#.#.#.#
####....#####.#
#####..######.#
...##..##...#..
#..###..###
#..##.##.##
######..###
.##.#.##.#.
.##..####..
.##........
.##........
.##.##..##.
#..#.####.#
.....#..#..
....##..##.
....##..##.
#..#.#.##.#
#....##....#.
.#.##..##.#.#
.#.##..##.#.#
#....##....#.
#.##.##.##.#.
..#.####.#...
####....####.
#..######..#.
###......##.#
..##.##.##...
...#....#...#
##.#...###..#..
#.#...#..#..#..
.#.#..#.##.#...
.#..#.....###..
#.##..###.##...
..#..##.##..###
.##..##.....#..
..##.##.##..#..
#.##.###..#####
#...##.#.#..#..
.##...#..#..###
...###..#.###..
.#....###.#..##
.#....###.#..##
...##...#.###..
.##...#..#..###
#...##.#.#..#..
##.....##
..######.
.....#.#.
.....#.#.
..######.
##..#..##
....###.#
...####..
....#.##.
###.#...#
###..##.#
.###.##.##.
...##..##.#
..#..##...#
.#..#.#..#.
.#..#.#..#.
..#..##...#
...##..##.#
.###.##.##.
#.###.####.
#.###.##.#.
.###.##.##.
...##..##.#
..#..##...#
..#.#....
..#..####
#....####
###.#.##.
....##..#
##.#.####
##....##.
..###.##.
..###.##.
...###..#
##..##..#
..##.#..#
......##.
..#.#....
...######
...##....
....##..#
.####..##
..###..##
.###.##.#
.##......
..#..##..
####....#
.##..##..
##.######
##.#....#
.##.####.
.#.##..##
#..######
.##.####.
.....########..
####...####...#
####...####...#
.#...########..
#.##..##..##..#
##.....####....
...###..##..###
##..##.......
..#.##.##.#..
...##.##...#.
.....###....#
....####.#.##
..##..#..##.#
....##.##.###
...##.#.#..#.
...##.###..#.
....##.##.###
..##..#..##.#
####.##..
####.#..#
#####.#.#
....#.###
........#
#######.#
#####.##.
#..######
#######.#
.#.....#..#
#..#.#.####
#.#..#.....
.##..##.##.
#..####.##.
#..####.##.
.##..##.##.
#.#..#.....
#..#.#.####
.#....##..#
.#####.####
###.#.#####
##.#.#.####
#.######.#.#####.
....##....#.#.##.
####..#####.#...#
#..#..#..###.#..#
####..####..#####
##########.#...#.
####..####.....#.
#.#######........
####..######....#
..##.#..#########
..#.##...#.##..##
.##..#.##.#######
#.#.#.##.........
##.#####.#.##..##
....###..#.#....#
....#.#..#.#....#
####..###
#.#.##.#.
#........
.##.##.##
...#..#..
.##.##.##
....##...
#...##...
.##.##.##
.##.##.##
.##....##
.......#..#....
#.##.###...##.#
#....#.#..#.#..
#....##.##.##..
.#..#...##...#.
#....#......#..
#######.##.####
.#..#.##..##.#.
.####.#....#.##
...#.#.#..#
...#.#.####
##.##..####
##...##.##.
##..#.#....
#.##..#####
..#..#..##.
..#..#..##.
#.##..#####
##..#.#....
##...##.##.
##.##..####
...#.#.####
..##.#.#..#
.#.##.#####
##....#.##.#.
.#.#.........
..#..##.#..##
#......####..
####.###..###
##..#.#....#.
###.##.#..#.#
##.#....##...
.###.........
#.#..#.#..#.#
#.#.#..#..#..
.#..####..###
###..#..##..#
.#...#..##..#
#...##..##..#
#...##..##..#
.#...#..##..#
#.#......#.
..##....##.
..#..##..#.
..#.####.#.
#..#.##.#..
.####..####
.#.######.#
##.#....#.#
..########.
#.#.####.#.
...#.##.#..
#..........
###.####.##
#.###...##.
#####..####
.#...##...#
.#...##...#
......#....#.
#..###......#
.#..#.#....#.
...##.##..##.
.##.#.##..##.
.#..#.######.
######.####.#
#..#...####..
..#.....##...
...##.##..##.
...###.#..#.#
...#.##....##
...#.##....##
.#.###.#..#.#
...##.##..##.
..#.....##...
#..#...####..
..#..####
######..#
.....#..#
###.###..
##.......
...#.###.
##..###.#
######.#.
###.###..
...##.###
....####.
##.##.#..
####.###.
###...#.#
..#.##.#.
..#.##.#.
###..##.#
.#.##......##.#
.######..######
...##......##..
#.#..#.##.#..#.
..#..#....#..#.
.#....#..#....#
#.#..#.##.#..#.
.##..##..##..##
##....####....#
.##############
.#.##.#..#.##.#
..#..#....#..#.
.##..##..##..##
##.####.###....
#...##...###.##
##.####.##..#.#
##.####.##..#.#
#...##...###.##
##.####.###....
##.####.##..##.
#.###.##.#..#..
....##.....#.#.
##.####.##.####
.###..###.###..
##########.#.#.
.########.#..##
#....#####.
#....##.##.
##..#.#.###
#########.#
#########.#
##..#.#.###
#....##.##.
#....#####.
##########.
#.##.#####.
......##.##
#.##.#..#.#
.#..#......
.####.##.#.
#....#.#.#.
#...#..#...#.
#.########.##
.##.####.##.#
.##.####.##.#
#.########.##
#...#..#...#.
#.##....####.
.###....###.#
.##########..
##........###
#.#.#..#.#.##
##..#..#..###
...##..##....
#.########.#.
#.##.##.##.##
.##.#.#....
...#.#.#...
#..##.#.###
#..##.#.###
...#.#.#...
.##.#.#....
.##..#.#...
.##.#..#...
#####.#..#.
#..#.......
...##.#.##.
.#.##.#.##.
.#.##.#.##.
...##.#.##.
#..#.......
#...##....#
..##.##.##.
#...#...##.
..#.#......
......#####
...##......
#.##..#.##.
.#...#.####
#...##.....
##.#.#.#..#
...####.##.
.####...#
.#..##.##
.#..##.##
.####..##
.####..##
.#..##.##
.#..##.##
.####...#
.#.#..#..
...####..
...#.#..#
..#.####.
#.#..#..#
#.##.#..#
##..#.#.#
##...###..###
###.####..#.#
#.##.#####.#.
#.##.#####.#.
#.#.####..#.#
..###...#.###
#.###.#####.#
###..#..##.##
###..#..##.##
#.###.#####.#
..###...#.###
#.#.####..#.#
#.##.#####.#.
#.##.#####.#.
###.####..#.#
......##...
#.....##...
###.#..#.##
.#######.##
#.#.#...###
..##.####..
.####..####
..##.#.#...##..
....#....####..
#......##..#.#.
..#...#.###..##
####.....#...#.
####.....#...#.
..#...#.###..##
#......##..#.#.
...##....####..
..##.#.#...##..
##..##.###..#.#
##..##.###..#.#
..##.#.#...##..
....#..
###.##.
...#.##
..###.#
.####.#
.####.#
..###.#
.#.#.#.######
#.#..#.#..##.
#..##.#..#.##
.#.##.#.#....
####.##..#...
#.#.##.####..
...###...####
...###...####
#.#.##.####..
..#..#..##..#..
##.############
..###........##
##.#.##.##.##.#
...#...####..##
##..#.#.##.#.#.
##.#.#.#..#.#.#
...#.##.##.##.#
##.##.##..##.##
##...#.#..#.#..
..###...##...##
##.#...#..#...#
###..###..###..
..####.#..#.###
##..##......##.
#.#.##.#.###..#..
#.#.##.#.###..##.
##.#..#.##.###...
..........##....#
###########..####
.##.##.##...#..#.
#...##...##.#..##
..##.#..#.#
...#.#..#.#
##.###..###
..####..###
.#.#.#..#.#
#....#..#..
...##....##
.##.######.
#...##..##.
..#........
#..........
.##...##.##..##
####.#.###....#
.#..#####..###.
#..#.#..##.##.#
.#.###.#.##..##
#..#.####..##..
##.#####.##..##
###.....###..##
..#######.####.
..#######.####.
###.....###..##
##.#####.##..##
#..#.####..##..
.#.###.#.##..##
#..#.#..##.##.#
..####.##....
....#.##.###.
#####.##.#..#
.#....#...#.#
#.#.##.###..#
#.#.##.###..#
.#..#.#...#.#
#####.##.#..#
....#.##.###.
..####.##....
..####.##....
#.#####..#.
...##.#.##.
...###.#..#
.#.....#..#
####.###..#
.##...#####
##..#.#####
#..#####..#
#..#####..#
##..#.#####
.##...#####
..#.#####....
#####..#.#.#.
##....#..##..
####.........
####.........
##....#..##..
######.#.#.#.
..#.#####....
...######..#.
##....##.#...
....#.....#..
..##...#.###.
##.#......#.#
####...#..#
####...#..#
.##..######
##########.
.#.......##
#.######..#
#.###.##..#
..#.#.####.#.
##..###..###.
######....###
....#......#.
..###.#..#.##
....#......#.
##...######..
..###########
...#.#.##.#.#
##...#....#..
#..##.####.##
####..#..#..#
..###......##
##..########.
...#..####..#
##.##..##..
...#.......
...#.#....#
###...####.
##..#..##..
..####.##.#
...#...##..
..#####..##
###.#..##..
..#########
...#.######
####..#..#.
.#...#....#
####.......
###.###..##
...#..#..#.
###..##..##
#.####.#..#...#
#########....#.
.#....#.###..##
.#....#.#...#.#
#.####.###.#...
#......#...#.#.
###..####....##
.#....#.##.#.#.
..####..#.##.##
.##..##...###..
..#..#..#.#.#..
#..##..##.#....
#..##..##.#....
..#..#..#.###..
.##..##...###..
..####..#.##.##
.#....#.##.#.#.
.#..##.#...##..
..#.....###....
..#.....###....
.#..##.....##..
#......##.#####
#...#..####....
#.###..#.#...##
#.###.##.....##
..###.###.#.#..
##.#.#....#
.##...#..#.
..#########
#.##.#..#.#
#.#.#######
.###...##..
.###.#.##.#
.###.#.##.#
.###...##..
.##.#...##.##
###.#...##.##
.##.####.####
...#.####.###
#..##.###.###
######.#.#.##
..###...##...
#.....###.###
#.###..#.#...
..###.###....
....#.####...
...#...##..##
#..##.#####..
#....####..
######..###
.####.##.##
##..##...#.
.#..#.##.#.
#.##.#..#.#
.#..#....#.
#.#..##
.##....
#..##..
..#.#..
...#...
...#...
..#.#..
#..##..
.##.#..
#.#..##
..#..##
..###..
.###.##
#..####
##.....
##.##..
.#.#.##
.#...##
##.....
#......
####.#.
.#..###
..#.#.#
#####.#
...####
...####
#####.#
..#.#.#
.#..###
###..#.
#......
##.....
.#...##
.#...##
.#....####...
..###......##
#..##########
#.#####..####
.####.####.##
..###.#..#.##
#.##..####..#
##...######..
#.#..######..
##.#...#....#...#
..###.#.#..#.#.##
#..#..###..###..#
#.#..#..####..#..
...#...#....#...#
..####...##...###
.....#.######.#..
.#.##.########.##
.#.##.########.##
..#..#.######.#..
..####...##...###
...#...#....#...#
#.#..#..####..#..
##.....
#.####.
.###...
....#.#
###.#..
###.##.
....#.#
.###...
#.####.
##.....
##.....
#.####.
.###...
##..##..###
#######...#
.######...#
##..##..###
##..##..###
.######...#
#######...#
##..##..###
#.#..#.#..#
.#...######
#.#...#...#
#.###.#..#.
#..#..##.##
.....#.###.
#...##...#.
.##.#...###
###...#.##.
...##...#....
##.##.####...
#.####.#..#..
.#.##.#.#.#..
.######.#####
###..###...##
##....##..##.
.######.##.##
##.##.##..###
#.####.#.####
.##..##.#..##
.........####
..####...####
#..##..#.##..
.#.##.#..####
#......#..#.##.
##.##.##....##.
.######.##....#
..#..#..####..#
........#......
.#.##.#...##...
.#.##.#...##...
........#......
..#..#..####..#
.######.##....#
##.##.##....##.
#......#..#.##.
#..##.##.#.#.##
#.####.####....
###..###....###
.#.##.#..#...##
#......#..#.##.
...#..#....##
#.#....#.####
..........#..
#..#..#..#.##
##.####.##...
..#...##..###
.#.#..#.#.###
#.#.###.....###
#..#.#.#####..#
..#...###.#..#.
#.##..#.#...#.#
####..#..##.#.#
####..#..##.#.#
#.##..#.#...#.#
..#....##.#..#.
#..#.#.#####..#
#.#.###.....###
##.#.#..#..##.#
.###.####...#..
#..#.#.####.##.
#..#..##......#
#...##...#...#.
#.##...###....#
#.##...###....#
###..###.#.#..#
..####..####..#
########.##....
##.##.##....##.
#.####.###.#..#
#..##..#..#....
#.#.##.#.##....
########.#.#..#
###..###..#....
.######...#.##.
..####..#.#.##.
.##.#..
.##..#.
#..#.##
.##.#.#
.##.###
#..#...
.##...#
.##.###
.##.###
.##...#
#..#...
.##.###
.##.#.#
#..#..#
.##..#.
#..#.##.#..###..#
....####....#.#..
###.####.####....
#..........####..
##........##...##
###.####.###...##
....####.........
#.##..#
...####
...####
#.##..#
.##....
#..####
##..##.
#.#####
#.#.##.
#.##.##
###.##.
####..#
.#.#..#
#..........####
##...##..###.##
....####.......
#.#.####.#.####
#..##..##..##.#
####.##.######.
.#.#....#.#....
#....##....####
#.##....##.#..#
.##.####.##.##.
.##.####.##.##.
...#...##..##
....###..##..
..##.....##..
#...#.##.##.#
####.########
##.#.########
#...#.##.##.#
..##.....##..
....###..##..
...#...##..##
....#.##....#
...##..#.
####.##..
....###.#
####.####
.##.#..##
..###.#.#
....#...#
...#..##.
...#..##.
##.#.#.#.#.###..#
..##....####..###
####.##...#....#.
##..#.###.#.##.#.
...#.#.#..#.##.#.
...###.###.#..#.#
####..###...##...
.....#####......#
..###.#..#..##..#
....####.##.##.##
##..###.#.##..##.
...##..##..#..#..
###.#..####....##
###......#......#
##.##.#..#.####.#
#...####...#..###
.##.##...###.....
.##.#....###.....
#...####...#..###
####.##.#######.#
####...#....#..#.
#.#.#.#####.#####
#.#.#.#####.#####
####...#....#..#.
#.#..#.##..
##.##.##..#
##.##.#####
.##..##.##.
.##..##.#..
##.##.#####
##.##.##..#
#.#..#.##..
.#.##.#.#.#
.##.....#
####....#
#...##.#.
#...##.#.
####....#
.##.....#
.#.#.##.#
#.##.#.#.
..##.#.#.
#....##..#.
..##....##.
..##....##.
#....##..#.
.#..#.#####
########..#
.#..##..##.
##..###.#..
#######.##.
##..##..###
.#..#..##.#
#.#..###.##.#
#....##.##.#.
##..####.###.
#....#..#.#.#
.#..#..##...#
######.....##
.#..#.#..#.#.
..##...#.#...
.####...#....
.####...#....
..##...#.#...
.#..#.#..#.#.
######.....##
.#..#..##...#
#....#..#.#.#
##..####.###.
#....##.##.#.
..#.#####.##.
...##.###.##.
.#.##........
.....#.######
..#.#..##....
#.##.#.#.#..#
.#.#..#.#....
...#..#.#....
#.##.#.#.#..#
..#.#..##....
.....#.######
#.##.....##..
..#...#...###
#.######.....
#.######.....
..#...#...###
#.##.....##..
...#...#...##
#.#.###.###.#
###.....#####
####.#....#..
#.#.######...
#####....##..
#.#..#..#..##
.#.#..#.##.
#.#####....
##.#....##.
##..##.###.
..##.#.#..#
.###...####
#.#..#.#..#
#.#..#.#..#
.###...####
.....###..#.##.
#..##...#######
####.##.##.#..#
##.#.##..#...#.
##.#.##..#...#.
####.##.##.#..#
#..##...#######
.....###..#.##.
.....###..#.##.
#.###...#######
####.##.##.#..#
#....##..
..##..###
##..##...
.#..#.###
.#..#....
######..#
.#..#.###
....##########...
###.#...##...#.##
####...####...###
....####..####...
##..#.##..##.#..#
###.##..##..##.##
..###........###.
...#.#.####.#.#..
##..#...##...#...
##.#..........#.#
##.#..#.##.#..#.#
..##..#....#..##.
..#..#.####.#..#.
...#...####...#..
#.#.###....###.#.
#.##############.
.....#.####.##...
######.####.#####
.#.#####..#####.#
##.##.#....#.##.#
##.##.#....#.##.#
.#.#####..#####.#
#.##.###..#..
#....#.#.####
..##...#.#...
.#..#...#....
#....####....
#.##.#.#...##
.......#.#...
.####...#..##
#.##.#..#####
#.##..#######
.####...##...
.####.#####..
#....##...###
..###.#...##.##
#.##.#.#..##.#.
#.##.#.#..##...
..###.#...##.##
###...##.##.###
#..#.##...##..#
#..#.##...##..#
###...##.##.###
..###.#...##.##
#.##.#.#..##...
#.##.#.#..##.#.
..###.#...##.##
#.##.##..#.#...
##.#...#.#.####
.#......##.##.#
#.##.##
##...##
..###..
#####..
..##.#.
..##.#.
#.###..
..###..
##...##
#.##.##
#.##.##
..#....
###.#..
....##.
...#..#
###.##.
##..##.
...#..#
..#####
....##.
##.....
..##..#
..######...#...
###.......####.
###...##.######
####.###....#..
...#.#.####..#.
...#.#.####..#.
####.###....#..
###...##.######
###.......####.
..######.......
##...#..#######
#..##...##..#.#..
#..##...##..#.#..
...###.##.#..#.##
#.#.####...##....
###..#.####.#..#.
#.#.#.#..######..
#.#..###.###.#.##
#..#.###.####....
.....###.###..###
#.....#..#.##....
.##..#####..#.###
##..##...#####..#
.#..#....#.#.#..#
.#..#.#######....
#.##.#.#....##..#
####.#.....##.##.
#....#.....##....
..........####..#
..##..###..#..##.
#....#...###.....
.#..#..#.#.#.....
.#..#.#.##.#.#..#
##..##..###.##..#
##..###..........
#######..##......
......#.##.######
.####.#####..#..#
#....#...#.##....
.##.######...
....#.....#..
.##.#.###...#
#..#.##.##.##
.##..########
.....#####.##
.##..###..###
#..##.#....##
####.###..#..
......####...
#..##.#....##
.##.##.####..
#..#.#####...
#....##....##....
............###..
###.####.####.###
..##....##....#.#
.#..#..#..#.##.##
#############..##
.............#.#.
############..###
############.###.
....#.....##.....
#..###.##.###..##
##.####..####.###
###..#....#..###.
##...##..##...###
###...#..#...###.
##...######...##.
#..###....###..##
#..###....###..##
#...##..##...##
.#...####...#.#
.#.########.#..
######..#######
...########...#
#.###....###.##
..##########..#
....#....#.....
.#...#..#...#..
#.#..#..#..#...
.#..##..##..#..
#....####....##
#....####....##
##.#.####.#.##...
.##........##..#.
.##........##..#.
##.#.####.#.##...
...#.####.#......
.####.##.####..##
#.#..#..#..#.#.#.
.##..####..##..##
.#.#.####.#.#..#.
.##...##...##....
..##########..#..
##..#.##.#..##.##
.#..#....#..#..#.
#.##########.#..#
###.##.###.######
###..#..#..###...
..##.#..#.##..##.
..####.##.##.##.#
.##.#.####..####.
.#########..#####
#.#..............
...##.#..#..#..#.
####.............
.#.##..##....##..
###....##....##..
....##....##....#
#.##.#.##.#
.####.####.
.####.####.
.#..#.#....
#.##.#.##.#
#....#....#
##..###..##
##....#........
##.#.####....##
..#...##.#..#.#
....#.#........
##..#..###..###
##.#..##..##..#
..#####........
..##..####..###
#.#...##.####.#
####.##.######.
#######..####..
{
"name": "adventofcode",
"version": "1.0.0",
"description": "puzzle",
"main": "index.js",
"scripts": {
"start": "node index.js < input.txt",
"test": "jest"
},
"author": "",
"license": "ISC",
"dependencies": {
"jest": "^29.7.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment