This file contains hidden or 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
| private static Integer[] temp = {0}; | |
| private static List<Integer> tings = new ArrayList<Integer>(Arrays.asList(temp)); | |
| private static int currentPos = 0; | |
| private static int steps = 370; // Puzzle input | |
| public static void main(String args[]) throws IOException { | |
This file contains hidden or 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
| private static String[] dancers = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"}; | |
| public static void main(String args[]) throws IOException { | |
| List<String> bloccs = Files.readAllLines(Paths.get(new File("res/day16").getPath())).stream() | |
| .collect(Collectors.toList()); | |
| for(String s : bloccs.get(0).split(",")) { |
This file contains hidden or 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
| int count = 0; | |
| long one = 883; | |
| long two = 879; | |
| int mulOne = 16807; | |
| int mulTwo = 48271; | |
| int mod = 2147483647; |
This file contains hidden or 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
| public static void main(String args[]) throws IOException { | |
| String input = "ugkiagan"; | |
| int total = 0; | |
| for (int i = 0; i < 128; i++) { | |
| System.out.println("Yo"); | |
| String inputPlus = input + "-" + i; | |
| String hex = Day10.get(inputPlus); | |
| BigInteger inte = new BigInteger(hex, 16); | |
| total += inte.bitCount(); |
This file contains hidden or 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
| import java.io.File; | |
| import java.io.IOException; | |
| import java.nio.file.Files; | |
| import java.nio.file.Paths; | |
| public class Main { | |
| private static Firewall[] wall; | |
| public static void main(String[] args) throws IOException { | |
| wall = new Firewall[100]; |
This file contains hidden or 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
| public static void main(String[] args) throws IOException { | |
| List<String> bloccs = Files.readAllLines(Paths.get(new File("res/day11").getPath())).stream() | |
| .collect(Collectors.toList()); | |
| String s1 = bloccs.get(0).trim(); | |
| int x = 0, y = 0, distance = 0, goal = 0; | |
| for (String s : s1.split(",")) { |
This file contains hidden or 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
| List<String> bloccs = Files.readAllLines(Paths.get(new File("res/day10").getPath())).stream() | |
| .collect(Collectors.toList()); | |
| String x = bloccs.get(0).trim(); | |
| String[] lengths = x.split(","); | |
| int[] array = IntStream.range(0, 256).toArray(); | |
| int skipSize = 0; | |
| int currentPos = 0; |
This file contains hidden or 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
| public static void main(String[] args) throws IOException { | |
| List<String> bloccs = Files.readAllLines(Paths.get(new File("res/day9").getPath())).stream() | |
| .collect(Collectors.toList()); | |
| String x = bloccs.get(0).trim(); | |
| boolean garbage = false; | |
| int score = 0; | |
| int depth = 0; |
This file contains hidden or 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
| private static HashMap<String, Integer> tings = new HashMap<String, Integer>(); | |
| public static void main(String[] args) throws IOException { | |
| List<String> bloccs = Files.readAllLines(Paths.get(new File("res/day8").getPath())).stream() | |
| .collect(Collectors.toList()); | |
This file contains hidden or 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
| List<String> bloccs = Files.readAllLines(Paths.get(new File("res/day7").getPath())).stream().collect(Collectors.toList()); | |
| List<String> othertings = new ArrayList<String>(); | |
| for(String s : bloccs) { | |
| if(s.contains("->")) { | |
| String[] ting = s.split("->")[1].split(","); | |
| for(String s1 : ting) { | |