title: how to solve this (selecting intervals)
body: <p>I've given some intervals <code>I = {I(1), I(2), ..., I(m)}</code> for <code>I(i) = [a_i, b_i] (1&lt;=a_i&lt;=b_i&lt;=n)</code>. You may suppose that intervals cover each other(sorry i'm poor in english), so there's no intervals such as <code>{[1,5], [3,6]}, {[2,5], [5,7]}</code>. And <code>{[1,1], [2,2], ..., [n,n]}</code> must be included in I.</p>
  
  <p>Let's suppose <code>C(i) = b_i - a_i + 1</code>.</p>
  
  <p>I want to find <code>{I(c_1), I(c_2), ..., I(c_k)}</code> that are non overlapped by each other, and <code>C(c_1) + C(c_2) + ... + C(c_k) = T. (1 &lt;= T &lt;= n)</code>.</p>
  
  <p>I could find <code>O(n*T)</code> DP solution using Subset Sum problem, and I think it's NP, but I'm not sure. Can I optimize more than <code>O(n*T)</code>?</p>