title: Unique rows after column removal from matrix
body: <p>Binary matrix of <code>n</code> rows and <code>m</code> columns is given. <code>n</code> and <code>m</code> can be up to 2000.</p>
  
  <p><strong>We need to tell, is it possible to remove a column, such that rows of the remaining matrix will be unique.</strong> </p>
  
  <p>Example for <code>n = 3</code> and <code>m = 4</code>:</p>
  
  <pre><code>1010
  0001
  1001
  </code></pre>
  
  <p>Answer is <em>yes</em>. We can remove the second column and the remaining rows (<code>110</code>, <code>001</code>, <code>101</code>) will be unique.</p>
  
  <p>Example for <code>n = 4</code> and <code>m = 2</code>:</p>
  
  <pre><code>00
  01
  10
  11
  </code></pre>
  
  <p>Answer is <em>no</em>. Whatever column we will choose, rows <code>0</code> and <code>0</code> will stay.</p>
  
  <p>I <a href="http://pastebin.com/vwaSwAMG" rel="nofollow">have</a> O(m*m*n) brute-force algorithm. I check the uniqueness of rows by removing each and every column.</p>
  
  <p>Do you know faster algorithm?</p>