title: Dynamic programming
body: <p>Never had to deal with the DP. <br>
  We have N stones with weights W_1,...,W_N. Need divide all stones for 2 parts, that difference between them was minimal. </p>
  
  <p>As we have n = 6, and weight = 1,4,5,6,7,9 then difference is 0.</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      int     n; // numbers of stones
      int*    a; // array of weights
      int diff=0;
      cin &gt;&gt; n;
      a = new int[n];
      for(int i=0;i&lt;n;i++)
          cin &gt;&gt; a[i];
  
      // And I don't know what's next, mee too
  
      delete[] a;
      system("PAUSE");
      return 0;
  }
  </code></pre>