Day 3-6 2019
This commit is contained in:
parent
4fef41464e
commit
ae327a4928
64
2019/src/main/java/be/vandewalleh/aoc/Day03.java
Normal file
64
2019/src/main/java/be/vandewalleh/aoc/Day03.java
Normal file
@ -0,0 +1,64 @@
|
||||
package be.vandewalleh.aoc;
|
||||
|
||||
import be.vandewalleh.aoc.geometry.Direction2D;
|
||||
import be.vandewalleh.aoc.geometry.Point2D;
|
||||
import be.vandewalleh.aoc.utils.factory.Days;
|
||||
import be.vandewalleh.aoc.utils.input.Day;
|
||||
import be.vandewalleh.aoc.utils.input.Input;
|
||||
import be.vandewalleh.aoc.utils.input.Lines;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
@Day(3)
|
||||
public class Day03 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
var day = Days.createDay(Day03.class);
|
||||
System.out.println(day.part1());
|
||||
System.out.println(day.part2());
|
||||
}
|
||||
|
||||
private final String[] wireA;
|
||||
private final String[] wireB;
|
||||
|
||||
public Day03(@Lines Input<List<String>> input) {
|
||||
this.wireA = input.getValue().get(0).split(",");
|
||||
this.wireB = input.getValue().get(1).split(",");
|
||||
}
|
||||
|
||||
private List<Point2D> path(String[] wire) {
|
||||
var points = new ArrayList<Point2D>();
|
||||
var point = Point2D.origin;
|
||||
for (var section : wire) {
|
||||
var direction = Direction2D.from(section.charAt(0));
|
||||
var count = Integer.parseInt(section.substring(1));
|
||||
for (int i = 0; i < count; i++) {
|
||||
point = point.translate(direction.point);
|
||||
points.add(point);
|
||||
}
|
||||
}
|
||||
return points;
|
||||
}
|
||||
|
||||
private int part1() {
|
||||
var pathA = path(wireA);
|
||||
var pathB = path(wireB);
|
||||
|
||||
var intersections = new HashSet<>(pathA);
|
||||
intersections.retainAll(pathB);
|
||||
|
||||
return intersections.stream().mapToInt(Point2D::manhattanDistance).min().orElse(-1);
|
||||
}
|
||||
|
||||
private int part2() {
|
||||
var pathA = path(wireA);
|
||||
var pathB = path(wireB);
|
||||
|
||||
var intersections = new HashSet<>(pathA);
|
||||
intersections.retainAll(pathB);
|
||||
|
||||
return intersections.stream().mapToInt(p -> pathA.indexOf(p) + pathB.indexOf(p) + 2).min().orElse(-1);
|
||||
}
|
||||
}
|
||||
81
2019/src/main/java/be/vandewalleh/aoc/Day04.java
Normal file
81
2019/src/main/java/be/vandewalleh/aoc/Day04.java
Normal file
@ -0,0 +1,81 @@
|
||||
package be.vandewalleh.aoc;
|
||||
|
||||
import be.vandewalleh.aoc.utils.factory.Days;
|
||||
import be.vandewalleh.aoc.utils.input.Day;
|
||||
import be.vandewalleh.aoc.utils.input.Input;
|
||||
import be.vandewalleh.aoc.utils.input.Text;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.stream.IntStream;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Day(4)
|
||||
public class Day04 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
var day = Days.createDay(Day04.class);
|
||||
System.out.println(day.part1());
|
||||
System.out.println(day.part2());
|
||||
}
|
||||
|
||||
private final int min;
|
||||
private final int max;
|
||||
|
||||
public Day04(@Text Input<String> input) {
|
||||
var spl = input.getValue().split("-", 2);
|
||||
min = Integer.parseInt(spl[0]);
|
||||
max = Integer.parseInt(spl[1]);
|
||||
}
|
||||
|
||||
private boolean isNotDecreasing(int[] ints) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
int a = ints[i], b = ints[i + 1];
|
||||
if (b < a) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean hasPair(int[] ints) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
int a = ints[i], b = ints[i + 1];
|
||||
if (a == b) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean hasGroup(int[] ints) {
|
||||
var occurrences = new int[10];
|
||||
for (int i = 0; i < 5; i++) {
|
||||
int a = ints[i], b = ints[i + 1];
|
||||
if (a == b) occurrences[a]++;
|
||||
}
|
||||
return Arrays.stream(occurrences).anyMatch(e -> e == 1);
|
||||
}
|
||||
|
||||
private Stream<int[]> intStream() {
|
||||
return IntStream.rangeClosed(min, max)
|
||||
.mapToObj(String::valueOf)
|
||||
.map(String::toCharArray)
|
||||
.map(e -> {
|
||||
var ints = new int[6];
|
||||
for (int i = 0; i < 6; i++) {
|
||||
ints[i] = Integer.parseInt(String.valueOf(e[i]));
|
||||
}
|
||||
return ints;
|
||||
});
|
||||
}
|
||||
|
||||
private long part1() {
|
||||
return intStream()
|
||||
.filter(this::isNotDecreasing)
|
||||
.filter(this::hasPair)
|
||||
.count();
|
||||
}
|
||||
|
||||
private long part2() {
|
||||
return intStream()
|
||||
.filter(this::isNotDecreasing)
|
||||
.filter(this::hasGroup)
|
||||
.count();
|
||||
}
|
||||
}
|
||||
37
2019/src/main/java/be/vandewalleh/aoc/Day05.java
Normal file
37
2019/src/main/java/be/vandewalleh/aoc/Day05.java
Normal file
@ -0,0 +1,37 @@
|
||||
package be.vandewalleh.aoc;
|
||||
|
||||
import be.vandewalleh.aoc.intcode.IntCodeInterpreter;
|
||||
import be.vandewalleh.aoc.utils.factory.Days;
|
||||
import be.vandewalleh.aoc.utils.input.Csv;
|
||||
import be.vandewalleh.aoc.utils.input.Day;
|
||||
import be.vandewalleh.aoc.utils.input.Input;
|
||||
|
||||
@Day(5)
|
||||
public class Day05 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
var day = Days.createDay(Day05.class);
|
||||
System.out.println(day.part1());
|
||||
System.out.println(day.part2());
|
||||
}
|
||||
|
||||
private final int[] input;
|
||||
|
||||
public Day05(@Csv Input<int[]> input) {
|
||||
this.input = input.getValue();
|
||||
}
|
||||
|
||||
private Long part1() {
|
||||
var interpreter = new IntCodeInterpreter(input);
|
||||
interpreter.setInput(1);
|
||||
interpreter.run();
|
||||
return interpreter.getOutputs().peek();
|
||||
}
|
||||
|
||||
private Long part2() {
|
||||
var interpreter = new IntCodeInterpreter(input);
|
||||
interpreter.setInput(5);
|
||||
interpreter.run();
|
||||
return interpreter.getOutputs().peek();
|
||||
}
|
||||
}
|
||||
81
2019/src/main/java/be/vandewalleh/aoc/Day06.java
Normal file
81
2019/src/main/java/be/vandewalleh/aoc/Day06.java
Normal file
@ -0,0 +1,81 @@
|
||||
package be.vandewalleh.aoc;
|
||||
|
||||
import be.vandewalleh.aoc.utils.factory.Days;
|
||||
import be.vandewalleh.aoc.utils.input.Day;
|
||||
import be.vandewalleh.aoc.utils.input.Input;
|
||||
import be.vandewalleh.aoc.utils.input.Lines;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Day(6)
|
||||
public class Day06 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
var day = Days.createDay(Day06.class);
|
||||
System.out.println(day.part1());
|
||||
System.out.println(day.part2());
|
||||
}
|
||||
|
||||
private final List<String> input;
|
||||
|
||||
public Day06(@Lines Input<List<String>> input) {
|
||||
this.input = input.getValue();
|
||||
}
|
||||
|
||||
private final Map<String, String> reverseOrbits = new HashMap<>();
|
||||
|
||||
private int countDirectOrbits() {
|
||||
return reverseOrbits.size();
|
||||
}
|
||||
|
||||
private int countIndirectOrbits() {
|
||||
var count = 0;
|
||||
for (var key : reverseOrbits.keySet()) {
|
||||
count += countIndirectOrbits(key);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
private int countIndirectOrbits(String key) {
|
||||
var count = 0;
|
||||
var currentKey = reverseOrbits.get(key);
|
||||
while (currentKey != null) {
|
||||
currentKey = reverseOrbits.get(currentKey);
|
||||
if (currentKey != null) count++;
|
||||
else return count;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
private List<String> pathToCom(String key) {
|
||||
var path = new ArrayList<String>();
|
||||
var currentKey = reverseOrbits.get(key);
|
||||
path.add(currentKey);
|
||||
while (currentKey != null) {
|
||||
currentKey = reverseOrbits.get(currentKey);
|
||||
if (currentKey == null) return path;
|
||||
else path.add(currentKey);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
private int part1() {
|
||||
for (var line : input) {
|
||||
var split = line.split("\\)");
|
||||
reverseOrbits.put(split[1], split[0]);
|
||||
}
|
||||
return countDirectOrbits() + countIndirectOrbits();
|
||||
}
|
||||
|
||||
private int part2() {
|
||||
var sanPath = pathToCom("SAN");
|
||||
var youPath = pathToCom("YOU");
|
||||
|
||||
var common = new LinkedHashSet<>(sanPath);
|
||||
common.retainAll(youPath);
|
||||
|
||||
String closestCommon = (String) common.toArray()[0];
|
||||
return sanPath.indexOf(closestCommon) + youPath.indexOf(closestCommon);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package be.vandewalleh.aoc.geometry;
|
||||
|
||||
public enum Direction2D {
|
||||
Up(0, -1), Down(0, 1), Right(1, 0), Left(-1, 0);
|
||||
|
||||
public final Point2D point;
|
||||
|
||||
Direction2D(int x, int y) {
|
||||
this.point = new Point2D(x, y);
|
||||
}
|
||||
|
||||
public static Direction2D from(char direction) {
|
||||
switch (direction) {
|
||||
case 'U' -> {
|
||||
return Direction2D.Up;
|
||||
}
|
||||
case 'D' -> {
|
||||
return Direction2D.Down;
|
||||
}
|
||||
case 'R' -> {
|
||||
return Direction2D.Right;
|
||||
}
|
||||
case 'L' -> {
|
||||
return Direction2D.Left;
|
||||
}
|
||||
default -> throw new IllegalArgumentException("Unexpected value: " + direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
13
2019/src/main/java/be/vandewalleh/aoc/geometry/Point2D.java
Normal file
13
2019/src/main/java/be/vandewalleh/aoc/geometry/Point2D.java
Normal file
@ -0,0 +1,13 @@
|
||||
package be.vandewalleh.aoc.geometry;
|
||||
|
||||
public record Point2D(int x, int y) {
|
||||
public static Point2D origin = new Point2D(0, 0);
|
||||
|
||||
public int manhattanDistance() {
|
||||
return Math.abs(x) + Math.abs(y);
|
||||
}
|
||||
|
||||
public Point2D translate(Point2D other) {
|
||||
return new Point2D(this.x + other.x, this.y + other.y);
|
||||
}
|
||||
}
|
||||
@ -1,15 +1,13 @@
|
||||
package be.vandewalleh.aoc.intcode;
|
||||
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.Arrays;
|
||||
import java.util.Deque;
|
||||
|
||||
public class IntCodeInterpreter {
|
||||
private final Deque<Long> outputs = new ArrayDeque<>();
|
||||
private final long[] memory;
|
||||
|
||||
public IntCodeInterpreter(long[] memory) {
|
||||
var copy = new long[memory.length];
|
||||
System.arraycopy(memory, 0, copy, 0, memory.length);
|
||||
this.memory = copy;
|
||||
}
|
||||
private long input;
|
||||
|
||||
public IntCodeInterpreter(int[] memory) {
|
||||
this.memory = Arrays.stream(memory).asLongStream().toArray();
|
||||
@ -23,26 +21,95 @@ public class IntCodeInterpreter {
|
||||
memory[2] = verb;
|
||||
}
|
||||
|
||||
public void setInput(long input) {
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
public long getOutput() {
|
||||
return memory[0];
|
||||
}
|
||||
|
||||
// private ?
|
||||
public Deque<Long> getOutputs() {
|
||||
return outputs;
|
||||
}
|
||||
|
||||
private long readArgument(Mode mode, long param) {
|
||||
switch (mode) {
|
||||
case Positional -> {
|
||||
return memory[(int) param];
|
||||
}
|
||||
case Immediate -> {
|
||||
return param;
|
||||
}
|
||||
default -> throw new IllegalArgumentException();
|
||||
}
|
||||
}
|
||||
|
||||
private void writeArgument(long param, long value) {
|
||||
memory[(int) param] = value;
|
||||
}
|
||||
|
||||
private Mode[] modes(long instruction) {
|
||||
var str = String.format("%5d", instruction).replace(' ', '0');
|
||||
return new Mode[]{
|
||||
Mode.of(str.charAt(2)),
|
||||
Mode.of(str.charAt(1)),
|
||||
Mode.of(str.charAt(0))
|
||||
};
|
||||
}
|
||||
|
||||
public void run() {
|
||||
var pointer = 0;
|
||||
|
||||
loop:
|
||||
while (true) {
|
||||
var optionalOpCode = OpCode.from((int) memory[pointer]);
|
||||
var opCode = optionalOpCode.orElseThrow(() -> new IllegalArgumentException("Invalid OpCode"));
|
||||
var jumped = false;
|
||||
var instruction = memory[pointer];
|
||||
var opCode = OpCode.from(((int) instruction) % 100);
|
||||
var args = Arrays.copyOfRange(memory, pointer + 1, pointer + opCode.params + 1);
|
||||
var modes = modes(instruction);
|
||||
switch (opCode) {
|
||||
case Add -> memory[(int) args[2]] = memory[(int) args[0]] + memory[(int) args[1]];
|
||||
case Multiply -> memory[(int) args[2]] = memory[(int) args[0]] * memory[(int) args[1]];
|
||||
case Add -> {
|
||||
var value = readArgument(modes[0], args[0]) + readArgument(modes[1], args[1]);
|
||||
writeArgument(args[2], value);
|
||||
}
|
||||
case Multiply -> {
|
||||
var value = readArgument(modes[0], args[0]) * readArgument(modes[1], args[1]);
|
||||
writeArgument(args[2], value);
|
||||
}
|
||||
case In -> {
|
||||
writeArgument(args[0], input);
|
||||
}
|
||||
case Out -> {
|
||||
outputs.push(readArgument(modes[0], args[0]));
|
||||
}
|
||||
case JumpIfTrue -> {
|
||||
if (readArgument(modes[0], args[0]) != 0) {
|
||||
pointer = (int) readArgument(modes[1], args[1]);
|
||||
jumped = true;
|
||||
}
|
||||
}
|
||||
case JumpIfFalse -> {
|
||||
if (readArgument(modes[0], args[0]) == 0) {
|
||||
pointer = (int) readArgument(modes[1], args[1]);
|
||||
jumped = true;
|
||||
}
|
||||
}
|
||||
case LessThan -> {
|
||||
var value = readArgument(modes[0], args[0]) < readArgument(modes[1], args[1]) ? 1 : 0;
|
||||
writeArgument(args[2], value);
|
||||
}
|
||||
case Equals -> {
|
||||
var value = readArgument(modes[0], args[0]) == readArgument(modes[1], args[1]) ? 1 : 0;
|
||||
writeArgument(args[2], value);
|
||||
}
|
||||
case Halt -> {
|
||||
break loop;
|
||||
}
|
||||
|
||||
}
|
||||
pointer += opCode.params + 1;
|
||||
if (!jumped) pointer += opCode.params + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
11
2019/src/main/java/be/vandewalleh/aoc/intcode/Mode.java
Normal file
11
2019/src/main/java/be/vandewalleh/aoc/intcode/Mode.java
Normal file
@ -0,0 +1,11 @@
|
||||
package be.vandewalleh.aoc.intcode;
|
||||
|
||||
public enum Mode {
|
||||
Positional, Immediate;
|
||||
|
||||
public static Mode of(char representation) {
|
||||
if (representation == '0') return Mode.Positional;
|
||||
else if (representation == '1') return Mode.Immediate;
|
||||
else throw new IllegalArgumentException("Unsupported Mode " + representation);
|
||||
}
|
||||
}
|
||||
@ -5,7 +5,14 @@ import java.util.Optional;
|
||||
public enum OpCode {
|
||||
Add(1, 3),
|
||||
Multiply(2, 3),
|
||||
Halt(99, 0);
|
||||
Halt(99, 0),
|
||||
In(3, 1),
|
||||
Out(4, 1),
|
||||
JumpIfTrue(5, 2),
|
||||
JumpIfFalse(6, 2),
|
||||
LessThan(7, 3),
|
||||
Equals(8, 3),
|
||||
;
|
||||
|
||||
public final int value;
|
||||
public final int params;
|
||||
@ -15,10 +22,10 @@ public enum OpCode {
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
public static Optional<OpCode> from(int value) {
|
||||
public static OpCode from(int value) {
|
||||
for (OpCode opCode : OpCode.values()) {
|
||||
if (opCode.value == value) return Optional.of(opCode);
|
||||
if (opCode.value == value) return opCode;
|
||||
}
|
||||
return Optional.empty();
|
||||
throw new IllegalArgumentException("Unsupported OpCode " + value);
|
||||
}
|
||||
}
|
||||
|
||||
2
2019/src/main/resources/day03.txt
Normal file
2
2019/src/main/resources/day03.txt
Normal file
@ -0,0 +1,2 @@
|
||||
R1000,U371,R195,U136,R804,U805,L450,U211,R768,U768,L548,U354,L736,U431,L152,U658,L670,D262,L277,U136,L290,U939,R501,U550,L931,D839,R335,D492,L25,U80,R878,U355,R653,U186,R423,D485,L793,D259,L739,U679,R508,D269,R432,D761,R97,D461,L675,U958,L58,U348,L719,D271,R144,U849,R384,U72,L84,U493,R947,U30,L356,D442,R327,U646,R825,U718,L329,D173,L949,D345,L971,D830,L93,U506,R245,D376,R322,D105,L604,D60,R298,D959,L165,D423,R180,D527,R956,D944,R785,U641,L794,D182,R975,D719,L166,U974,L224,U243,L666,U706,R796,D600,L856,D913,L988,D993,L259,U351,R487,D424,L335,U910,L437,D180,R621,D3,R878,D188,R254,D393,L727,U829,R352,U958,L327,D158,L854,D17,R143,D454,R889,D265,L345,U784,R35,D129,R77,U117,R951,D980,L866,U646,R242,D603,L562,U727,L496,U328,L380,D504,R644,U803,L530,D546,R328,D373,L489,U454,R74,D908,R366,U94,R604,D482,L573,D27,R943,U497,L782,D267,L391,U49,R528,D58,R155,D529,R227,D998,R558,D891,R224,U843,R512,U34,R92,U404,R752,U946,L338,D880,L513,D28,L856,D444,L187,U532,L187,U669,L306,U259,R287,D442,R478,U576,R702,U336,L305,U701,L754,D277,R760,D863,L717,U196,L221,U101,L334,D156,L961,D810,L67,D716,L457,D44,L505,D724,R716,D660,L36,D338,R54,U424,R730,U18,L65,D133,R149,U374,R356,D989,R519,U593,L444,D270,R328,U167,L748,D797,L434,U751,R444,D71,R158,D530,L630,U147,R909,D994,L957,U521,L644,D579,R673,U191,R935,U237,R600,D321,L671,U961,L884,U378,R534,D46,R275,U845,R571,U245,L507,U273,R995,U408,L14,D799,L955,D534,R579,D94,R705,D391,R469,D381,R620,U162,R907,D826,R824,U167,L734,U922,L484
|
||||
L1007,D620,R853,U77,L13,U473,L253,D410,R897,U464,L862,U281,L650,D470,R87,D204,L896,U670,L864,D950,L75,D320,R901,D785,L653,D225,L857,U616,L143,U940,L664,U131,L547,D745,R636,U569,L50,U454,R288,D254,L36,U377,L609,U929,L714,U85,L939,U923,L566,D280,R243,U948,R447,D7,R908,D151,R824,D432,R34,D81,L458,U745,L420,D982,L625,U910,L729,D274,R910,U322,L984,D88,L700,D349,L932,U510,R625,U88,L252,U785,L378,D101,R299,U66,L476,U696,R236,D46,R590,U157,R461,U305,L269,D487,L676,U467,R319,D524,R75,U65,L478,U861,L238,D716,R888,D12,L184,D578,R266,D226,L656,D172,L752,U124,L831,U810,L663,U538,R417,D770,L359,U1,R12,U791,L332,U272,R574,D942,L857,U447,R310,U342,L713,D258,R590,D585,R129,D115,R832,D967,R981,D159,R864,U423,R268,U519,L52,D493,R445,D657,R885,U166,R155,D264,R51,D632,R525,D875,R617,U898,L556,D386,L143,U278,L767,D389,R821,U869,R286,D90,R289,U54,R15,D764,R46,D674,R983,U49,R959,U779,R958,D247,R483,U156,L18,U12,L178,U540,L499,U487,L544,D336,R814,U267,R145,D135,L920,D902,L933,D507,L997,U361,L577,U425,L773,D782,R117,U851,R998,U503,R902,U781,L161,U98,L653,U633,L91,U629,L138,D19,R147,D756,R364,D529,L764,U913,L118,U856,R774,D621,R151,U154,R737,D960,R86,U458,R991,D481,R560,D858,R223,D6,R931,D301,R552,D797,R284,U368,L967,D686,R940,U410,R137,D156,L6,U643,L445,D999,R888,D277,L852,U210,L777,D36,R103,D652,R120,D67,L642,D527,R913,D858,R69,D433,R864,U75,L531,U456,L664,D452,R801,U851,L824,D278,L526,U133,R200,U768,R15,U393,R982,U287,L38,D114,R86,U299,L819,D891,R379,D601,L244
|
||||
1
2019/src/main/resources/day04.txt
Normal file
1
2019/src/main/resources/day04.txt
Normal file
@ -0,0 +1 @@
|
||||
272091-815432
|
||||
1
2019/src/main/resources/day05.txt
Normal file
1
2019/src/main/resources/day05.txt
Normal file
@ -0,0 +1 @@
|
||||
3,225,1,225,6,6,1100,1,238,225,104,0,1101,11,91,225,1002,121,77,224,101,-6314,224,224,4,224,1002,223,8,223,1001,224,3,224,1,223,224,223,1102,74,62,225,1102,82,7,224,1001,224,-574,224,4,224,102,8,223,223,1001,224,3,224,1,224,223,223,1101,28,67,225,1102,42,15,225,2,196,96,224,101,-4446,224,224,4,224,102,8,223,223,101,6,224,224,1,223,224,223,1101,86,57,225,1,148,69,224,1001,224,-77,224,4,224,102,8,223,223,1001,224,2,224,1,223,224,223,1101,82,83,225,101,87,14,224,1001,224,-178,224,4,224,1002,223,8,223,101,7,224,224,1,223,224,223,1101,38,35,225,102,31,65,224,1001,224,-868,224,4,224,1002,223,8,223,1001,224,5,224,1,223,224,223,1101,57,27,224,1001,224,-84,224,4,224,102,8,223,223,1001,224,7,224,1,223,224,223,1101,61,78,225,1001,40,27,224,101,-89,224,224,4,224,1002,223,8,223,1001,224,1,224,1,224,223,223,4,223,99,0,0,0,677,0,0,0,0,0,0,0,0,0,0,0,1105,0,99999,1105,227,247,1105,1,99999,1005,227,99999,1005,0,256,1105,1,99999,1106,227,99999,1106,0,265,1105,1,99999,1006,0,99999,1006,227,274,1105,1,99999,1105,1,280,1105,1,99999,1,225,225,225,1101,294,0,0,105,1,0,1105,1,99999,1106,0,300,1105,1,99999,1,225,225,225,1101,314,0,0,106,0,0,1105,1,99999,1008,677,226,224,1002,223,2,223,1006,224,329,101,1,223,223,8,226,677,224,102,2,223,223,1005,224,344,101,1,223,223,1107,226,677,224,102,2,223,223,1006,224,359,101,1,223,223,1007,226,226,224,102,2,223,223,1006,224,374,101,1,223,223,7,677,677,224,102,2,223,223,1005,224,389,1001,223,1,223,108,677,677,224,1002,223,2,223,1005,224,404,101,1,223,223,1008,226,226,224,102,2,223,223,1005,224,419,1001,223,1,223,1107,677,226,224,102,2,223,223,1005,224,434,1001,223,1,223,1108,677,677,224,102,2,223,223,1006,224,449,1001,223,1,223,7,226,677,224,102,2,223,223,1005,224,464,101,1,223,223,1008,677,677,224,102,2,223,223,1005,224,479,101,1,223,223,1007,226,677,224,1002,223,2,223,1006,224,494,101,1,223,223,8,677,226,224,1002,223,2,223,1005,224,509,101,1,223,223,1007,677,677,224,1002,223,2,223,1006,224,524,101,1,223,223,107,226,226,224,102,2,223,223,1006,224,539,101,1,223,223,107,226,677,224,102,2,223,223,1005,224,554,1001,223,1,223,7,677,226,224,102,2,223,223,1006,224,569,1001,223,1,223,107,677,677,224,1002,223,2,223,1005,224,584,101,1,223,223,1107,677,677,224,102,2,223,223,1005,224,599,101,1,223,223,1108,226,677,224,102,2,223,223,1006,224,614,101,1,223,223,8,226,226,224,102,2,223,223,1006,224,629,101,1,223,223,108,226,677,224,102,2,223,223,1005,224,644,1001,223,1,223,108,226,226,224,102,2,223,223,1005,224,659,101,1,223,223,1108,677,226,224,102,2,223,223,1006,224,674,1001,223,1,223,4,223,99,226
|
||||
1062
2019/src/main/resources/day06.txt
Normal file
1062
2019/src/main/resources/day06.txt
Normal file
File diff suppressed because it is too large
Load Diff
@ -20,4 +20,5 @@ java {
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
options.encoding = "UTF-8"
|
||||
options.compilerArgs.add("--enable-preview")
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user