If you need hint:
I used DP (Dynamic Programming) to solve this and get AC (Accepted). I
stored the matrix as 2-D array and then started with array[R][C]. From
there I can go upward and left. In each element of array put the minimum
possible value to get the array[R][C]. In case, if we get the
Statement: Some girls are beautiful
IMO , this means you a set of all girls and after that comes statement about
some otherwise statement would be for all girls.
There is something left in the set after statement which is nothing but
complement of beautiful i.e. not beautiful
so, the conclusion
Sequence *(ai)* of natural numbers is defined as follows:
*ai = bi* (for *i = k*)
*ai = c1ai-1 + c2ai-2 + ... + ckai-k* (for *i k*)
where *bj* and *cj* are given natural numbers for *1=j=k*. We have to
compute *an* for given *n*
We've been given:
*k* - number of elements of *(c)* and
It might be useful:
http://www.artofproblemsolving.com/Wiki/index.php/Partition_%28combinatorics%29
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
@sukran: I've gone through Kadane's algo but I was looking for the number of
times the sum appears especially cases involving zeros.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit