title: Counting the strictly increasing sequences
body: <p>I aligned the N candles from left to right. The ith candle from the left has the height Hi and the color Ci, an integer ranged from 1 to a given K, the number of colors.
  <br><br>
  Problem: , how many strictly increasing ( in height ) colorful subsequences are there? A subsequence is considered as colorful if every of the K colors appears at least one times in the subsequence.
  <br></p>
  
  <pre><code>For Ex: N=4 k= 3
        H   C
        1    1
        3    2  
        2    2
        4    3 
  </code></pre>
  
  <p>only two valid subsequences are (1, 2, 4) and (1, 3, 4)</p>
  
  <p>I think it is a problem of Fenwick Tree please provide me a approach how to proceeded with such type of problems </p>