started working on the first day

This commit is contained in:
Anish Lakhwara 2018-12-02 02:21:26 +11:00
commit d8049ee7fd
2 changed files with 998 additions and 0 deletions

12
1.exs Normal file
View file

@ -0,0 +1,12 @@
defmodule AdventCode do
def synthesize(input, count) do
'\n' ++ rest = input
IO.puts(rest)
end
end
{File.stream!("input-1"), 0}
|> Stream.map(&String.strip/1)
|> Stream.map(fn ({line, x}) -> x = x + "#{line}" end)
|> Stream.run

986
input-1 Normal file
View file

@ -0,0 +1,986 @@
+13
-12
-14
+19
-13
+16
+12
+19
+8
-10
-9
-2
+1
-13
+10
-7
-11
-10
+1
-14
-15
+16
+6
+17
-19
-13
+5
-19
-12
-10
-12
+13
+14
+3
-13
+3
+17
+10
-16
+19
+1
+11
-16
+3
-16
-12
-7
-11
-6
-19
+6
+12
+15
-7
-18
+13
-4
-14
-7
-18
+17
+9
-12
-3
-13
-16
+14
-4
-12
-10
-3
+8
-10
-4
-10
-11
-14
+11
-7
+17
+19
+2
-13
+17
-10
-6
+15
+7
+15
-3
-7
-6
-1
-13
-5
-6
-6
-12
-18
-7
-19
-5
-15
-7
+4
-18
+5
+17
-2
-12
-1
+3
-11
+10
-13
+10
+17
+15
+16
+16
-7
-17
-11
+10
-15
-13
+2
-6
+3
+9
+2
+20
-14
+22
+6
+14
-3
-15
-7
-16
-2
-20
+3
-21
-13
-14
+3
+17
-18
-14
+13
-11
+14
+18
-16
-17
-5
-3
+10
+2
-14
+18
-3
-8
-14
-10
-5
+11
-15
-3
+1
-17
+7
+17
-15
-17
+19
-15
+12
-10
-16
-13
-5
-6
+4
-3
+11
-15
-16
+3
+14
+9
+6
+14
-5
+1
+16
-3
+9
-14
+6
-17
-12
-13
-2
-4
-19
-9
+17
-18
+9
-5
-14
-14
+18
+19
-16
-13
-3
-1
+6
+6
-10
-3
-4
+21
+10
+6
+4
+23
+17
-13
+15
-3
+13
+4
+11
+17
+8
-1
+10
-15
-8
+1
+14
+13
-7
-11
+9
+17
-11
+7
+18
+17
+3
+5
-13
+4
-13
-4
-22
+14
-24
+3
+26
+19
+20
+4
-12
+11
+2
-12
-6
-20
+9
+2
+10
-4
-10
-20
-5
-5
+8
-7
-27
-16
+6
-12
-16
+6
-20
-14
-8
-12
-18
-19
+3
-16
+3
+1
-16
+11
-1
-4
-16
+4
-6
-7
-12
-9
+15
-3
-4
-10
+15
+10
-7
+9
+6
-4
+2
+20
-14
+18
+11
-6
+1
+1
+1
-13
-7
+3
-12
+11
-17
-9
-12
-1
-8
-16
-1
-14
-6
+18
+16
-4
-15
+9
-10
-18
+11
+2
-10
-1
+10
+20
+7
+13
-1
+14
+18
+16
-7
+22
+11
+13
+6
-9
-8
+14
-20
+18
-15
-16
-1
+12
+12
+12
-20
+38
-10
+17
-4
+21
+12
-19
-12
+4
+20
+16
+14
+12
+16
-9
-17
-13
-7
-16
-24
-9
+2
+1
+7
-13
-48
-15
-3
+6
-21
-10
+8
-20
-16
-4
+13
+15
-11
+19
-43
+10
-34
-15
-17
+16
+10
+1
-3
-9
-19
+1
-18
+9
-14
-13
-17
+19
+1
-12
-18
-11
+2
-18
+8
+1
+6
+7
-17
+5
+23
-8
-18
+17
+5
+1
+10
+10
+9
+12
-18
-12
-15
-3
-11
-18
+12
-16
-21
+6
+6
+4
-7
-21
+14
-5
+4
-7
-17
-17
+14
-2
+15
-7
-14
-7
-7
-2
-6
+10
-9
-20
+15
+17
+8
+16
-2
-4
+10
+8
+3
-27
+14
-20
+4
-24
-14
-2
+22
+21
-17
-21
+6
-8
-25
-12
+19
-14
-4
-9
-7
-40
-30
+37
+51
-84
-56
-14
+35
+12
-123
-18
+14
-71
-35
-18
+1
-11
+15
-13
-12
-19
-16
+14
+6
-17
-11
-18
+92
-24
+10
-22
+16
-22
+3
-21
+2
+30
+31
+8
-2
+1
+19
-23
+7
-112
-15
-16
+10
-15
-49
+43
+7
+250
-39
-80
+1324
+76538
+17
-3
+4
+76
+35
+12
-33
+52
+37
-33
+26
+60
-5
+12
+25
-18
+17
+9
+19
-7
+3
-4
-8
+11
-9
+20
+18
+6
-15
+2
+17
+4
+5
-7
-14
-10
-2
-7
+6
+22
-18
+15
-10
+5
-3
-18
+24
+1
+18
+14
+21
-11
-20
+6
-16
+9
-11
-29
-21
-17
+13
+14
-9
+45
+61
+9
+5
-11
+13
+17
+3
+17
-6
-8
-19
+2
-16
-1
-1
-17
+9
+15
-22
-4
+5
+17
-9
+19
+21
-6
+5
+17
-4
-7
+8
-23
-18
-18
+10
+19
+9
-17
-18
-25
+4
+8
+6
-30
+67
-17
+38
+23
+1
-10
+14
+6
+9
+10
-18
+4
+12
+14
+2
+3
+20
-15
+16
+4
-19
+6
+11
+15
+17
+9
+16
-12
-6
+16
+18
+5
+5
-1
-12
+2
+15
+14
+5
-3
+12
+4
+12
-6
+8
+17
+9
-5
+14
-7
+4
+6
+6
+8
+11
-7
+1
-17
-13
+6
+12
-9
+15
-1
+9
-16
-2
+8
+17
-2
+9
+15
-7
+11
-5
-10
+16
-11
-13
+14
+12
+17
+10
-11
-17
-18
+10
+13
+10
+15
-6
+18
-13
-13
+9
-11
+18
+1
+1
-14
+7
+13
+7
+15
+5
+11
+17
+11
-13
-9
-8
-10
-5
+2
+19
+12
-11
+9
-11
+15
-5
+14
+18
+7
+21
+9
+14
-7
+9
-7
-21
-16
-22
-12
+19
-2
+12
+14
+15
+23
+2
+6
-9
-16
+27
-17
+10
+19
-15
+8
+15
-2
-4
+8
+17
+1
+12
-4
-3
-12
-31
-1
-13
-4
-15
+5
+20
+10
-5
-22
-9
-22
-15
-6
+23
-30
-17
-10
-20
-2
-4
-13
+12
-3
+5
-9
-11
+1
-5
-19
-17
+7
+19
+5
+12
-15
+14
+2
-17
-13
+2
-15
+14
-20
-24
+8
+10
-20
-12
-17
-5
-2
-18
-14
-18
+2
+19
+12
-18
+4
+19
+15
-2
-7
-8
-12
+16
-15
-13
-7
-19
+2
-14
+11
-15
-17
+18
-2
-8
-20
-4
+5
+16
+4
+14
+19
-2
-13
+23
-9
+13
+4
-7
-13
-4
-8
+4
-8
+17
-2
-18
-12
-12
+11
-3
-11
+4
+5
-23
+20
+6
-13
-5
-16
-7
+6
+10
-15
+7
+6
-12
+17
-9
-23
+6
+11
-6
-9
+20
-19
+2
-1
+21
+5
-18
+23
+17
+8
+3
+15
+3
-76719