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.
Files changed (245) hide show
  1. checksums.yaml +4 -4
  2. data/bin/arb +1 -1
  3. data/data/solutions/reddit/ruby/2015/02.yml +5 -5
  4. data/data/solutions/reddit/ruby/2015/03.yml +6 -6
  5. data/data/solutions/reddit/ruby/2015/04.yml +7 -7
  6. data/data/solutions/reddit/ruby/2015/05.yml +6 -6
  7. data/data/solutions/reddit/ruby/2015/06.yml +14 -14
  8. data/data/solutions/reddit/ruby/2015/07.yml +15 -15
  9. data/data/solutions/reddit/ruby/2015/08.yml +6 -6
  10. data/data/solutions/reddit/ruby/2015/09.yml +11 -11
  11. data/data/solutions/reddit/ruby/2015/10.yml +18 -18
  12. data/data/solutions/reddit/ruby/2015/11.yml +19 -19
  13. data/data/solutions/reddit/ruby/2015/12.yml +10 -10
  14. data/data/solutions/reddit/ruby/2015/13.yml +9 -9
  15. data/data/solutions/reddit/ruby/2015/14.yml +11 -11
  16. data/data/solutions/reddit/ruby/2015/15.yml +9 -9
  17. data/data/solutions/reddit/ruby/2015/16.yml +7 -7
  18. data/data/solutions/reddit/ruby/2015/17.yml +10 -10
  19. data/data/solutions/reddit/ruby/2015/18.yml +4 -4
  20. data/data/solutions/reddit/ruby/2015/19.yml +1 -1
  21. data/data/solutions/reddit/ruby/2015/20.yml +2 -2
  22. data/data/solutions/reddit/ruby/2015/21.yml +4 -4
  23. data/data/solutions/reddit/ruby/2015/22.yml +5 -5
  24. data/data/solutions/reddit/ruby/2015/23.yml +3 -3
  25. data/data/solutions/reddit/ruby/2015/24.yml +11 -11
  26. data/data/solutions/reddit/ruby/2015/25.yml +5 -5
  27. data/data/solutions/reddit/ruby/2016/01.yml +5 -5
  28. data/data/solutions/reddit/ruby/2016/02.yml +3 -3
  29. data/data/solutions/reddit/ruby/2016/03.yml +1 -1
  30. data/data/solutions/reddit/ruby/2016/04.yml +4 -4
  31. data/data/solutions/reddit/ruby/2016/05.yml +3 -3
  32. data/data/solutions/reddit/ruby/2016/06.yml +4 -4
  33. data/data/solutions/reddit/ruby/2016/07.yml +3 -3
  34. data/data/solutions/reddit/ruby/2016/08.yml +6 -6
  35. data/data/solutions/reddit/ruby/2016/09.yml +1 -1
  36. data/data/solutions/reddit/ruby/2016/10.yml +3 -3
  37. data/data/solutions/reddit/ruby/2016/11.yml +1 -1
  38. data/data/solutions/reddit/ruby/2016/12.yml +3 -3
  39. data/data/solutions/reddit/ruby/2016/14.yml +4 -4
  40. data/data/solutions/reddit/ruby/2016/15.yml +11 -11
  41. data/data/solutions/reddit/ruby/2016/16.yml +1 -1
  42. data/data/solutions/reddit/ruby/2016/17.yml +3 -3
  43. data/data/solutions/reddit/ruby/2016/18.yml +3 -3
  44. data/data/solutions/reddit/ruby/2016/20.yml +2 -2
  45. data/data/solutions/reddit/ruby/2016/21.yml +7 -7
  46. data/data/solutions/reddit/ruby/2016/22.yml +10 -10
  47. data/data/solutions/reddit/ruby/2017/01.yml +7 -7
  48. data/data/solutions/reddit/ruby/2017/02.yml +15 -15
  49. data/data/solutions/reddit/ruby/2017/03.yml +9 -9
  50. data/data/solutions/reddit/ruby/2017/04.yml +4 -4
  51. data/data/solutions/reddit/ruby/2017/05.yml +12 -12
  52. data/data/solutions/reddit/ruby/2017/06.yml +16 -16
  53. data/data/solutions/reddit/ruby/2017/07.yml +5 -5
  54. data/data/solutions/reddit/ruby/2017/08.yml +18 -18
  55. data/data/solutions/reddit/ruby/2017/09.yml +7 -7
  56. data/data/solutions/reddit/ruby/2017/10.yml +9 -9
  57. data/data/solutions/reddit/ruby/2017/11.yml +1 -1
  58. data/data/solutions/reddit/ruby/2017/12.yml +6 -6
  59. data/data/solutions/reddit/ruby/2017/13.yml +6 -6
  60. data/data/solutions/reddit/ruby/2017/14.yml +1 -1
  61. data/data/solutions/reddit/ruby/2017/15.yml +3 -3
  62. data/data/solutions/reddit/ruby/2017/16.yml +5 -5
  63. data/data/solutions/reddit/ruby/2017/17.yml +6 -6
  64. data/data/solutions/reddit/ruby/2017/18.yml +7 -7
  65. data/data/solutions/reddit/ruby/2017/19.yml +2 -2
  66. data/data/solutions/reddit/ruby/2017/20.yml +5 -5
  67. data/data/solutions/reddit/ruby/2017/21.yml +11 -11
  68. data/data/solutions/reddit/ruby/2017/22.yml +1 -1
  69. data/data/solutions/reddit/ruby/2017/23.yml +1 -1
  70. data/data/solutions/reddit/ruby/2017/25.yml +3 -3
  71. data/data/solutions/reddit/ruby/2018/01.yml +20 -20
  72. data/data/solutions/reddit/ruby/2018/02.yml +16 -16
  73. data/data/solutions/reddit/ruby/2018/03.yml +12 -12
  74. data/data/solutions/reddit/ruby/2018/04.yml +6 -6
  75. data/data/solutions/reddit/ruby/2018/05.yml +15 -15
  76. data/data/solutions/reddit/ruby/2018/06.yml +4 -4
  77. data/data/solutions/reddit/ruby/2018/07.yml +11 -11
  78. data/data/solutions/reddit/ruby/2018/08.yml +9 -9
  79. data/data/solutions/reddit/ruby/2018/09.yml +13 -13
  80. data/data/solutions/reddit/ruby/2018/10.yml +10 -10
  81. data/data/solutions/reddit/ruby/2018/11.yml +9 -9
  82. data/data/solutions/reddit/ruby/2018/12.yml +2 -2
  83. data/data/solutions/reddit/ruby/2018/13.yml +14 -14
  84. data/data/solutions/reddit/ruby/2018/14.yml +5 -5
  85. data/data/solutions/reddit/ruby/2018/15.yml +2 -2
  86. data/data/solutions/reddit/ruby/2018/16.yml +7 -7
  87. data/data/solutions/reddit/ruby/2018/17.yml +1 -1
  88. data/data/solutions/reddit/ruby/2018/18.yml +6 -6
  89. data/data/solutions/reddit/ruby/2018/19.yml +1 -1
  90. data/data/solutions/reddit/ruby/2018/20.yml +1 -1
  91. data/data/solutions/reddit/ruby/2018/21.yml +4 -4
  92. data/data/solutions/reddit/ruby/2018/22.yml +3 -3
  93. data/data/solutions/reddit/ruby/2018/23.yml +11 -11
  94. data/data/solutions/reddit/ruby/2018/24.yml +4 -4
  95. data/data/solutions/reddit/ruby/2018/25.yml +6 -6
  96. data/data/solutions/reddit/ruby/2019/01.yml +11 -11
  97. data/data/solutions/reddit/ruby/2019/02.yml +13 -13
  98. data/data/solutions/reddit/ruby/2019/03.yml +7 -7
  99. data/data/solutions/reddit/ruby/2019/04.yml +11 -11
  100. data/data/solutions/reddit/ruby/2019/05.yml +10 -10
  101. data/data/solutions/reddit/ruby/2019/06.yml +7 -7
  102. data/data/solutions/reddit/ruby/2019/07.yml +8 -8
  103. data/data/solutions/reddit/ruby/2019/08.yml +8 -8
  104. data/data/solutions/reddit/ruby/2019/09.yml +4 -4
  105. data/data/solutions/reddit/ruby/2019/10.yml +4 -4
  106. data/data/solutions/reddit/ruby/2019/11.yml +7 -7
  107. data/data/solutions/reddit/ruby/2019/12.yml +17 -17
  108. data/data/solutions/reddit/ruby/2019/13.yml +6 -6
  109. data/data/solutions/reddit/ruby/2019/14.yml +2 -2
  110. data/data/solutions/reddit/ruby/2019/15.yml +3 -3
  111. data/data/solutions/reddit/ruby/2019/16.yml +6 -6
  112. data/data/solutions/reddit/ruby/2019/17.yml +3 -3
  113. data/data/solutions/reddit/ruby/2019/18.yml +1 -1
  114. data/data/solutions/reddit/ruby/2019/20.yml +9 -9
  115. data/data/solutions/reddit/ruby/2019/21.yml +3 -3
  116. data/data/solutions/reddit/ruby/2019/22.yml +3 -3
  117. data/data/solutions/reddit/ruby/2019/23.yml +1 -1
  118. data/data/solutions/reddit/ruby/2019/25.yml +2 -2
  119. data/data/solutions/reddit/ruby/2020/01.yml +30 -30
  120. data/data/solutions/reddit/ruby/2020/02.yml +25 -25
  121. data/data/solutions/reddit/ruby/2020/03.yml +17 -17
  122. data/data/solutions/reddit/ruby/2020/04.yml +26 -26
  123. data/data/solutions/reddit/ruby/2020/05.yml +35 -35
  124. data/data/solutions/reddit/ruby/2020/06.yml +40 -40
  125. data/data/solutions/reddit/ruby/2020/07.yml +16 -16
  126. data/data/solutions/reddit/ruby/2020/08.yml +13 -13
  127. data/data/solutions/reddit/ruby/2020/09.yml +21 -21
  128. data/data/solutions/reddit/ruby/2020/10.yml +29 -29
  129. data/data/solutions/reddit/ruby/2020/11.yml +8 -8
  130. data/data/solutions/reddit/ruby/2020/12.yml +22 -22
  131. data/data/solutions/reddit/ruby/2020/13.yml +15 -15
  132. data/data/solutions/reddit/ruby/2020/14.yml +11 -11
  133. data/data/solutions/reddit/ruby/2020/15.yml +9 -9
  134. data/data/solutions/reddit/ruby/2020/16.yml +13 -13
  135. data/data/solutions/reddit/ruby/2020/17.yml +11 -11
  136. data/data/solutions/reddit/ruby/2020/18.yml +19 -19
  137. data/data/solutions/reddit/ruby/2020/19.yml +18 -18
  138. data/data/solutions/reddit/ruby/2020/20.yml +4 -4
  139. data/data/solutions/reddit/ruby/2020/21.yml +4 -4
  140. data/data/solutions/reddit/ruby/2020/22.yml +8 -8
  141. data/data/solutions/reddit/ruby/2020/23.yml +4 -4
  142. data/data/solutions/reddit/ruby/2020/24.yml +6 -6
  143. data/data/solutions/reddit/ruby/2020/25.yml +6 -6
  144. data/data/solutions/reddit/ruby/2021/01.yml +74 -74
  145. data/data/solutions/reddit/ruby/2021/02.yml +45 -45
  146. data/data/solutions/reddit/ruby/2021/03.yml +43 -43
  147. data/data/solutions/reddit/ruby/2021/04.yml +23 -23
  148. data/data/solutions/reddit/ruby/2021/05.yml +16 -16
  149. data/data/solutions/reddit/ruby/2021/06.yml +35 -35
  150. data/data/solutions/reddit/ruby/2021/07.yml +26 -26
  151. data/data/solutions/reddit/ruby/2021/08.yml +15 -15
  152. data/data/solutions/reddit/ruby/2021/09.yml +11 -11
  153. data/data/solutions/reddit/ruby/2021/10.yml +9 -9
  154. data/data/solutions/reddit/ruby/2021/11.yml +12 -12
  155. data/data/solutions/reddit/ruby/2021/12.yml +8 -8
  156. data/data/solutions/reddit/ruby/2021/13.yml +13 -13
  157. data/data/solutions/reddit/ruby/2021/14.yml +10 -10
  158. data/data/solutions/reddit/ruby/2021/15.yml +10 -10
  159. data/data/solutions/reddit/ruby/2021/16.yml +8 -8
  160. data/data/solutions/reddit/ruby/2021/17.yml +6 -6
  161. data/data/solutions/reddit/ruby/2021/18.yml +5 -5
  162. data/data/solutions/reddit/ruby/2021/19.yml +3 -3
  163. data/data/solutions/reddit/ruby/2021/20.yml +5 -5
  164. data/data/solutions/reddit/ruby/2021/21.yml +5 -5
  165. data/data/solutions/reddit/ruby/2021/22.yml +4 -4
  166. data/data/solutions/reddit/ruby/2021/23.yml +7 -7
  167. data/data/solutions/reddit/ruby/2021/24.yml +8 -8
  168. data/data/solutions/reddit/ruby/2021/25.yml +4 -4
  169. data/data/solutions/reddit/ruby/2022/01.yml +29 -29
  170. data/data/solutions/reddit/ruby/2022/02.yml +21 -21
  171. data/data/solutions/reddit/ruby/2022/03.yml +35 -35
  172. data/data/solutions/reddit/ruby/2022/04.yml +42 -42
  173. data/data/solutions/reddit/ruby/2022/05.yml +29 -29
  174. data/data/solutions/reddit/ruby/2022/06.yml +38 -38
  175. data/data/solutions/reddit/ruby/2022/07.yml +25 -25
  176. data/data/solutions/reddit/ruby/2022/08.yml +9 -9
  177. data/data/solutions/reddit/ruby/2022/09.yml +18 -18
  178. data/data/solutions/reddit/ruby/2022/10.yml +14 -14
  179. data/data/solutions/reddit/ruby/2022/11.yml +7 -7
  180. data/data/solutions/reddit/ruby/2022/12.yml +2 -2
  181. data/data/solutions/reddit/ruby/2022/13.yml +9 -9
  182. data/data/solutions/reddit/ruby/2022/14.yml +5 -5
  183. data/data/solutions/reddit/ruby/2022/15.yml +6 -6
  184. data/data/solutions/reddit/ruby/2022/16.yml +5 -5
  185. data/data/solutions/reddit/ruby/2022/17.yml +2 -2
  186. data/data/solutions/reddit/ruby/2022/18.yml +6 -6
  187. data/data/solutions/reddit/ruby/2022/19.yml +3 -3
  188. data/data/solutions/reddit/ruby/2022/20.yml +12 -12
  189. data/data/solutions/reddit/ruby/2022/21.yml +11 -11
  190. data/data/solutions/reddit/ruby/2022/22.yml +4 -4
  191. data/data/solutions/reddit/ruby/2022/24.yml +10 -10
  192. data/data/solutions/reddit/ruby/2022/25.yml +10 -10
  193. data/data/solutions/reddit/ruby/2023/01.yml +52 -52
  194. data/data/solutions/reddit/ruby/2023/02.yml +21 -21
  195. data/data/solutions/reddit/ruby/2023/03.yml +18 -18
  196. data/data/solutions/reddit/ruby/2023/04.yml +31 -31
  197. data/data/solutions/reddit/ruby/2023/05.yml +14 -14
  198. data/data/solutions/reddit/ruby/2023/06.yml +24 -24
  199. data/data/solutions/reddit/ruby/2023/07.yml +32 -32
  200. data/data/solutions/reddit/ruby/2023/08.yml +20 -20
  201. data/data/solutions/reddit/ruby/2023/09.yml +32 -32
  202. data/data/solutions/reddit/ruby/2023/10.yml +18 -18
  203. data/data/solutions/reddit/ruby/2023/11.yml +16 -16
  204. data/data/solutions/reddit/ruby/2023/12.yml +5 -5
  205. data/data/solutions/reddit/ruby/2023/13.yml +6 -6
  206. data/data/solutions/reddit/ruby/2023/14.yml +14 -14
  207. data/data/solutions/reddit/ruby/2023/15.yml +13 -13
  208. data/data/solutions/reddit/ruby/2023/16.yml +8 -8
  209. data/data/solutions/reddit/ruby/2023/18.yml +5 -5
  210. data/data/solutions/reddit/ruby/2023/19.yml +6 -6
  211. data/data/solutions/reddit/ruby/2023/20.yml +9 -9
  212. data/data/solutions/reddit/ruby/2023/21.yml +5 -5
  213. data/data/solutions/reddit/ruby/2023/22.yml +2 -2
  214. data/data/solutions/reddit/ruby/2023/23.yml +1 -1
  215. data/data/solutions/reddit/ruby/2023/25.yml +1 -1
  216. data/data/solutions/reddit/ruby/2024/01.yml +15 -15
  217. data/data/solutions/reddit/ruby/2024/02.yml +17 -17
  218. data/data/solutions/reddit/ruby/2024/03.yml +43 -43
  219. data/data/solutions/reddit/ruby/2024/04.yml +18 -18
  220. data/data/solutions/reddit/ruby/2024/05.yml +29 -29
  221. data/data/solutions/reddit/ruby/2024/06.yml +19 -19
  222. data/data/solutions/reddit/ruby/2024/07.yml +26 -26
  223. data/data/solutions/reddit/ruby/2024/08.yml +15 -15
  224. data/data/solutions/reddit/ruby/2024/09.yml +5 -5
  225. data/data/solutions/reddit/ruby/2024/10.yml +9 -9
  226. data/data/solutions/reddit/ruby/2024/11.yml +15 -15
  227. data/data/solutions/reddit/ruby/2024/12.yml +9 -9
  228. data/data/solutions/reddit/ruby/2024/13.yml +10 -10
  229. data/data/solutions/reddit/ruby/2024/14.yml +6 -6
  230. data/data/solutions/reddit/ruby/2024/15.yml +5 -5
  231. data/data/solutions/reddit/ruby/2024/16.yml +4 -4
  232. data/data/solutions/reddit/ruby/2024/17.yml +11 -11
  233. data/data/solutions/reddit/ruby/2024/18.yml +9 -9
  234. data/data/solutions/reddit/ruby/2024/19.yml +16 -16
  235. data/data/solutions/reddit/ruby/2024/20.yml +8 -8
  236. data/data/solutions/reddit/ruby/2024/21.yml +3 -3
  237. data/data/solutions/reddit/ruby/2024/22.yml +8 -8
  238. data/data/solutions/reddit/ruby/2024/23.yml +13 -13
  239. data/data/solutions/reddit/ruby/2024/24.yml +7 -7
  240. data/data/solutions/reddit/ruby/2024/25.yml +14 -14
  241. data/lib/arb/api/aoc.rb +2 -2
  242. data/lib/arb/cli/run.rb +2 -3
  243. data/lib/arb/version.rb +1 -1
  244. data/lib/download_solutions/api/reddit/get_serial_comments.rb +1 -1
  245. metadata +2 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: p_tseng
3
- :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebjsc3u/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebjsc3u
4
4
  :body: |-
5
5
  Hello. Ruby, runs in 1 second, using https://en.wikipedia.org/wiki/Summed-area\_table, that would make it O(n^3 )
6
6
 
@@ -64,11 +64,11 @@
64
64
  ```
65
65
  :replies:
66
66
  - :author: beached
67
- :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebll01x/
67
+ :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebll01x
68
68
  :body: In C++ using summed area tables is \<8ms. One of the few times storing data vs a simple calculation is faster
69
69
  :replies: []
70
70
  - :author: WikiTextBot
71
- :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebjscbq/
71
+ :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebjscbq
72
72
  :body: |-
73
73
  **Summed-area table**
74
74
 
@@ -79,7 +79,7 @@
79
79
  ^[[^PM](https://www.reddit.com/message/compose?to=kittens_from_space) ^| [^Exclude ^me](https://reddit.com/message/compose?to=WikiTextBot&message=Excludeme&subject=Excludeme) ^| [^Exclude ^from ^subreddit](https://np.reddit.com/r/adventofcode/about/banned) ^| [^FAQ ^/ ^Information](https://np.reddit.com/r/WikiTextBot/wiki/index) ^| [^Source](https://github.com/kittenswolf/WikiTextBot) ^] ^Downvote ^to ^remove ^| ^v0.28
80
80
  :replies: []
81
81
  - :author: ChronJob
82
- :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebjppk9/
82
+ :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebjppk9
83
83
  :body: |-
84
84
  Ruby
85
85
 
@@ -120,15 +120,15 @@
120
120
  ```
121
121
  :replies:
122
122
  - :author: d4be4st
123
- :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebleudd/
123
+ :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebleudd
124
124
  :body: Is there a reason you only took 20 points for the width of the biggest square?
125
125
  :replies:
126
126
  - :author: ChronJob
127
- :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebllv6c/
127
+ :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebllv6c
128
128
  :body: Nope. It was an arbitrary cut-off based on how long I was willing to spend searching at that time :P.
129
129
  :replies: []
130
130
  - :author: oezi13
131
- :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebjrbnj/
131
+ :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebjrbnj
132
132
  :body: |-
133
133
  Based on my puzzle input - Largest square at 231, 135 with gridsize 8:
134
134
 
@@ -200,7 +200,7 @@
200
200
  ```
201
201
  :replies:
202
202
  - :author: imguralbumbot
203
- :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebjrbx4/
203
+ :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebjrbx4
204
204
  :body: |-
205
205
  ^(Hi, I'm a bot for linking direct images of albums with only 1 image)
206
206
 
@@ -209,7 +209,7 @@
209
209
  ^^[Source](https://github.com/AUTplayed/imguralbumbot) ^^| ^^[Why?](https://github.com/AUTplayed/imguralbumbot/blob/master/README.md) ^^| ^^[Creator](https://np.reddit.com/user/AUTplayed/) ^^| ^^[ignoreme](https://np.reddit.com/message/compose/?to=imguralbumbot&subject=ignoreme&message=ignoreme) ^^| ^^[deletthis](https://np.reddit.com/message/compose/?to=imguralbumbot&subject=delet%20this&message=delet%20this%20ebjrbx4)
210
210
  :replies: []
211
211
  - :author: HeyItsBATMANagain
212
- :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebk9m8w/
212
+ :url: https://www.reddit.com/r/adventofcode/comments/a53r6i/2018_day_11_solutions/ebk9m8w
213
213
  :body: |-
214
214
  # Crystal
215
215
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: p_tseng
3
- :url: https://www.reddit.com/r/adventofcode/comments/a5eztl/2018_day_12_solutions/ebm4fz5/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a5eztl/2018_day_12_solutions/ebm4fz5
4
4
  :body: |-
5
5
  Part 1: I got confused for a moment because I forgot to actually store the rules. You'll notice that I wrote a `fetch` which errors if the key doesn't exist, since I saw "all patterns are present" in the description. But this made me wonder whether I was missing a pattern, and I spent some time trying to figure out whether my input had accidentally gotten truncated. Then I realised, of course, 32 is in fact the correct number of lines in the input. And then I discovered I actually forgot to store the rules.
6
6
 
@@ -51,7 +51,7 @@
51
51
  ```
52
52
  :replies:
53
53
  - :author: OneParanoidDuck
54
- :url: https://www.reddit.com/r/adventofcode/comments/a5eztl/2018_day_12_solutions/ebx6nm8/
54
+ :url: https://www.reddit.com/r/adventofcode/comments/a5eztl/2018_day_12_solutions/ebx6nm8
55
55
  :body: |-
56
56
  Finally, someone else who mentions bit patterns.. Seems like I'm the only idiot to actually do it with bitwise operations on integers. Wanted to because I feel I'm getting a bit too comfortable using fancy language constructs.
57
57
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: KeyboardFire
3
- :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/eboleqg/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/eboleqg
4
4
  :body: |-
5
5
  ruby 2nd/1st
6
6
 
@@ -88,7 +88,7 @@
88
88
  ```
89
89
  :replies:
90
90
  - :author: topaz2078
91
- :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebolgt5/
91
+ :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebolgt5
92
92
  :body: |-
93
93
  > ruby 2nd/1st
94
94
 
@@ -99,34 +99,34 @@
99
99
  Note to self, make a 100000-wide grid next time.
100
100
  :replies: []
101
101
  - :author: dtinth
102
- :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebomfmk/
102
+ :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebomfmk
103
103
  :body: |-
104
104
  Congrats on getting 2nd/1st!
105
105
 
106
106
  Just a bit of tip that you can sort an array by multiple values by using an Array as a sort key: `ca.sort_by!{|c|[c.y,c.x]}`
107
107
  :replies:
108
108
  - :author: KeyboardFire
109
- :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebomq8c/
109
+ :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebomq8c
110
110
  :body: oh cool, i didn't know that. thanks!
111
111
  :replies: []
112
112
  - :author: jonathan_paulson
113
- :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebom43c/
113
+ :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebom43c
114
114
  :body: Thanks for posting. Your code for handling the rotations (`\ / +`) is really concise!
115
115
  :replies: []
116
116
  - :author: markasoftware
117
- :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebomy9b/
117
+ :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebomy9b
118
118
  :body: Holy shit, storing x and y component velocities never crossed my mind! Absolutely brilliant!
119
119
  :replies: []
120
120
  - :author: sigacuckoo
121
- :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebose9c/
121
+ :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebose9c
122
122
  :body: Directions as speed vector really cleans the code up! I used the transition maps like most of the people.
123
123
  :replies: []
124
124
  - :author: tobiasvl
125
- :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/eboxdwy/
125
+ :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/eboxdwy
126
126
  :body: For me, part 2 seems to be off by one in the X coordinate (I had `54,66` while your code prints out `55\n66`).
127
127
  :replies: []
128
128
  - :author: VikeStep
129
- :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebp3lw0/
129
+ :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebp3lw0
130
130
  :body: |-
131
131
  Just fyi, your example above the code has the permutations switched around for the corners. It should be the following as it appears in your code:
132
132
 
@@ -136,23 +136,23 @@
136
136
  ```
137
137
  :replies:
138
138
  - :author: KeyboardFire
139
- :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebqu451/
139
+ :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebqu451
140
140
  :body: whoops, fixed that, thanks!
141
141
  :replies: []
142
142
  - :author: jtgorn
143
- :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebqm2re/
143
+ :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebqm2re
144
144
  :body: Beautiful. What sort of syntax is it ?v ?^ etc.. ?
145
145
  :replies:
146
146
  - :author: KeyboardFire
147
- :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebqu5d6/
147
+ :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebqu5d6
148
148
  :body: it's sugar for single-character strings (e.g. `?v == "v"`)
149
149
  :replies:
150
150
  - :author: jtgorn
151
- :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebtbonm/
151
+ :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebtbonm
152
152
  :body: Thanks! I have learned one thing today :)
153
153
  :replies: []
154
154
  - :author: koordinate
155
- :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ecgbyjm/
155
+ :url: https://www.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ecgbyjm
156
156
  :body: |-
157
157
  Nice. Thank you for sharing.
158
158
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: ni3t
3
- :url: https://www.reddit.com/r/adventofcode/comments/a61ojp/2018_day_14_solutions/ebr5ufg/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a61ojp/2018_day_14_solutions/ebr5ufg
4
4
  :body: |-
5
5
  ## CARD The Christmas/Advent Research & Development (C.A.R.D.) department at AoC, Inc. just published a new white paper on Elf Chocolate Recipes.
6
6
 
@@ -42,7 +42,7 @@
42
42
  ```
43
43
  :replies: []
44
44
  - :author: Unihedron
45
- :url: https://www.reddit.com/r/adventofcode/comments/a61ojp/2018_day_14_solutions/ebr3em5/
45
+ :url: https://www.reddit.com/r/adventofcode/comments/a61ojp/2018_day_14_solutions/ebr3em5
46
46
  :body: |-
47
47
  [Card] [image](https://i.imgur.com/w5qydaR.png)
48
48
 
@@ -102,7 +102,7 @@
102
102
  ```
103
103
  :replies: []
104
104
  - :author: _liquidlemon
105
- :url: https://www.reddit.com/r/adventofcode/comments/a61ojp/2018_day_14_solutions/ebrask4/
105
+ :url: https://www.reddit.com/r/adventofcode/comments/a61ojp/2018_day_14_solutions/ebrask4
106
106
  :body: |-
107
107
  **Ruby**
108
108
 
@@ -152,7 +152,7 @@
152
152
  ```
153
153
  :replies:
154
154
  - :author: kamireri
155
- :url: https://www.reddit.com/r/adventofcode/comments/a61ojp/2018_day_14_solutions/ebvh39s/
155
+ :url: https://www.reddit.com/r/adventofcode/comments/a61ojp/2018_day_14_solutions/ebvh39s
156
156
  :body: |-
157
157
  There's a small bug in the last if/else statement in the block. When the next digit doesn't match the one that we're expecting in the pattern, it might be the first digit of the pattern. I've put a revised version below. It now produces the correct result for the '01245' test input.
158
158
 
@@ -199,7 +199,7 @@
199
199
  ```
200
200
  :replies: []
201
201
  - :author: jtgorn
202
- :url: https://www.reddit.com/r/adventofcode/comments/a61ojp/2018_day_14_solutions/ebtfakm/
202
+ :url: https://www.reddit.com/r/adventofcode/comments/a61ojp/2018_day_14_solutions/ebtfakm
203
203
  :body: |-
204
204
  I love ruby
205
205
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: leio10
3
- :url: https://www.reddit.com/r/adventofcode/comments/a6chwa/2018_day_15_solutions/ebvjsbq/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a6chwa/2018_day_15_solutions/ebvjsbq
4
4
  :body: |-
5
5
  [Ruby]
6
6
 
@@ -9,7 +9,7 @@
9
9
  My biggest problem was that I was considering the _reading order_ when choosing the next step for moving, but not doing it to choose the target adjacent square. I even passed the part 1 with this error, but not the part 2. I finally fixed adding the target to array in [https://gist.github.com/leio10/6a73c9380348a2ff57d54185d1d40d25#file-aoc-day15-rb-L85](https://gist.github.com/leio10/6a73c9380348a2ff57d54185d1d40d25#file-aoc-day15-rb-L85)
10
10
  :replies: []
11
11
  - :author: "[deleted]"
12
- :url: https://www.reddit.com/r/adventofcode/comments/a6chwa/2018_day_15_solutions/ebxknfq/
12
+ :url: https://www.reddit.com/r/adventofcode/comments/a6chwa/2018_day_15_solutions/ebxknfq
13
13
  :body: |-
14
14
  This took me a while, and my solution in **Ruby** is a bit verbose - but I tried to make it easy to follow (at least for myself) to minimize mistakes.
15
15
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: p_tseng
3
- :url: https://www.reddit.com/r/adventofcode/comments/a6mf8a/2018_day_16_solutions/ebw7asl/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a6mf8a/2018_day_16_solutions/ebw7asl
4
4
  :body: |-
5
5
  A very fun logic puzzle!
6
6
 
@@ -92,22 +92,22 @@
92
92
  ```
93
93
  :replies:
94
94
  - :author: BluFoot
95
- :url: https://www.reddit.com/r/adventofcode/comments/a6mf8a/2018_day_16_solutions/ebw7nrw/
95
+ :url: https://www.reddit.com/r/adventofcode/comments/a6mf8a/2018_day_16_solutions/ebw7nrw
96
96
  :body: |-
97
97
  > raise 'You forgot an instruction...' if instructions.size != 16
98
98
 
99
99
  I wish I'd written this, would have saved me a lot of time!!
100
100
  :replies:
101
101
  - :author: sigacuckoo
102
- :url: https://www.reddit.com/r/adventofcode/comments/a6mf8a/2018_day_16_solutions/ebx88wi/
102
+ :url: https://www.reddit.com/r/adventofcode/comments/a6mf8a/2018_day_16_solutions/ebx88wi
103
103
  :body: Hahaha :( I lost so much time because i forgot to add one of the commands to the list.
104
104
  :replies: []
105
105
  - :author: ButItMightJustWork
106
- :url: https://www.reddit.com/r/adventofcode/comments/a6mf8a/2018_day_16_solutions/ebwdjta/
106
+ :url: https://www.reddit.com/r/adventofcode/comments/a6mf8a/2018_day_16_solutions/ebwdjta
107
107
  :body: 'regarding your spoiler/hint: I just assuned that this was the case and implemented the necessary code.'
108
108
  :replies: []
109
109
  - :author: BluFoot
110
- :url: https://www.reddit.com/r/adventofcode/comments/a6mf8a/2018_day_16_solutions/ebw7hzj/
110
+ :url: https://www.reddit.com/r/adventofcode/comments/a6mf8a/2018_day_16_solutions/ebw7hzj
111
111
  :body: |-
112
112
  Ruby, #117/127. Somehow skipped over the binary OR instructions in part 1, and had brain lag trying to figure out part 2. But overall happy with the solution!
113
113
 
@@ -189,7 +189,7 @@
189
189
  ```
190
190
  :replies: []
191
191
  - :author: nuvan
192
- :url: https://www.reddit.com/r/adventofcode/comments/a6mf8a/2018_day_16_solutions/ebw8q6u/
192
+ :url: https://www.reddit.com/r/adventofcode/comments/a6mf8a/2018_day_16_solutions/ebw8q6u
193
193
  :body: |-
194
194
  **Ruby** 177/321
195
195
 
@@ -308,6 +308,6 @@
308
308
  ```
309
309
  :replies:
310
310
  - :author: BluFoot
311
- :url: https://www.reddit.com/r/adventofcode/comments/a6mf8a/2018_day_16_solutions/ebx06fa/
311
+ :url: https://www.reddit.com/r/adventofcode/comments/a6mf8a/2018_day_16_solutions/ebx06fa
312
312
  :body: Tabs?! In Ruby?! HERESY!
313
313
  :replies: []
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: p_tseng
3
- :url: https://www.reddit.com/r/adventofcode/comments/a6wpup/2018_day_17_solutions/ec0lfem/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a6wpup/2018_day_17_solutions/ec0lfem
4
4
  :body: |-
5
5
  I found this one fun because it was a mix of novel and interesting. My favourite so far.
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: p_tseng
3
- :url: https://www.reddit.com/r/adventofcode/comments/a77xq6/2018_day_18_solutions/ec15imz/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a77xq6/2018_day_18_solutions/ec15imz
4
4
  :body: |-
5
5
  The below is NOT the code I used to get into the leaderboard (since that was mostly vanilla)... it is instead kind of insane code. My leaderboard code took 3-4 seconds to run and I was not satisfied.
6
6
 
@@ -200,22 +200,22 @@
200
200
  ```
201
201
  :replies:
202
202
  - :author: evonfriedland
203
- :url: https://www.reddit.com/r/adventofcode/comments/a77xq6/2018_day_18_solutions/ec2fdb2/
203
+ :url: https://www.reddit.com/r/adventofcode/comments/a77xq6/2018_day_18_solutions/ec2fdb2
204
204
  :body: Thanks for sharing your code, p\_tseng. Are there any good (perhaps with diagrams) walkthroughs of the lookup table approach you might recommend?
205
205
  :replies:
206
206
  - :author: p_tseng
207
- :url: https://www.reddit.com/r/adventofcode/comments/a77xq6/2018_day_18_solutions/ec2qyur/
207
+ :url: https://www.reddit.com/r/adventofcode/comments/a77xq6/2018_day_18_solutions/ec2qyur
208
208
  :body: |-
209
209
  This is an interesting one because I don't think I found anything with diagrams, but I found Stack Exchange answer https://codereview.stackexchange.com/questions/42718/optimize-conways-game-of-life/42790#42790 to be useful.
210
210
 
211
211
  (In case it hasn't already been mentioned, day 18 bears enough resemblance to Conway's Game of Life that the opportunities for speedups are similar between the two. Therefore, search results for "fast game of life" or "optimise game of life" are likely to be useful. I only knew this because this is not the first time it's come up in Advent of Code, since we had https://adventofcode.com/2015/day/18 )
212
212
  :replies: []
213
213
  - :author: xepherys
214
- :url: https://www.reddit.com/r/adventofcode/comments/a77xq6/2018_day_18_solutions/ed9mx0t/
214
+ :url: https://www.reddit.com/r/adventofcode/comments/a77xq6/2018_day_18_solutions/ed9mx0t
215
215
  :body: Very nice. I'm trying desperately to rewrite this in C#, but not knowing Ruby is making it slightly difficult. Building your lookup table initially and your iterate func mostly make sense... I'm sure I can figure it out eventually lol.
216
216
  :replies: []
217
217
  - :author: BluFoot
218
- :url: https://www.reddit.com/r/adventofcode/comments/a77xq6/2018_day_18_solutions/ec1244r/
218
+ :url: https://www.reddit.com/r/adventofcode/comments/a77xq6/2018_day_18_solutions/ec1244r
219
219
  :body: |-
220
220
  Ruby, 246/190.
221
221
 
@@ -274,6 +274,6 @@
274
274
  ```
275
275
  :replies:
276
276
  - :author: ka-splam
277
- :url: https://www.reddit.com/r/adventofcode/comments/a77xq6/2018_day_18_solutions/ec14om3/
277
+ :url: https://www.reddit.com/r/adventofcode/comments/a77xq6/2018_day_18_solutions/ec14om3
278
278
  :body: Please, fix your code formatting?
279
279
  :replies: []
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: ni3t
3
- :url: https://www.reddit.com/r/adventofcode/comments/a7j9zc/2018_day_19_solutions/ec4s3z4/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a7j9zc/2018_day_19_solutions/ec4s3z4
4
4
  :body: |-
5
5
  # Ruby 2.5
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: nuvan
3
- :url: https://www.reddit.com/r/adventofcode/comments/a7uk3f/2018_day_20_solutions/ec5y7tq/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a7uk3f/2018_day_20_solutions/ec5y7tq
4
4
  :body: |-
5
5
  **Ruby** 117/91
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: KeyboardFire
3
- :url: https://www.reddit.com/r/adventofcode/comments/a86jgt/2018_day_21_solutions/ec8fsc5/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a86jgt/2018_day_21_solutions/ec8fsc5
4
4
  :body: |-
5
5
  ruby, 21/24. i'm posting the interesting bit because this wasn't actually my part 2 code (i bruteforced it), but i'm glad i managed to finish the reverse engineering by hand before the leaderboard got capped, so:
6
6
 
@@ -34,15 +34,15 @@
34
34
  8595037 and 65899 are presumably per-user constants. all those bitwise ands with ffffff are just to make `b` behave as if it were an unsigned 24-bit int. this solves part 2 in a few milliseconds (my brute force took several minutes).
35
35
  :replies:
36
36
  - :author: jonathan_paulson
37
- :url: https://www.reddit.com/r/adventofcode/comments/a86jgt/2018_day_21_solutions/ec8fycp/
37
+ :url: https://www.reddit.com/r/adventofcode/comments/a86jgt/2018_day_21_solutions/ec8fycp
38
38
  :body: What do you mean by "I bruteforced it" for part 2? You have to know to look for a cycle to figure out when to print the answer, right?
39
39
  :replies:
40
40
  - :author: KeyboardFire
41
- :url: https://www.reddit.com/r/adventofcode/comments/a86jgt/2018_day_21_solutions/ec8g32j/
41
+ :url: https://www.reddit.com/r/adventofcode/comments/a86jgt/2018_day_21_solutions/ec8g32j
42
42
  :body: yeah, i knew based on the challenge description that it'd have to cycle, so i just ran the input through my "emulator" without any optimizations and printed the values of the register whenever they were compared to register 0, then found when that first started cycling.
43
43
  :replies: []
44
44
  - :author: Etsap1
45
- :url: https://www.reddit.com/r/adventofcode/comments/a86jgt/2018_day_21_solutions/ec9fybq/
45
+ :url: https://www.reddit.com/r/adventofcode/comments/a86jgt/2018_day_21_solutions/ec9fybq
46
46
  :body: |-
47
47
  My brute force solution took almost 30 minutes to run. Here is the optimized version in ruby, which usually runs in less than 20ms:
48
48
 
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  - :author: Immediate_Channel
3
- :url: https://www.reddit.com/r/adventofcode/comments/a8i1cy/2018_day_22_solutions/ecc2o5o/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a8i1cy/2018_day_22_solutions/ecc2o5o
4
4
  :body: |-
5
5
  My **ruby** solution takes 188 seconds to run with a handrolled A\*. What am I doing wrong?
6
6
 
7
7
  https://pastebin.com/raw/WtZ8ALEK
8
8
  :replies:
9
9
  - :author: dark_terrax
10
- :url: https://www.reddit.com/r/adventofcode/comments/a8i1cy/2018_day_22_solutions/ecc6n6k/
10
+ :url: https://www.reddit.com/r/adventofcode/comments/a8i1cy/2018_day_22_solutions/ecc6n6k
11
11
  :body: |-
12
12
  I don't know Ruby at all, but just glancing at your solution, my guess is that the inner loop of your pathfinding solution is going to be insanely expensive due to not using a proper priority\_queue.
13
13
 
@@ -20,7 +20,7 @@
20
20
  I would try finding a decent priority\_queue implementation in Ruby and use that.
21
21
  :replies:
22
22
  - :author: Immediate_Channel
23
- :url: https://www.reddit.com/r/adventofcode/comments/a8i1cy/2018_day_22_solutions/eccam6h/
23
+ :url: https://www.reddit.com/r/adventofcode/comments/a8i1cy/2018_day_22_solutions/eccam6h
24
24
  :body: |-
25
25
  Hey, thanks! I changed it to use a priority queue and my runtime went from 188 seconds to 5.
26
26
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: BluFoot
3
- :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecdbygg/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecdbygg
4
4
  :body: |-
5
5
  **Ruby**. 700/102. Wasted half an hour from missing a minus sign in the regex scan... Yay.
6
6
 
@@ -53,23 +53,23 @@
53
53
  ```
54
54
  :replies:
55
55
  - :author: rawling
56
- :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecddxdj/
56
+ :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecddxdj
57
57
  :body: This is roughly what I did (just... much better), and both my code and it get the same, wrong answer.
58
58
  :replies:
59
59
  - :author: metalim
60
- :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecde25n/
60
+ :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecde25n
61
61
  :body: Because it happens to work only for his specific input. It's not a general solution. Doesn't work for any of my inputs.
62
62
  :replies:
63
63
  - :author: rawling
64
- :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecdeju5/
64
+ :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecdeju5
65
65
  :body: Yeah, I think I can visualise a situation where the shrinking grid homes in on a local maximum but misses the global maximum that was hiding between grid points.
66
66
  :replies: []
67
67
  - :author: xiongtx
68
- :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecejs06/
68
+ :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecejs06
69
69
  :body: "> Wasted half an hour from missing a minus sign in the regex scan... Yay.\n\n\U0001F602 Every day I fall into a different \U0001F573️...and it seems I'm never alone!"
70
70
  :replies: []
71
71
  - :author: p_tseng
72
- :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecddocv/
72
+ :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecddocv
73
73
  :body: |-
74
74
  So, despite having done well today, I just found an input that my solution doesn't work for, so it's definitely not general. It worked for me, but I'll have to look into a better approach for other inputs. The zoom in/zoom out strategy seems like it has a ton of promise so I'm going to try that next.
75
75
 
@@ -161,14 +161,14 @@
161
161
  ```
162
162
  :replies:
163
163
  - :author: rcuhljr
164
- :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecddx2g/
164
+ :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecddx2g
165
165
  :body: |-
166
166
  > So, despite having done well today, I just found an input that my solution doesn't work for, so it's definitely not general. It worked for me, but I'll have to look into a better approach for other inputs. The zoom in/zoom out strategy seems like it has a ton of promise so I'm going to try that next.
167
167
 
168
168
  You're not alone, I've been pulling my hair out over my solution. I came here for some sanity checks, and people were generally taking naive approaches similar to what I was doing (moving closer looking for better local maximas). Taking that I tried some other solutions with my data to see if I just had a problem with my implementation, so far I've tried 4 other solvers and none has yielded a correct solution, I'm going to try the Z3 sat solver next and see how it does, but that's a super unsatisfying (hah) approach.
169
169
  :replies: []
170
170
  - :author: p_tseng
171
- :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/echnznq/
171
+ :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/echnznq
172
172
  :body: |-
173
173
  At this point, I've explored a bunch of solutions and I'm going to throw my hat in with the strategy of splitting the search space into octants and calculating an **upper bound** of the number of intersections for the regions created. When you contract down to a single point, you know the bound is exact. When all remaining candidates have upper bounds smaller than the best you've found so far, you terminate the search because you know you can do no better than what you've already found.
174
174
 
@@ -358,15 +358,15 @@
358
358
  ```
359
359
  :replies: []
360
360
  - :author: metalim
361
- :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecdeoxn/
361
+ :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecdeoxn
362
362
  :body: "> Yep, doesn't work for both of my inputs. As other 5 solutions from this thread. So far best approach for me was picking random points, then check around, LMAO."
363
363
  :replies:
364
364
  - :author: rawling
365
- :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecdvdyg/
365
+ :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/ecdvdyg
366
366
  :body: "> Edit: This solution is completely bogus. It got the \"right answer\" because it identified a local maximum that just so happened to have an equal Manhattan distance from the origin as my real answer. It thinks the maximum has 834 bots, but my real maximum has 980 bots.\n\nLove it \U0001F602"
367
367
  :replies: []
368
368
  - :author: maus80
369
- :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/echuncc/
369
+ :url: https://www.reddit.com/r/adventofcode/comments/a8s17l/2018_day_23_solutions/echuncc
370
370
  :body: |-
371
371
  Ruby (pure/no gems) implementation (for part 2) that I believe (should) work on any input
372
372
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: dtinth
3
- :url: https://www.reddit.com/r/adventofcode/comments/a91ysq/2018_day_24_solutions/ecfzhjm/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a91ysq/2018_day_24_solutions/ecfzhjm
4
4
  :body: |-
5
5
  **Ruby** , #30/#24
6
6
 
@@ -125,7 +125,7 @@
125
125
  ```
126
126
  :replies: []
127
127
  - :author: BluFoot
128
- :url: https://www.reddit.com/r/adventofcode/comments/a91ysq/2018_day_24_solutions/ecfz1y9/
128
+ :url: https://www.reddit.com/r/adventofcode/comments/a91ysq/2018_day_24_solutions/ecfz1y9
129
129
  :body: |-
130
130
  **Ruby,** 74/48. Loved this one!
131
131
 
@@ -224,10 +224,10 @@
224
224
  ```
225
225
  :replies:
226
226
  - :author: Unihedron
227
- :url: https://www.reddit.com/r/adventofcode/comments/a91ysq/2018_day_24_solutions/ecg1wzj/
227
+ :url: https://www.reddit.com/r/adventofcode/comments/a91ysq/2018_day_24_solutions/ecg1wzj
228
228
  :body: "`0.upto(Float::INFINITY)` can be rewritten to `0.step` for generalization; `.step` with no arguments provided will go on indefinitely with `step=1` (thus allowing lazy enumerable operations)."
229
229
  :replies:
230
230
  - :author: BluFoot
231
- :url: https://www.reddit.com/r/adventofcode/comments/a91ysq/2018_day_24_solutions/ecgh61w/
231
+ :url: https://www.reddit.com/r/adventofcode/comments/a91ysq/2018_day_24_solutions/ecgh61w
232
232
  :body: Thank you! That's great.
233
233
  :replies: []
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: KeyboardFire
3
- :url: https://www.reddit.com/r/adventofcode/comments/a9c61w/2018_day_25_solutions/eci5rgz/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/a9c61w/2018_day_25_solutions/eci5rgz
4
4
  :body: |-
5
5
  ruby, 10/58:
6
6
 
@@ -32,15 +32,15 @@
32
32
  well, i really shouldn't be complaining, because i had tons of fun doing the puzzles, which i'm sure consumed lots of free time to make. thanks so much /u/topaz2078 for all the work it took to organize this! :)
33
33
  :replies:
34
34
  - :author: Porky623
35
- :url: https://www.reddit.com/r/adventofcode/comments/a9c61w/2018_day_25_solutions/eci69yp/
35
+ :url: https://www.reddit.com/r/adventofcode/comments/a9c61w/2018_day_25_solutions/eci69yp
36
36
  :body: I feel for you, last year I missed exactly one star and I didn't want to copy paste a solution so I just went to sleep and got the last two stars the next day. This year, though, I was prepared, as you will be next year should you decide to participate again!
37
37
  :replies: []
38
38
  - :author: dan_144
39
- :url: https://www.reddit.com/r/adventofcode/comments/a9c61w/2018_day_25_solutions/eci6pf9/
39
+ :url: https://www.reddit.com/r/adventofcode/comments/a9c61w/2018_day_25_solutions/eci6pf9
40
40
  :body: Day 23 Part 2 was the only solution that took me over 24 hours as well. I finished it up this afternoon in anticipation of Part 2 since I'd been forewarned that it required all 49 other stars.
41
41
  :replies: []
42
42
  - :author: craigontour
43
- :url: https://www.reddit.com/r/adventofcode/comments/a9c61w/2018_day_25_solutions/ecicggk/
43
+ :url: https://www.reddit.com/r/adventofcode/comments/a9c61w/2018_day_25_solutions/ecicggk
44
44
  :body: |-
45
45
  Hi. Well done on AoC. I'm new to it too, but only managed handful of stars. I have learned lots, but far more still to learn.
46
46
 
@@ -55,7 +55,7 @@
55
55
  is the + [x,y,z,ew]] superfluous?
56
56
  :replies: []
57
57
  - :author: p_tseng
58
- :url: https://www.reddit.com/r/adventofcode/comments/a9c61w/2018_day_25_solutions/eci7dju/
58
+ :url: https://www.reddit.com/r/adventofcode/comments/a9c61w/2018_day_25_solutions/eci7dju
59
59
  :body: |-
60
60
  I admit I took a cheap shot on this problem. I already had Union-Find written for last year's day 14, so I just imported it and most of my time was spent reminding myself how I was supposed to use it.
61
61
 
@@ -116,7 +116,7 @@
116
116
  Thanks for a great month!
117
117
  :replies:
118
118
  - :author: koordinate
119
- :url: https://www.reddit.com/r/adventofcode/comments/a9c61w/2018_day_25_solutions/edwqqtn/
119
+ :url: https://www.reddit.com/r/adventofcode/comments/a9c61w/2018_day_25_solutions/edwqqtn
120
120
  :body: |-
121
121
  Thank you. For kicks, here is a Swift translation of your code:
122
122