title: Private test cases are not passing. What is the mistake here?
body: <p>Given N three-digit numbers, your task is to find bit score of all N numbers and then print the number of pairs possible based on these calculated bit score.</p>
  
  <ol>
  <li>Rule for calculating bit score from three digit number:</li>
  </ol>
  
  <p>From the 3-digit number,</p>
  
  <p>· extract largest digit and multiply by 11 then</p>
  
  <p>· extract smallest digit multiply by 7 then</p>
  
  <p>· add both the result for getting bit pairs.</p>
  
  <p>Note: - Bit score should be of 2-digits, if above results in a 3-digit bit score, simply ignore most significant digit.</p>
  
  <p>Consider following examples:</p>
  
  <p>Say, number is 286</p>
  
  <p>Largest digit is 8 and smallest digit is 2</p>
  
  <p>So, 8*11+2*7 =102 so ignore most significant bit , So bit score = 02.</p>
  
  <p>Say, Number is 123</p>
  
  <p>Largest digit is 3 and smallest digit is 1</p>
  
  <p>So, 3*11+7*1=40, so bit score is 40.</p>
  
  <ol start="2">
  <li>Rules for making pairs from above calculated bit scores</li>
  </ol>
  
  <p>Condition for making pairs are</p>
  
  <p>· Both bit scores should be in either odd position or even position to be eligible to form a pair.</p>
  
  <p>· Pairs can be only made if most significant digit are same and at most two pair can be made for a given significant digit.</p>
  
  <p>Constraints
  N&lt;=500</p>
  
  <p>Input Format
  First line contains an integer N, denoting the count of numbers.</p>
  
  <p>Second line contains N 3-digit integers delimited by space</p>
  
  <p>Output
  One integer value denoting the number of bit pairs.</p>
  
  <p>Test Case</p>
  
  <p>Explanation
  Example 1</p>
  
  <p>Input</p>
  
  <p>8 234 567 321 345 123 110 767 111</p>
  
  <p>Output</p>
  
  <p>3</p>
  
  <p>Explanation</p>
  
  <p>After getting the most and least significant digits of the numbers and applying the formula given in Rule 1 we get the bit scores of the numbers as:</p>
  
  <p>58 12 40 76 40 11 19 18</p>
  
  <p>No. of pair possible are 3:</p>
  
  <p>40 appears twice at odd-indices 3 and 5 respectively. Hence, this is one pair.</p>
  
  <p>12, 11, 18 are at even-indices. Hence, two pairs are possible from these three-bit scores.</p>
  
  <p>Hence total pairs possible is 3</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  using namespace std;
  
  vector&lt;int&gt; correctBitScores(vector&lt;int&gt;);
  vector&lt;int&gt; bitScore(vector&lt;int&gt;);
  int findPairs(vector&lt;int&gt;);
  
  int main() {
      int a, b;
      int pairs = 0;
      vector&lt;int&gt; vec;
      vector&lt;int&gt; bitscore;
      cout &lt;&lt; "\nEnter count of nos: ";
      cin &gt;&gt; a;
      for (int i = 0; i &lt; a; i++) {
          cin &gt;&gt; b;
          vec.push_back(b);
      }
      bitscore = bitScore(vec);
  
      pairs = findPairs(bitscore);
      cout &lt;&lt; "Max pairs = " &lt;&lt; pairs;
  
      return 0;
  
  }
  
  vector&lt;int&gt; correctBitScores(vector&lt;int&gt; bis) {
      int temp = 0;
      for (size_t i = 0; i &lt; bis.size(); i++) {
          temp = bis[i];
          int count = 0;
          while (temp &gt; 0) {
              temp = temp / 10;
              count++;
          }
          if (count &gt; 2)
              bis[i] = abs(100 - bis[i]);
      }
      /*cout &lt;&lt; "\nCorrected" &lt;&lt; endl;
      for (int i = 0; i &lt; size(bis); i++) {
          cout &lt;&lt; bis[i] &lt;&lt; endl;
      }*/
      return bis;
  }
  
  int findPairs(vector&lt;int&gt; vec) {
      int count = 0;
      vector&lt;int&gt; odd;
      vector&lt;int&gt; even;
      for (size_t i = 0; i &lt; vec.size(); i++)
          (i % 2 == 0 ? even.push_back(vec[i]) : odd.push_back(vec[i]));
  
      for (size_t j = 0; j &lt; odd.size(); j++)
          for (size_t k = j + 1; k &lt; odd.size(); k++) {
              if (odd[j] / 10 == odd[k] / 10) {
                  count++;
                  odd.erase(odd.begin()+j);
              }
          }
  
      for (size_t j = 0; j &lt; even.size(); j++)
          for (size_t k = j + 1; k &lt; even.size(); k++) {
              if (even[j] / 10 == even[k] / 10) {
                  count++;
                  even.erase(even.begin() + j);
              }
          }
      return count;
  }
  
  
  
  vector&lt;int&gt; bitScore(vector&lt;int&gt; v) {
      int temp = 0, rem = 0;
      vector&lt;int&gt; bs;
      for (size_t i = 0; i &lt; v.size(); i++) {
          int max = 0, min = 9;
          temp = v[i];
          while (temp &gt; 0) {
              rem = temp % 10;
              if (min &gt; rem)
                  min = rem;
              if (max &lt; rem)
                  max = rem;
              temp = temp / 10;
          }
          int bscore = (max * 11) + (min * 7);
          bs.push_back(bscore);
      }
      /*cout &lt;&lt; "\nBit Scores = " &lt;&lt; endl;
      for (int i = 0; i &lt; size(bs); i++) {
          cout &lt;&lt; bs[i] &lt;&lt; endl;
      }*/
      bs = correctBitScores(bs);
      return bs;
  }
  </code></pre>