title: Most efficient way of checking for shared row, column, diagonal?
body: <p>In C++ if I have a square array <code>int board[8][8]</code> that's filled like this:</p>
  
  <pre><code>0  0  1  0  0  0  0  0 
  0  0  0  0  0  1  0  0 
  0  0  0  1  0  0  0  0 
  1  0  0  0  0  0  0  0 
  0  0  0  0  0  0  0  1 
  0  0  0  0  1  0  0  0 
  0  0  0  0  0  0  1  0 
  0  1  0  0  0  0  0  0 
  </code></pre>
  
  <p>What's the shortest way to check if any of the 1's share a row, column, or diagonal with another 1? </p>
  
  <p>edit: I said most efficient when I really meant shortest</p>