<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="107769" data-post-id="107769">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sfusato" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sfusato/120/11569_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sfusato
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I was able to brute-force it and get my stars for Day 11 by only searching for grids with sizes between 3-30. Mine turned out to be 16 in size. This would run in some 120 seconds <img src="https://forum.elixirforum.com/images/emoji/apple/crazy_face.png?v=15" title=":crazy_face:" class="emoji" alt=":crazy_face:" loading="lazy" width="20" height="20"></p>
<p>Learned about <code>summed area table</code> algorithm in here, watched James’s stream (<img src="https://forum.elixirforum.com/images/emoji/apple/love_you_gesture.png?v=15" title=":love_you_gesture:" class="emoji" alt=":love_you_gesture:" loading="lazy" width="20" height="20">) and now part 2 runs in about 10 seconds for sizes 1-300 <img src="https://forum.elixirforum.com/images/emoji/apple/clinking_glasses.png?v=15" title=":clinking_glasses:" class="emoji" alt=":clinking_glasses:" loading="lazy" width="20" height="20"></p>
<p>My solution is <a href="https://github.com/sfusato/advent_of_code_2018/blob/master/day11/lib/day11.ex" rel="noopener nofollow ugc">here</a>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="107769" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-day-11/18673/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-107769" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="107769"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="108231" data-post-id="108231">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="snewcomer" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/snewcomer/120/9343_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  snewcomer
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Phoenix Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Fun one!</p>
<p><a href="https://github.com/snewcomer/advent-of-code-elixir/blob/master/day11/lib/day11.ex" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/snewcomer/advent-of-code-elixir/blob/master/day11/lib/day11.ex</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="108231" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-day-11/18673/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-108231" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="108231"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="108622" data-post-id="108622">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="stefanchrobot" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/stefanchrobot/120/7657_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  stefanchrobot
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="JEG2" data-post="2" data-topic="18673" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeg2/48/936_2.png" class="avatar"> JEG2:</div>
<blockquote>
<p>The key idea is the use of a summed area table.</p>
</blockquote>
</aside>
<p>Sweet! Never heard of it before. Here’s <a href="https://en.wikipedia.org/wiki/Summed-area_table" rel="noopener nofollow ugc">the Wikipedia entry</a>. I figured the same idea as <a class="mention" href="/u/sasajuric" rel="nofollow">@sasajuric</a>, i.e. every even square can be split into 4 smaller ones and I’m memoizing that. The code for squares of odd sizes was considerably slower.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="108622" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/advent-of-code-day-11/18673/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-108622" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="108622"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>