This is basically a bounded knapsack / DP counting problem.
Model the problem as a bounded knapsack where each question type is an item with a fixed count and weight equal to its point value; use dynamic programming to count the number of ways to reach the target sum, applying modulo 10^9+7. Optimize by decomposing each bounded item into 0/1 items via binary splitting or using a monotonic queue for O(target) per type.
Pro tip: Clarify that the order of selecting questions does not matter (combinations, not permutations) and that each type can be used up to its available count; this avoids common off-by-one and overcounting errors.
Confirm that we count distinct combinations (order irrelevant) and that each question type can be used at most its available count. Ask about input size to choose the right DP optimization.
Let dp[s] = number of ways to score exactly s points. For each question type with point value v and count c, update dp using a bounded knapsack transition: dp_new[s] = sum_{k=0..c} dp_old[s - k*v].
If target and counts are large, use binary splitting to convert each bounded item into O(log c) 0/1 items, or use a monotonic queue to achieve O(target) per type. Apply modulo 10^9+7 at each addition.
Code the DP iteratively, handling base case dp[0]=1. Test with small examples, zero target, zero counts, and large values to ensure modulo correctness and no overflow.
State time and space complexity: O(n * target) with binary splitting or O(n * target) with monotonic queue, where n is number of types. Mention space can be O(target).
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.