about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--day08170
-rw-r--r--day08.k11
-rw-r--r--day08.k411
3 files changed, 192 insertions, 0 deletions
diff --git a/day08 b/day08
new file mode 100644
index 0000000..53f8cdb
--- /dev/null
+++ b/day08
@@ -0,0 +1,170 @@
+rect 1x1
+rotate row y=0 by 5
+rect 1x1
+rotate row y=0 by 5
+rect 1x1
+rotate row y=0 by 3
+rect 1x1
+rotate row y=0 by 2
+rect 1x1
+rotate row y=0 by 3
+rect 1x1
+rotate row y=0 by 2
+rect 1x1
+rotate row y=0 by 5
+rect 1x1
+rotate row y=0 by 5
+rect 1x1
+rotate row y=0 by 3
+rect 1x1
+rotate row y=0 by 2
+rect 1x1
+rotate row y=0 by 3
+rect 2x1
+rotate row y=0 by 2
+rect 1x2
+rotate row y=1 by 5
+rotate row y=0 by 3
+rect 1x2
+rotate column x=30 by 1
+rotate column x=25 by 1
+rotate column x=10 by 1
+rotate row y=1 by 5
+rotate row y=0 by 2
+rect 1x2
+rotate row y=0 by 5
+rotate column x=0 by 1
+rect 4x1
+rotate row y=2 by 18
+rotate row y=0 by 5
+rotate column x=0 by 1
+rect 3x1
+rotate row y=2 by 12
+rotate row y=0 by 5
+rotate column x=0 by 1
+rect 4x1
+rotate column x=20 by 1
+rotate row y=2 by 5
+rotate row y=0 by 5
+rotate column x=0 by 1
+rect 4x1
+rotate row y=2 by 15
+rotate row y=0 by 15
+rotate column x=10 by 1
+rotate column x=5 by 1
+rotate column x=0 by 1
+rect 14x1
+rotate column x=37 by 1
+rotate column x=23 by 1
+rotate column x=7 by 2
+rotate row y=3 by 20
+rotate row y=0 by 5
+rotate column x=0 by 1
+rect 4x1
+rotate row y=3 by 5
+rotate row y=2 by 2
+rotate row y=1 by 4
+rotate row y=0 by 4
+rect 1x4
+rotate column x=35 by 3
+rotate column x=18 by 3
+rotate column x=13 by 3
+rotate row y=3 by 5
+rotate row y=2 by 3
+rotate row y=1 by 1
+rotate row y=0 by 1
+rect 1x5
+rotate row y=4 by 20
+rotate row y=3 by 10
+rotate row y=2 by 13
+rotate row y=0 by 10
+rotate column x=5 by 1
+rotate column x=3 by 3
+rotate column x=2 by 1
+rotate column x=1 by 1
+rotate column x=0 by 1
+rect 9x1
+rotate row y=4 by 10
+rotate row y=3 by 10
+rotate row y=1 by 10
+rotate row y=0 by 10
+rotate column x=7 by 2
+rotate column x=5 by 1
+rotate column x=2 by 1
+rotate column x=1 by 1
+rotate column x=0 by 1
+rect 9x1
+rotate row y=4 by 20
+rotate row y=3 by 12
+rotate row y=1 by 15
+rotate row y=0 by 10
+rotate column x=8 by 2
+rotate column x=7 by 1
+rotate column x=6 by 2
+rotate column x=5 by 1
+rotate column x=3 by 1
+rotate column x=2 by 1
+rotate column x=1 by 1
+rotate column x=0 by 1
+rect 9x1
+rotate column x=46 by 2
+rotate column x=43 by 2
+rotate column x=24 by 2
+rotate column x=14 by 3
+rotate row y=5 by 15
+rotate row y=4 by 10
+rotate row y=3 by 3
+rotate row y=2 by 37
+rotate row y=1 by 10
+rotate row y=0 by 5
+rotate column x=0 by 3
+rect 3x3
+rotate row y=5 by 15
+rotate row y=3 by 10
+rotate row y=2 by 10
+rotate row y=0 by 10
+rotate column x=7 by 3
+rotate column x=6 by 3
+rotate column x=5 by 1
+rotate column x=3 by 1
+rotate column x=2 by 1
+rotate column x=1 by 1
+rotate column x=0 by 1
+rect 9x1
+rotate column x=19 by 1
+rotate column x=10 by 3
+rotate column x=5 by 4
+rotate row y=5 by 5
+rotate row y=4 by 5
+rotate row y=3 by 40
+rotate row y=2 by 35
+rotate row y=1 by 15
+rotate row y=0 by 30
+rotate column x=48 by 4
+rotate column x=47 by 3
+rotate column x=46 by 3
+rotate column x=45 by 1
+rotate column x=43 by 1
+rotate column x=42 by 5
+rotate column x=41 by 5
+rotate column x=40 by 1
+rotate column x=33 by 2
+rotate column x=32 by 3
+rotate column x=31 by 2
+rotate column x=28 by 1
+rotate column x=27 by 5
+rotate column x=26 by 5
+rotate column x=25 by 1
+rotate column x=23 by 5
+rotate column x=22 by 5
+rotate column x=21 by 5
+rotate column x=18 by 5
+rotate column x=17 by 5
+rotate column x=16 by 5
+rotate column x=13 by 5
+rotate column x=12 by 5
+rotate column x=11 by 5
+rotate column x=3 by 1
+rotate column x=2 by 5
+rotate column x=1 by 5
+rotate column x=0 by 1
diff --git a/day08.k b/day08.k
new file mode 100644
index 0000000..ba3f823
--- /dev/null
+++ b/day08.k
@@ -0,0 +1,11 @@
+/ use KDB+ 3.3 2016.03.14
+
+f: 6 50#0
+r:.q.rotate
+
+{$["rect"~*w:" "\:x;.[`f;(!.:)'|"x"\:*|w;:;1]; "row"~w[1];f[n]::r[-.*|w;f[n:.*|"="\:w 2]]; "column"~w[1]:f[;n]::r[-.*|w;f[;n:.*|"="\:w 2]];]}'0:`day08;
+
++//f		/ 106
+-1'" #"f;	/ CFLELOYFCS
+
+\\
diff --git a/day08.k4 b/day08.k4
new file mode 100644
index 0000000..ba3f823
--- /dev/null
+++ b/day08.k4
@@ -0,0 +1,11 @@
+/ use KDB+ 3.3 2016.03.14
+
+f: 6 50#0
+r:.q.rotate
+
+{$["rect"~*w:" "\:x;.[`f;(!.:)'|"x"\:*|w;:;1]; "row"~w[1];f[n]::r[-.*|w;f[n:.*|"="\:w 2]]; "column"~w[1]:f[;n]::r[-.*|w;f[;n:.*|"="\:w 2]];]}'0:`day08;
+
++//f		/ 106
+-1'" #"f;	/ CFLELOYFCS
+
+\\