Cow Food cowfood.X The nutrition scientists are running experiments on the optimal herb mixture for feeding cows. They gathered K (2 <= K <= 30) sorts of different plants and mixed them in formulas represented as a vector (a_1, a_2, ..., a_K), where a_i is the quantity of plants of type i used in the mixture. It is known that a_1 + a_2 + ... + a_K is less than or equal to a given value S (2 <= S <= 10,000). Each of N (0 <= N <= 20) experiments that the scientists ran proved to be unsuccesful, as the cows didn't agree with the herb quantities. Furthermore, they said that for any unsuccesful experiment (a_1, a_2, ..., a_K) , an experiment (b_1, b_2, ..., b_K) with a_1 <= b_1, a_2 <= b_2, ..., a_K <= b_K would still fail. As the scientists want to finish their work as soon as possible, it is your job to find out how many experiments that might still have a chance to succeed are left. You should note that any valid mixture contains at least two nonzero quantities of different herbs. PROBLEM NAME: cowfood INPUT FORMAT: * Line 1: Three space separated integers: K, S and N * Lines 2..N + 1: Line i+1 contains K numbers each (a_1, a_2, ..., a_K) representing unsuccessful experiment #i. SAMPLE INPUT: 2 5 2 1 3 3 1 OUTPUT FORMAT: * Line 1: A single integer that is the number of remaining mixtures that cows might still agree with, modulo 3210121. SAMPLE OUTPUT: 4 OUTPUT DETAILS: The four remaining mixtures are (1, 1), (1, 2), (2, 1), (2, 2).