This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Advent2017; | |
import util.AdventOfCode; | |
import util.FileIO; | |
import java.util.*; | |
import java.util.function.Consumer; | |
public class Day16 extends AdventOfCode { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Advent2017; | |
import util.AdventOfCode; | |
import java.util.List; | |
public class Day15 extends AdventOfCode { | |
Generator A; | |
Generator B; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Advent2017; | |
import util.*; | |
import java.math.BigInteger; | |
import java.util.List; | |
public class Day14 extends AdventOfCode{ | |
private BigInteger[] hashes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Advent2017; | |
import util.FileIO; | |
import util.Timer; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.stream.Collectors; | |
public class Day13 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Advent2017; | |
import graph.SearchType; | |
import graph.UGraph; | |
import util.FileIO; | |
import util.Timer; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Set; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Advent2017 | |
import util.FileIO | |
fun hexDistance(x: Int, y: Int): Int { | |
return maxOf(Math.abs(x), Math.abs(y), Math.abs(x + y)) | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Advent2017; | |
import util.FileIO; | |
public class Day11 { | |
enum HexDir { | |
n(0, -1), ne(1, -1), se(1, 0), s(0, 1), sw(-1, 1), nw(-1, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Advent2017; | |
import util.ArrayUtils; | |
import util.BitUtils; | |
import util.FileIO; | |
import util.Timer; | |
import java.util.Arrays; | |
import java.util.stream.IntStream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Advent2017; | |
import util.FileIO; | |
import util.Timer; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class Day9 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Advent2017; | |
import util.FileIO; | |
import util.Timer; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.function.BiPredicate; |