title: Check if there is always the same value in the row of an array for each row C++
body: <p>I am looking for an algorithm or a code able to browse a 2D array (a matrix) and check if we have differents values for each rows or not.
  If the values are differents we return 1 else 0</p>
  
  <p>an example is better:</p>
  
  <pre><code>    0   1   2   3
  0       2
  1           2   4
  2               6
  3   1
  </code></pre>
  
  <p>in the case 0;2 we have the value 2
  in the case 2;3 we have the value 6</p>
  
  <p>In this example for the line 1 we have 2 values (in 1;2 and 1;3) : 2 and 4.
  2 and 4 are not equal, we can exit the loop and return 1</p>
  
  <pre><code>    0   1   2   3
  0       2   2
  1           1   1
  2               6
  3   4
  </code></pre>
  
  <p>In this other example, in the first line all the values are equals to 2 so we go into the second line, all the values are equals to 1, we go into the third line, all the values equals 6, and the last line, all the values equal 4 so we return 0 </p>
  
  <p>I don't really know in what way I can do that</p>
  
  <p>Thanks in advance for your helps</p>
  
  <p>Best regards</p>