advent_of_ruby 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/arb +1 -1
- data/data/solutions/reddit/ruby/2015/02.yml +5 -5
- data/data/solutions/reddit/ruby/2015/03.yml +6 -6
- data/data/solutions/reddit/ruby/2015/04.yml +7 -7
- data/data/solutions/reddit/ruby/2015/05.yml +6 -6
- data/data/solutions/reddit/ruby/2015/06.yml +14 -14
- data/data/solutions/reddit/ruby/2015/07.yml +15 -15
- data/data/solutions/reddit/ruby/2015/08.yml +6 -6
- data/data/solutions/reddit/ruby/2015/09.yml +11 -11
- data/data/solutions/reddit/ruby/2015/10.yml +18 -18
- data/data/solutions/reddit/ruby/2015/11.yml +19 -19
- data/data/solutions/reddit/ruby/2015/12.yml +10 -10
- data/data/solutions/reddit/ruby/2015/13.yml +9 -9
- data/data/solutions/reddit/ruby/2015/14.yml +11 -11
- data/data/solutions/reddit/ruby/2015/15.yml +9 -9
- data/data/solutions/reddit/ruby/2015/16.yml +7 -7
- data/data/solutions/reddit/ruby/2015/17.yml +10 -10
- data/data/solutions/reddit/ruby/2015/18.yml +4 -4
- data/data/solutions/reddit/ruby/2015/19.yml +1 -1
- data/data/solutions/reddit/ruby/2015/20.yml +2 -2
- data/data/solutions/reddit/ruby/2015/21.yml +4 -4
- data/data/solutions/reddit/ruby/2015/22.yml +5 -5
- data/data/solutions/reddit/ruby/2015/23.yml +3 -3
- data/data/solutions/reddit/ruby/2015/24.yml +11 -11
- data/data/solutions/reddit/ruby/2015/25.yml +5 -5
- data/data/solutions/reddit/ruby/2016/01.yml +5 -5
- data/data/solutions/reddit/ruby/2016/02.yml +3 -3
- data/data/solutions/reddit/ruby/2016/03.yml +1 -1
- data/data/solutions/reddit/ruby/2016/04.yml +4 -4
- data/data/solutions/reddit/ruby/2016/05.yml +3 -3
- data/data/solutions/reddit/ruby/2016/06.yml +4 -4
- data/data/solutions/reddit/ruby/2016/07.yml +3 -3
- data/data/solutions/reddit/ruby/2016/08.yml +6 -6
- data/data/solutions/reddit/ruby/2016/09.yml +1 -1
- data/data/solutions/reddit/ruby/2016/10.yml +3 -3
- data/data/solutions/reddit/ruby/2016/11.yml +1 -1
- data/data/solutions/reddit/ruby/2016/12.yml +3 -3
- data/data/solutions/reddit/ruby/2016/14.yml +4 -4
- data/data/solutions/reddit/ruby/2016/15.yml +11 -11
- data/data/solutions/reddit/ruby/2016/16.yml +1 -1
- data/data/solutions/reddit/ruby/2016/17.yml +3 -3
- data/data/solutions/reddit/ruby/2016/18.yml +3 -3
- data/data/solutions/reddit/ruby/2016/20.yml +2 -2
- data/data/solutions/reddit/ruby/2016/21.yml +7 -7
- data/data/solutions/reddit/ruby/2016/22.yml +10 -10
- data/data/solutions/reddit/ruby/2017/01.yml +7 -7
- data/data/solutions/reddit/ruby/2017/02.yml +15 -15
- data/data/solutions/reddit/ruby/2017/03.yml +9 -9
- data/data/solutions/reddit/ruby/2017/04.yml +4 -4
- data/data/solutions/reddit/ruby/2017/05.yml +12 -12
- data/data/solutions/reddit/ruby/2017/06.yml +16 -16
- data/data/solutions/reddit/ruby/2017/07.yml +5 -5
- data/data/solutions/reddit/ruby/2017/08.yml +18 -18
- data/data/solutions/reddit/ruby/2017/09.yml +7 -7
- data/data/solutions/reddit/ruby/2017/10.yml +9 -9
- data/data/solutions/reddit/ruby/2017/11.yml +1 -1
- data/data/solutions/reddit/ruby/2017/12.yml +6 -6
- data/data/solutions/reddit/ruby/2017/13.yml +6 -6
- data/data/solutions/reddit/ruby/2017/14.yml +1 -1
- data/data/solutions/reddit/ruby/2017/15.yml +3 -3
- data/data/solutions/reddit/ruby/2017/16.yml +5 -5
- data/data/solutions/reddit/ruby/2017/17.yml +6 -6
- data/data/solutions/reddit/ruby/2017/18.yml +7 -7
- data/data/solutions/reddit/ruby/2017/19.yml +2 -2
- data/data/solutions/reddit/ruby/2017/20.yml +5 -5
- data/data/solutions/reddit/ruby/2017/21.yml +11 -11
- data/data/solutions/reddit/ruby/2017/22.yml +1 -1
- data/data/solutions/reddit/ruby/2017/23.yml +1 -1
- data/data/solutions/reddit/ruby/2017/25.yml +3 -3
- data/data/solutions/reddit/ruby/2018/01.yml +20 -20
- data/data/solutions/reddit/ruby/2018/02.yml +16 -16
- data/data/solutions/reddit/ruby/2018/03.yml +12 -12
- data/data/solutions/reddit/ruby/2018/04.yml +6 -6
- data/data/solutions/reddit/ruby/2018/05.yml +15 -15
- data/data/solutions/reddit/ruby/2018/06.yml +4 -4
- data/data/solutions/reddit/ruby/2018/07.yml +11 -11
- data/data/solutions/reddit/ruby/2018/08.yml +9 -9
- data/data/solutions/reddit/ruby/2018/09.yml +13 -13
- data/data/solutions/reddit/ruby/2018/10.yml +10 -10
- data/data/solutions/reddit/ruby/2018/11.yml +9 -9
- data/data/solutions/reddit/ruby/2018/12.yml +2 -2
- data/data/solutions/reddit/ruby/2018/13.yml +14 -14
- data/data/solutions/reddit/ruby/2018/14.yml +5 -5
- data/data/solutions/reddit/ruby/2018/15.yml +2 -2
- data/data/solutions/reddit/ruby/2018/16.yml +7 -7
- data/data/solutions/reddit/ruby/2018/17.yml +1 -1
- data/data/solutions/reddit/ruby/2018/18.yml +6 -6
- data/data/solutions/reddit/ruby/2018/19.yml +1 -1
- data/data/solutions/reddit/ruby/2018/20.yml +1 -1
- data/data/solutions/reddit/ruby/2018/21.yml +4 -4
- data/data/solutions/reddit/ruby/2018/22.yml +3 -3
- data/data/solutions/reddit/ruby/2018/23.yml +11 -11
- data/data/solutions/reddit/ruby/2018/24.yml +4 -4
- data/data/solutions/reddit/ruby/2018/25.yml +6 -6
- data/data/solutions/reddit/ruby/2019/01.yml +11 -11
- data/data/solutions/reddit/ruby/2019/02.yml +13 -13
- data/data/solutions/reddit/ruby/2019/03.yml +7 -7
- data/data/solutions/reddit/ruby/2019/04.yml +11 -11
- data/data/solutions/reddit/ruby/2019/05.yml +10 -10
- data/data/solutions/reddit/ruby/2019/06.yml +7 -7
- data/data/solutions/reddit/ruby/2019/07.yml +8 -8
- data/data/solutions/reddit/ruby/2019/08.yml +8 -8
- data/data/solutions/reddit/ruby/2019/09.yml +4 -4
- data/data/solutions/reddit/ruby/2019/10.yml +4 -4
- data/data/solutions/reddit/ruby/2019/11.yml +7 -7
- data/data/solutions/reddit/ruby/2019/12.yml +17 -17
- data/data/solutions/reddit/ruby/2019/13.yml +6 -6
- data/data/solutions/reddit/ruby/2019/14.yml +2 -2
- data/data/solutions/reddit/ruby/2019/15.yml +3 -3
- data/data/solutions/reddit/ruby/2019/16.yml +6 -6
- data/data/solutions/reddit/ruby/2019/17.yml +3 -3
- data/data/solutions/reddit/ruby/2019/18.yml +1 -1
- data/data/solutions/reddit/ruby/2019/20.yml +9 -9
- data/data/solutions/reddit/ruby/2019/21.yml +3 -3
- data/data/solutions/reddit/ruby/2019/22.yml +3 -3
- data/data/solutions/reddit/ruby/2019/23.yml +1 -1
- data/data/solutions/reddit/ruby/2019/25.yml +2 -2
- data/data/solutions/reddit/ruby/2020/01.yml +30 -30
- data/data/solutions/reddit/ruby/2020/02.yml +25 -25
- data/data/solutions/reddit/ruby/2020/03.yml +17 -17
- data/data/solutions/reddit/ruby/2020/04.yml +26 -26
- data/data/solutions/reddit/ruby/2020/05.yml +35 -35
- data/data/solutions/reddit/ruby/2020/06.yml +40 -40
- data/data/solutions/reddit/ruby/2020/07.yml +16 -16
- data/data/solutions/reddit/ruby/2020/08.yml +13 -13
- data/data/solutions/reddit/ruby/2020/09.yml +21 -21
- data/data/solutions/reddit/ruby/2020/10.yml +29 -29
- data/data/solutions/reddit/ruby/2020/11.yml +8 -8
- data/data/solutions/reddit/ruby/2020/12.yml +22 -22
- data/data/solutions/reddit/ruby/2020/13.yml +15 -15
- data/data/solutions/reddit/ruby/2020/14.yml +11 -11
- data/data/solutions/reddit/ruby/2020/15.yml +9 -9
- data/data/solutions/reddit/ruby/2020/16.yml +13 -13
- data/data/solutions/reddit/ruby/2020/17.yml +11 -11
- data/data/solutions/reddit/ruby/2020/18.yml +19 -19
- data/data/solutions/reddit/ruby/2020/19.yml +18 -18
- data/data/solutions/reddit/ruby/2020/20.yml +4 -4
- data/data/solutions/reddit/ruby/2020/21.yml +4 -4
- data/data/solutions/reddit/ruby/2020/22.yml +8 -8
- data/data/solutions/reddit/ruby/2020/23.yml +4 -4
- data/data/solutions/reddit/ruby/2020/24.yml +6 -6
- data/data/solutions/reddit/ruby/2020/25.yml +6 -6
- data/data/solutions/reddit/ruby/2021/01.yml +74 -74
- data/data/solutions/reddit/ruby/2021/02.yml +45 -45
- data/data/solutions/reddit/ruby/2021/03.yml +43 -43
- data/data/solutions/reddit/ruby/2021/04.yml +23 -23
- data/data/solutions/reddit/ruby/2021/05.yml +16 -16
- data/data/solutions/reddit/ruby/2021/06.yml +35 -35
- data/data/solutions/reddit/ruby/2021/07.yml +26 -26
- data/data/solutions/reddit/ruby/2021/08.yml +15 -15
- data/data/solutions/reddit/ruby/2021/09.yml +11 -11
- data/data/solutions/reddit/ruby/2021/10.yml +9 -9
- data/data/solutions/reddit/ruby/2021/11.yml +12 -12
- data/data/solutions/reddit/ruby/2021/12.yml +8 -8
- data/data/solutions/reddit/ruby/2021/13.yml +13 -13
- data/data/solutions/reddit/ruby/2021/14.yml +10 -10
- data/data/solutions/reddit/ruby/2021/15.yml +10 -10
- data/data/solutions/reddit/ruby/2021/16.yml +8 -8
- data/data/solutions/reddit/ruby/2021/17.yml +6 -6
- data/data/solutions/reddit/ruby/2021/18.yml +5 -5
- data/data/solutions/reddit/ruby/2021/19.yml +3 -3
- data/data/solutions/reddit/ruby/2021/20.yml +5 -5
- data/data/solutions/reddit/ruby/2021/21.yml +5 -5
- data/data/solutions/reddit/ruby/2021/22.yml +4 -4
- data/data/solutions/reddit/ruby/2021/23.yml +7 -7
- data/data/solutions/reddit/ruby/2021/24.yml +8 -8
- data/data/solutions/reddit/ruby/2021/25.yml +4 -4
- data/data/solutions/reddit/ruby/2022/01.yml +29 -29
- data/data/solutions/reddit/ruby/2022/02.yml +21 -21
- data/data/solutions/reddit/ruby/2022/03.yml +35 -35
- data/data/solutions/reddit/ruby/2022/04.yml +42 -42
- data/data/solutions/reddit/ruby/2022/05.yml +29 -29
- data/data/solutions/reddit/ruby/2022/06.yml +38 -38
- data/data/solutions/reddit/ruby/2022/07.yml +25 -25
- data/data/solutions/reddit/ruby/2022/08.yml +9 -9
- data/data/solutions/reddit/ruby/2022/09.yml +18 -18
- data/data/solutions/reddit/ruby/2022/10.yml +14 -14
- data/data/solutions/reddit/ruby/2022/11.yml +7 -7
- data/data/solutions/reddit/ruby/2022/12.yml +2 -2
- data/data/solutions/reddit/ruby/2022/13.yml +9 -9
- data/data/solutions/reddit/ruby/2022/14.yml +5 -5
- data/data/solutions/reddit/ruby/2022/15.yml +6 -6
- data/data/solutions/reddit/ruby/2022/16.yml +5 -5
- data/data/solutions/reddit/ruby/2022/17.yml +2 -2
- data/data/solutions/reddit/ruby/2022/18.yml +6 -6
- data/data/solutions/reddit/ruby/2022/19.yml +3 -3
- data/data/solutions/reddit/ruby/2022/20.yml +12 -12
- data/data/solutions/reddit/ruby/2022/21.yml +11 -11
- data/data/solutions/reddit/ruby/2022/22.yml +4 -4
- data/data/solutions/reddit/ruby/2022/24.yml +10 -10
- data/data/solutions/reddit/ruby/2022/25.yml +10 -10
- data/data/solutions/reddit/ruby/2023/01.yml +52 -52
- data/data/solutions/reddit/ruby/2023/02.yml +21 -21
- data/data/solutions/reddit/ruby/2023/03.yml +18 -18
- data/data/solutions/reddit/ruby/2023/04.yml +31 -31
- data/data/solutions/reddit/ruby/2023/05.yml +14 -14
- data/data/solutions/reddit/ruby/2023/06.yml +24 -24
- data/data/solutions/reddit/ruby/2023/07.yml +32 -32
- data/data/solutions/reddit/ruby/2023/08.yml +20 -20
- data/data/solutions/reddit/ruby/2023/09.yml +32 -32
- data/data/solutions/reddit/ruby/2023/10.yml +18 -18
- data/data/solutions/reddit/ruby/2023/11.yml +16 -16
- data/data/solutions/reddit/ruby/2023/12.yml +5 -5
- data/data/solutions/reddit/ruby/2023/13.yml +6 -6
- data/data/solutions/reddit/ruby/2023/14.yml +14 -14
- data/data/solutions/reddit/ruby/2023/15.yml +13 -13
- data/data/solutions/reddit/ruby/2023/16.yml +8 -8
- data/data/solutions/reddit/ruby/2023/18.yml +5 -5
- data/data/solutions/reddit/ruby/2023/19.yml +6 -6
- data/data/solutions/reddit/ruby/2023/20.yml +9 -9
- data/data/solutions/reddit/ruby/2023/21.yml +5 -5
- data/data/solutions/reddit/ruby/2023/22.yml +2 -2
- data/data/solutions/reddit/ruby/2023/23.yml +1 -1
- data/data/solutions/reddit/ruby/2023/25.yml +1 -1
- data/data/solutions/reddit/ruby/2024/01.yml +15 -15
- data/data/solutions/reddit/ruby/2024/02.yml +17 -17
- data/data/solutions/reddit/ruby/2024/03.yml +43 -43
- data/data/solutions/reddit/ruby/2024/04.yml +18 -18
- data/data/solutions/reddit/ruby/2024/05.yml +29 -29
- data/data/solutions/reddit/ruby/2024/06.yml +19 -19
- data/data/solutions/reddit/ruby/2024/07.yml +26 -26
- data/data/solutions/reddit/ruby/2024/08.yml +15 -15
- data/data/solutions/reddit/ruby/2024/09.yml +5 -5
- data/data/solutions/reddit/ruby/2024/10.yml +9 -9
- data/data/solutions/reddit/ruby/2024/11.yml +15 -15
- data/data/solutions/reddit/ruby/2024/12.yml +9 -9
- data/data/solutions/reddit/ruby/2024/13.yml +10 -10
- data/data/solutions/reddit/ruby/2024/14.yml +6 -6
- data/data/solutions/reddit/ruby/2024/15.yml +5 -5
- data/data/solutions/reddit/ruby/2024/16.yml +4 -4
- data/data/solutions/reddit/ruby/2024/17.yml +11 -11
- data/data/solutions/reddit/ruby/2024/18.yml +9 -9
- data/data/solutions/reddit/ruby/2024/19.yml +16 -16
- data/data/solutions/reddit/ruby/2024/20.yml +8 -8
- data/data/solutions/reddit/ruby/2024/21.yml +3 -3
- data/data/solutions/reddit/ruby/2024/22.yml +8 -8
- data/data/solutions/reddit/ruby/2024/23.yml +13 -13
- data/data/solutions/reddit/ruby/2024/24.yml +7 -7
- data/data/solutions/reddit/ruby/2024/25.yml +14 -14
- data/lib/arb/api/aoc.rb +2 -2
- data/lib/arb/cli/run.rb +2 -3
- data/lib/arb/version.rb +1 -1
- data/lib/download_solutions/api/reddit/get_serial_comments.rb +1 -1
- metadata +2 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: _jonah
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy1xweb
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy1xweb
|
4
4
|
:body: |-
|
5
5
|
ruby:
|
6
6
|
|
@@ -16,7 +16,7 @@
|
|
16
16
|
```
|
17
17
|
:replies: []
|
18
18
|
- :author: inuyasha555
|
19
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy1y0ii
|
19
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy1y0ii
|
20
20
|
:body: |-
|
21
21
|
Opened Eclipse ready to Java then found combinations which of course Java doesn't do nicely and would take too long to write up manually so I had to move on to Ruby instead and write something quickly but wasn't fast enough.
|
22
22
|
|
@@ -36,7 +36,7 @@
|
|
36
36
|
```
|
37
37
|
:replies: []
|
38
38
|
- :author: jchook
|
39
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy1yt8v
|
39
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy1yt8v
|
40
40
|
:body: |-
|
41
41
|
**Ruby**
|
42
42
|
|
@@ -51,15 +51,15 @@
|
|
51
51
|
```
|
52
52
|
:replies:
|
53
53
|
- :author: _jonah
|
54
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy1zsos
|
54
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy1zsos
|
55
55
|
:body: part 1 you can use "count" instead of "find\_all" + ".length"
|
56
56
|
:replies:
|
57
57
|
- :author: jchook
|
58
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy28gxv
|
58
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy28gxv
|
59
59
|
:body: wow count _does_ take a block. thanks!
|
60
60
|
:replies: []
|
61
61
|
- :author: Phakx
|
62
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy21fwd
|
62
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy21fwd
|
63
63
|
:body: |-
|
64
64
|
**Ruby**
|
65
65
|
|
@@ -88,7 +88,7 @@
|
|
88
88
|
```
|
89
89
|
:replies: []
|
90
90
|
- :author: HorizonShadow
|
91
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy26hii
|
91
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy26hii
|
92
92
|
:body: |-
|
93
93
|
Ruby:
|
94
94
|
|
@@ -112,7 +112,7 @@
|
|
112
112
|
All solutions here: https://github.com/HorizonShadow/Advent-of-Code
|
113
113
|
:replies: []
|
114
114
|
- :author: Herathe
|
115
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy2b06x
|
115
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy2b06x
|
116
116
|
:body: |-
|
117
117
|
## Ruby part1 https://github.com/herathe/advent-of-code/blob/master/17-1.rb
|
118
118
|
|
@@ -138,7 +138,7 @@
|
|
138
138
|
```
|
139
139
|
:replies: []
|
140
140
|
- :author: JurgenKesker
|
141
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy2b6pj
|
141
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy2b6pj
|
142
142
|
:body: |-
|
143
143
|
Ruby
|
144
144
|
|
@@ -196,7 +196,7 @@
|
|
196
196
|
```
|
197
197
|
:replies: []
|
198
198
|
- :author: gareve
|
199
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy2tzgg
|
199
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3x6cyr/day_17_solutions/cy2tzgg
|
200
200
|
:body: |-
|
201
201
|
Ruby with bitmasks instead of combination. It ended up being messier than using combination.
|
202
202
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: gareve
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xb3cj/day_18_solutions/cy34808
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xb3cj/day_18_solutions/cy34808
|
4
4
|
:body: |-
|
5
5
|
Ruby. Good time, not so good code
|
6
6
|
|
@@ -54,7 +54,7 @@
|
|
54
54
|
```
|
55
55
|
:replies: []
|
56
56
|
- :author: Axsuul
|
57
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xb3cj/day_18_solutions/cy37ag4
|
57
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xb3cj/day_18_solutions/cy37ag4
|
58
58
|
:body: |-
|
59
59
|
Ruby with recursion
|
60
60
|
|
@@ -154,7 +154,7 @@
|
|
154
154
|
```
|
155
155
|
:replies: []
|
156
156
|
- :author: Phakx
|
157
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xb3cj/day_18_solutions/cy38yeo
|
157
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xb3cj/day_18_solutions/cy38yeo
|
158
158
|
:body: |-
|
159
159
|
**Ruby** with some (sadly ugly) console printing of the grid:
|
160
160
|
|
@@ -220,7 +220,7 @@
|
|
220
220
|
```
|
221
221
|
:replies: []
|
222
222
|
- :author: JurgenKesker
|
223
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xb3cj/day_18_solutions/cy3qep6
|
223
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xb3cj/day_18_solutions/cy3qep6
|
224
224
|
:body: |-
|
225
225
|
Ruby, took me an hour :)
|
226
226
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: rabiedenharn
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xjpp2/day_20_solutions/cy59ps2
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xjpp2/day_20_solutions/cy59ps2
|
4
4
|
:body: |-
|
5
5
|
**Ruby**
|
6
6
|
|
@@ -44,7 +44,7 @@
|
|
44
44
|
```
|
45
45
|
:replies: []
|
46
46
|
- :author: tomb0y
|
47
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xjpp2/day_20_solutions/cy5aj3b
|
47
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xjpp2/day_20_solutions/cy5aj3b
|
48
48
|
:body: |-
|
49
49
|
Ruby:
|
50
50
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: ericdykstra
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xnyoi/day_21_solutions/cy6c2ec
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xnyoi/day_21_solutions/cy6c2ec
|
4
4
|
:body: |-
|
5
5
|
**Ruby (#93)** Started 10 minutes late due to lunch going over, then tried guess-and-check for 20 minutes before giving that up and using a half-code, half-mental-math solution. I manually figured out the cheapest cost for each of damage and armor (4-9 for damage, 0-5 for armor), then brute-forced from there. It's an ugly solution, but only took about 10 minutes of mental math and coding once.
|
6
6
|
|
@@ -33,7 +33,7 @@
|
|
33
33
|
```
|
34
34
|
:replies: []
|
35
35
|
- :author: Axsuul
|
36
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xnyoi/day_21_solutions/cy6cm0u
|
36
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xnyoi/day_21_solutions/cy6cm0u
|
37
37
|
:body: |-
|
38
38
|
Ruby with OOP approach
|
39
39
|
|
@@ -166,7 +166,7 @@
|
|
166
166
|
```
|
167
167
|
:replies: []
|
168
168
|
- :author: SomebodyTookMyHandle
|
169
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xnyoi/day_21_solutions/cy6s8k0
|
169
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xnyoi/day_21_solutions/cy6s8k0
|
170
170
|
:body: |-
|
171
171
|
Oh man, very fun challenge today! (They're always fun, but this is the first time I've gotten to program something like this.) Object-oriented Ruby using an iffy version of #cycle to simulate the battle, because it's fun to do so despite not being mathematically necessary. Comments and advice welcome...
|
172
172
|
|
@@ -316,7 +316,7 @@
|
|
316
316
|
```
|
317
317
|
:replies: []
|
318
318
|
- :author: JurgenKesker
|
319
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xnyoi/day_21_solutions/cye7r83
|
319
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xnyoi/day_21_solutions/cye7r83
|
320
320
|
:body: |-
|
321
321
|
Very verbose Ruby code
|
322
322
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: ericdykstra
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xspyl/day_22_solutions/cy7l3v4
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xspyl/day_22_solutions/cy7l3v4
|
4
4
|
:body: |-
|
5
5
|
**#16** _- Ruby_
|
6
6
|
|
@@ -11,11 +11,11 @@
|
|
11
11
|
If I were to re-write it now, I'm sure it would be 1/3 the number of lines and much cleaner. Got the job done in just under an hour, though!
|
12
12
|
:replies:
|
13
13
|
- :author: "[deleted]"
|
14
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xspyl/day_22_solutions/cygv2kb
|
14
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xspyl/day_22_solutions/cygv2kb
|
15
15
|
:body: I was expecting it to be truly hideous when you said that. I had a look. It has some hacks, but it's not as bad as you made out!
|
16
16
|
:replies: []
|
17
17
|
- :author: tomb0y
|
18
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xspyl/day_22_solutions/cy86y2x
|
18
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xspyl/day_22_solutions/cy86y2x
|
19
19
|
:body: |-
|
20
20
|
[longish ruby solution](https://gist.github.com/tomb0y/577ea0f8bc17388c24a4)
|
21
21
|
|
@@ -90,7 +90,7 @@
|
|
90
90
|
```
|
91
91
|
:replies: []
|
92
92
|
- :author: mkigikm
|
93
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xspyl/day_22_solutions/cy7lr92
|
93
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xspyl/day_22_solutions/cy7lr92
|
94
94
|
:body: |-
|
95
95
|
Some pretty gross ruby (globals, magic numbers, etc.) that does a BFS, pruning nodes that are worse than a best know solution.
|
96
96
|
|
@@ -186,7 +186,7 @@
|
|
186
186
|
```
|
187
187
|
:replies: []
|
188
188
|
- :author: Etsap
|
189
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xspyl/day_22_solutions/cy87l69
|
189
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xspyl/day_22_solutions/cy87l69
|
190
190
|
:body: |-
|
191
191
|
Ruby: I like to optimize it for fewest lines of code, but no promises on readability. Runs in under 30 seconds for my input. Depth-first with pruning based on best solution found so far.
|
192
192
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: Phakx
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xxdxt/day_23_solutions/cy8t1vs
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xxdxt/day_23_solutions/cy8t1vs
|
4
4
|
:body: |-
|
5
5
|
**RUBY** I was done in about ~10 minutes
|
6
6
|
|
@@ -65,7 +65,7 @@
|
|
65
65
|
```
|
66
66
|
:replies: []
|
67
67
|
- :author: jordanscales
|
68
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xxdxt/day_23_solutions/cy91suo
|
68
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xxdxt/day_23_solutions/cy91suo
|
69
69
|
:body: |-
|
70
70
|
Just some basic ruby :) Feel free to suggest any changes, I'm not a Ruby programmer.
|
71
71
|
|
@@ -134,7 +134,7 @@
|
|
134
134
|
```
|
135
135
|
:replies: []
|
136
136
|
- :author: vanderzee94
|
137
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3xxdxt/day_23_solutions/cy9395s
|
137
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3xxdxt/day_23_solutions/cy9395s
|
138
138
|
:body: |-
|
139
139
|
Solution in Ruby.
|
140
140
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: mkigikm
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cy9tczw
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cy9tczw
|
4
4
|
:body: |-
|
5
5
|
So proud of this ridiculous ruby. It has everything: monkey-patching basic classes, awful variable names, and the use of begin and rescue as a goto statement. It's fun to see what you can come up with when you aren't worried about a code review.
|
6
6
|
|
@@ -89,11 +89,11 @@
|
|
89
89
|
```
|
90
90
|
:replies:
|
91
91
|
- :author: "[deleted]"
|
92
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cyehlh1
|
92
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cyehlh1
|
93
93
|
:body: I've got a real think for code like this. Love it.
|
94
94
|
:replies: []
|
95
95
|
- :author: cort_troc
|
96
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cy9syc6
|
96
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cy9syc6
|
97
97
|
:body: |-
|
98
98
|
**Ruby**. Couldn't work out how to build in picking only array elements of the smallest length after the select so broke it out manually. Guessed on the ranges because it was computationally expensive. Took me 15 minutes before I realized working out the algorithm on the example inputs was much faster than doing 4..18 brute force on the full input!
|
99
99
|
|
@@ -124,7 +124,7 @@
|
|
124
124
|
```
|
125
125
|
:replies: []
|
126
126
|
- :author: ericdykstra
|
127
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cya5tre
|
127
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cya5tre
|
128
128
|
:body: |-
|
129
129
|
**5th in 9:25 using Ruby!**
|
130
130
|
|
@@ -147,11 +147,11 @@
|
|
147
147
|
```
|
148
148
|
:replies:
|
149
149
|
- :author: "[deleted]"
|
150
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cya7f1f
|
150
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cya7f1f
|
151
151
|
:body: "[deleted]"
|
152
152
|
:replies:
|
153
153
|
- :author: cort_troc
|
154
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cyadzcw
|
154
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cyadzcw
|
155
155
|
:body: |-
|
156
156
|
Nice! I got stuck in mine trying to select the smallest array size from multiple, because i'd put a range to loop the combinations. That's much better.
|
157
157
|
|
@@ -165,7 +165,7 @@
|
|
165
165
|
```
|
166
166
|
:replies:
|
167
167
|
- :author: cort_troc
|
168
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cyaeyqm
|
168
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cyaeyqm
|
169
169
|
:body: |-
|
170
170
|
recursive makes it look a bit smaller. I guess it's fair to call that a one liner.
|
171
171
|
|
@@ -177,11 +177,11 @@
|
|
177
177
|
```
|
178
178
|
:replies: []
|
179
179
|
- :author: TheNiXXeD
|
180
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cya81r6
|
180
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cya81r6
|
181
181
|
:body: Nice, that's the same logic I used for my JS solution.
|
182
182
|
:replies: []
|
183
183
|
- :author: iodiot
|
184
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cy9u7wo
|
184
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cy9u7wo
|
185
185
|
:body: |-
|
186
186
|
**Ruby**. Simple bfs. My guess was to add the heaviest gift into initial solution.
|
187
187
|
|
@@ -233,7 +233,7 @@
|
|
233
233
|
```
|
234
234
|
:replies: []
|
235
235
|
- :author: "[deleted]"
|
236
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cyabdk1
|
236
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cyabdk1
|
237
237
|
:body: |-
|
238
238
|
**Ruby**
|
239
239
|
|
@@ -280,7 +280,7 @@
|
|
280
280
|
```
|
281
281
|
:replies: []
|
282
282
|
- :author: SomebodyTookMyHandle
|
283
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cyaeja9
|
283
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y1s7f/day_24_solutions/cyaeja9
|
284
284
|
:body: |-
|
285
285
|
Ruby solution that actually checks the remaining present weights for validity. More verbose than others and more dependent on doing some preliminary math beforehand. First, solutions to the first part of the problem (fewest number of packages) are generated and sorted by "quantum entanglement". Then and only then are each of these checked in order to see whether the remaining presents can be split up properly.
|
286
286
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: ross314
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y5jco/day_25_solutions/cyaq8zx
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y5jco/day_25_solutions/cyaq8zx
|
4
4
|
:body: |-
|
5
5
|
First time on the leaderboard (#62)! I was able to come up with a formula for how many times to apply the multiplication and remainder and then just repeated the steps that many times.
|
6
6
|
|
@@ -20,15 +20,15 @@
|
|
20
20
|
```
|
21
21
|
:replies:
|
22
22
|
- :author: Blecki
|
23
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y5jco/day_25_solutions/cyaqjg7
|
23
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y5jco/day_25_solutions/cyaqjg7
|
24
24
|
:body: Really no time before this counts. There are no more days, you're on the leaderboard and shall stay there forever.
|
25
25
|
:replies:
|
26
26
|
- :author: topaz2078
|
27
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y5jco/day_25_solutions/cyar7bu
|
27
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y5jco/day_25_solutions/cyar7bu
|
28
28
|
:body: I intend to release a much more thorough set of completion data; this leaderboard won't be the only one.
|
29
29
|
:replies: []
|
30
30
|
- :author: ericdykstra
|
31
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y5jco/day_25_solutions/cyaqbvw
|
31
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y5jco/day_25_solutions/cyaqbvw
|
32
32
|
:body: |-
|
33
33
|
**Ruby #36 - 10:50**
|
34
34
|
|
@@ -59,7 +59,7 @@
|
|
59
59
|
Going to throw a donation to /u/topaz2078 when I have money in my paypal account. Enjoyed going through these and will use some of them as practice for learning new languages. Enjoyed learning from all of you here, as well, by looking through your code and reading your comments/suggestions on mine. Merry Christmas!!
|
60
60
|
:replies: []
|
61
61
|
- :author: JurgenKesker
|
62
|
-
:url: https://www.reddit.com/r/adventofcode/comments/3y5jco/day_25_solutions/cyiarkc
|
62
|
+
:url: https://www.reddit.com/r/adventofcode/comments/3y5jco/day_25_solutions/cyiarkc
|
63
63
|
:body: |-
|
64
64
|
Ruby, this day felt as the easiest in a long time. Thanks for Advent of Code, it was great!
|
65
65
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: anadhdguy
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5fur6q/2016_day_1_solutions/daocnfp
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5fur6q/2016_day_1_solutions/daocnfp
|
4
4
|
:body: |-
|
5
5
|
My solution for part1...
|
6
6
|
|
@@ -21,7 +21,7 @@
|
|
21
21
|
```
|
22
22
|
:replies: []
|
23
23
|
- :author: ericdykstra
|
24
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5fur6q/2016_day_1_solutions/dane3zx
|
24
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5fur6q/2016_day_1_solutions/dane3zx
|
25
25
|
:body: |-
|
26
26
|
Here's my pattern-matching-heavy Elixir answer for part 1! https://gist.github.com/EricDykstra/41b46c9a40bf499f97252a81ef32dd8a
|
27
27
|
|
@@ -30,7 +30,7 @@
|
|
30
30
|
I used Ruby to initially to get on the leaderboard and this was my answer (slightly cleaned up and refactored). Part 2 answer changes only a couple of lines :) https://gist.github.com/EricDykstra/cbbb9b87209814d93e5bb0d252646d0d
|
31
31
|
:replies: []
|
32
32
|
- :author: dontfup
|
33
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5fur6q/2016_day_1_solutions/daq39t1
|
33
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5fur6q/2016_day_1_solutions/daq39t1
|
34
34
|
:body: |-
|
35
35
|
Clever enough go at part 1 in ruby, but this won't do well for part 2:
|
36
36
|
|
@@ -63,7 +63,7 @@
|
|
63
63
|
```
|
64
64
|
:replies:
|
65
65
|
- :author: dontfup
|
66
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5fur6q/2016_day_1_solutions/daqq9c0
|
66
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5fur6q/2016_day_1_solutions/daqq9c0
|
67
67
|
:body: |-
|
68
68
|
Okay, I've adapted the same code to solve part 2
|
69
69
|
|
@@ -141,7 +141,7 @@
|
|
141
141
|
```
|
142
142
|
:replies: []
|
143
143
|
- :author: jchook
|
144
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5fur6q/2016_day_1_solutions/dau2kcf
|
144
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5fur6q/2016_day_1_solutions/dau2kcf
|
145
145
|
:body: |-
|
146
146
|
Sorry I'm late to the party!
|
147
147
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: anadhdguy
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5g1hfm/2016_day_2_solutions/dap9xzs
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5g1hfm/2016_day_2_solutions/dap9xzs
|
4
4
|
:body: |-
|
5
5
|
**Oneliner in ruby (117 characters)**:
|
6
6
|
|
@@ -10,11 +10,11 @@
|
|
10
10
|
```
|
11
11
|
:replies:
|
12
12
|
- :author: givdwiel
|
13
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5g1hfm/2016_day_2_solutions/daplj48
|
13
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5g1hfm/2016_day_2_solutions/daplj48
|
14
14
|
:body: I suppose this only works for part 1 and not for part 2, since there's a gap in the ASCII table between the numbers and letters
|
15
15
|
:replies:
|
16
16
|
- :author: anadhdguy
|
17
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5g1hfm/2016_day_2_solutions/daqfal3
|
17
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5g1hfm/2016_day_2_solutions/daqfal3
|
18
18
|
:body: |-
|
19
19
|
yup, this solution is only for part1.
|
20
20
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: el_daniero
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5g80ck/2016_day_3_solutions/dazzvd1
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5g80ck/2016_day_3_solutions/dazzvd1
|
4
4
|
:body: |-
|
5
5
|
Ruby. A little late to the party, but I'm really pleased with this one:
|
6
6
|
|
@@ -1,13 +1,13 @@
|
|
1
1
|
---
|
2
2
|
- :author: andars_
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5gdvve/2016_day_4_solutions/darhz11
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5gdvve/2016_day_4_solutions/darhz11
|
4
4
|
:body: |-
|
5
5
|
Ruby, parts 1 and 2. [link](https://raw.githubusercontent.com/andars/advent-of-code/master/2016/day4/task.rb)
|
6
6
|
|
7
7
|
Solutions for part 2 found via a quick search of the output for `north` in vim.
|
8
8
|
:replies: []
|
9
9
|
- :author: anadhdguy
|
10
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5gdvve/2016_day_4_solutions/darj14n
|
10
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5gdvve/2016_day_4_solutions/darj14n
|
11
11
|
:body: |-
|
12
12
|
```ruby
|
13
13
|
#!/usr/bin/env ruby
|
@@ -24,7 +24,7 @@
|
|
24
24
|
```
|
25
25
|
:replies: []
|
26
26
|
- :author: "[deleted]"
|
27
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5gdvve/2016_day_4_solutions/darm5t9
|
27
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5gdvve/2016_day_4_solutions/darm5t9
|
28
28
|
:body: |-
|
29
29
|
I can do both parts in 3 lines of Ruby, and even construct additional pylons:
|
30
30
|
|
@@ -56,7 +56,7 @@
|
|
56
56
|
```
|
57
57
|
:replies: []
|
58
58
|
- :author: socialmeatloaf
|
59
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5gdvve/2016_day_4_solutions/dasoy5y
|
59
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5gdvve/2016_day_4_solutions/dasoy5y
|
60
60
|
:body: |-
|
61
61
|
One disgustingly ugly line of Ruby for Part 1:
|
62
62
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: broadwall
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5gk2yv/2016_day_5_solutions/dasy3lw
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5gk2yv/2016_day_5_solutions/dasy3lw
|
4
4
|
:body: |-
|
5
5
|
Solution: [GitHub](https://github.com/broad-well/aoc2016/blob/master/day5.rb)
|
6
6
|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
**This program should display a nice hacking effect on ANSI terminals. For part 2, call this using `ruby day5.rb part2`**
|
10
10
|
:replies: []
|
11
11
|
- :author: eregontp
|
12
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5gk2yv/2016_day_5_solutions/dat3ff8
|
12
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5gk2yv/2016_day_5_solutions/dat3ff8
|
13
13
|
:body: |-
|
14
14
|
A clean and simple Ruby solution:
|
15
15
|
|
@@ -36,7 +36,7 @@
|
|
36
36
|
```
|
37
37
|
:replies: []
|
38
38
|
- :author: fixed_carbon
|
39
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5gk2yv/2016_day_5_solutions/datwn7c
|
39
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5gk2yv/2016_day_5_solutions/datwn7c
|
40
40
|
:body: |-
|
41
41
|
Ruby solution (part two) using an Enumerator to generate [digit, position] pairs. This one is interesting because it generalizes to passwords of any length between 1 and 16 simply by changing the number in the last line of the `take_while` block.
|
42
42
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: fixed_carbon
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5gr0xf/2016_day_6_solutions/dauhuao
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5gr0xf/2016_day_6_solutions/dauhuao
|
4
4
|
:body: |-
|
5
5
|
Ruby. `chunk` seems to be getting a lot of exercise in these problems.
|
6
6
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
```
|
18
18
|
:replies: []
|
19
19
|
- :author: andars_
|
20
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5gr0xf/2016_day_6_solutions/daufndh
|
20
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5gr0xf/2016_day_6_solutions/daufndh
|
21
21
|
:body: |-
|
22
22
|
Ruby.
|
23
23
|
|
@@ -48,7 +48,7 @@
|
|
48
48
|
```
|
49
49
|
:replies: []
|
50
50
|
- :author: doublehyphen
|
51
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5gr0xf/2016_day_6_solutions/daufx8l
|
51
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5gr0xf/2016_day_6_solutions/daufx8l
|
52
52
|
:body: |-
|
53
53
|
Ruby solution. I think it is pretty short and clean.
|
54
54
|
|
@@ -61,7 +61,7 @@
|
|
61
61
|
```
|
62
62
|
:replies: []
|
63
63
|
- :author: brantyr
|
64
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5gr0xf/2016_day_6_solutions/dauh5yy
|
64
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5gr0xf/2016_day_6_solutions/dauh5yy
|
65
65
|
:body: |-
|
66
66
|
Trying to learn ruby... apparently there are no do - while loops...
|
67
67
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: fixed_carbon
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5gy1f2/2016_day_7_solutions/daw1gcv
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5gy1f2/2016_day_7_solutions/daw1gcv
|
4
4
|
:body: |-
|
5
5
|
Ruby, showing part 2 only. I wasted a bunch of time trying to understand why the sample input for part 1 passed my original regexp-based code, but the real input gave me the wrong answer. Took me forever to realize the real input could contain multiple hypernet sequences on each line. Ditched my nice stateless regexp solution for this stateful mess. I feel all dirty.
|
6
6
|
|
@@ -33,7 +33,7 @@
|
|
33
33
|
```
|
34
34
|
:replies:
|
35
35
|
- :author: fixed_carbon
|
36
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5gy1f2/2016_day_7_solutions/daw3542
|
36
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5gy1f2/2016_day_7_solutions/daw3542
|
37
37
|
:body: |-
|
38
38
|
Couldn't resist polishing that stateful turd into a stateless one:
|
39
39
|
|
@@ -64,7 +64,7 @@
|
|
64
64
|
```
|
65
65
|
:replies: []
|
66
66
|
- :author: johneffort
|
67
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5gy1f2/2016_day_7_solutions/dawq1go
|
67
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5gy1f2/2016_day_7_solutions/dawq1go
|
68
68
|
:body: |-
|
69
69
|
Day 7 part 2 in Ruby:
|
70
70
|
|
@@ -1,21 +1,21 @@
|
|
1
1
|
---
|
2
2
|
- :author: becojo
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5h52ro/2016_day_8_solutions/daxi9cd
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5h52ro/2016_day_8_solutions/daxi9cd
|
4
4
|
:body: |-
|
5
5
|
Ayy 20th/13th with Ruby. https://github.com/Becojo/adventofcode/blob/master/2016/day08.rb
|
6
6
|
|
7
7
|
It was indeed a very nice challenge today!
|
8
8
|
:replies:
|
9
9
|
- :author: "[deleted]"
|
10
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5h52ro/2016_day_8_solutions/daxif2o
|
10
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5h52ro/2016_day_8_solutions/daxif2o
|
11
11
|
:body: "[deleted]"
|
12
12
|
:replies:
|
13
13
|
- :author: becojo
|
14
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5h52ro/2016_day_8_solutions/daxilo2
|
14
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5h52ro/2016_day_8_solutions/daxilo2
|
15
15
|
:body: Nice, I did no know that, thank you! I'm so used to this cycle/lazy/drop/take pattern lol.
|
16
16
|
:replies: []
|
17
17
|
- :author: blanketandtea
|
18
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5h52ro/2016_day_8_solutions/day4pag
|
18
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5h52ro/2016_day_8_solutions/day4pag
|
19
19
|
:body: |-
|
20
20
|
**Ruby**
|
21
21
|
|
@@ -91,7 +91,7 @@
|
|
91
91
|
```
|
92
92
|
:replies: []
|
93
93
|
- :author: johneffort
|
94
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5h52ro/2016_day_8_solutions/day5zot
|
94
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5h52ro/2016_day_8_solutions/day5zot
|
95
95
|
:body: |-
|
96
96
|
Ruby Day 8. I really liked the way you can use .transpose and .rotate, it makes the actual work code quite clean.
|
97
97
|
|
@@ -191,7 +191,7 @@
|
|
191
191
|
```
|
192
192
|
:replies: []
|
193
193
|
- :author: rkachowski
|
194
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5h52ro/2016_day_8_solutions/dazgoas
|
194
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5h52ro/2016_day_8_solutions/dazgoas
|
195
195
|
:body: |-
|
196
196
|
ok i feel pretty good about this one, i actually implemented a basic dsl in ruby and execute each line of input as if it was an invokation. things i liked - \* dsl approach \* realising rotating a row is the same as rotating a transposed column \* writing a visualisation before completing part one, meaning i got part 2 for free :D
|
197
197
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
---
|
2
2
|
- :author: andars_
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5hbygy/2016_day_9_solutions/daz2oxg
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5hbygy/2016_day_9_solutions/daz2oxg
|
4
4
|
:body: "[Ruby](https://github.com/andars/advent-of-code/blob/14db4fca586360e6301d89d76245c733a5fbd28b/2016/day9/task.rb). 118/138"
|
5
5
|
:replies: []
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: el_daniero
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5hijk5/2016_day_10_solutions/db0v9jb
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5hijk5/2016_day_10_solutions/db0v9jb
|
4
4
|
:body: |-
|
5
5
|
Ruby.
|
6
6
|
|
@@ -41,7 +41,7 @@
|
|
41
41
|
The whole thing can be found [here](https://github.com/daniero/code-challenges/blob/master/aoc2016/10.rb)
|
42
42
|
:replies: []
|
43
43
|
- :author: blanketandtea
|
44
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5hijk5/2016_day_10_solutions/db0p8im
|
44
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5hijk5/2016_day_10_solutions/db0p8im
|
45
45
|
:body: |-
|
46
46
|
**Ruby** for both steps
|
47
47
|
|
@@ -177,7 +177,7 @@
|
|
177
177
|
```
|
178
178
|
:replies: []
|
179
179
|
- :author: eregontp
|
180
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5hijk5/2016_day_10_solutions/db122wz
|
180
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5hijk5/2016_day_10_solutions/db122wz
|
181
181
|
:body: |-
|
182
182
|
Ruby, with a coroutine (Fiber) per bot:
|
183
183
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
---
|
2
2
|
- :author: eregontp
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/5hoia9/2016_day_11_solutions/db21n90
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/5hoia9/2016_day_11_solutions/db21n90
|
4
4
|
:body: Ruby, BFS with pruning same states by sorting chips/gens per floor. Runs for 43ms for the first star, 20 min for the second (phew, wondered if it'd ever come back :) https://gist.github.com/eregon/28ee8504d4bb5b225fcafdb9872b884a
|
5
5
|
:replies: []
|