Subtask 1: You can hard code the results.
Subtask 2: You can generate all possible subsequences and count result from there.
Subtask 3: Let's sort the array, From max to min we'll count in how many subsequences has this element as median. consider current element has L elemens less than this and R elements greater than this. We'll have to count how many ways we can take equal number of elements in both sides or 1 more in the right side.
This can be implemented in O(n2).
Subtask 4: From the solution of subtask-3, see that the highest number occurs in nC0 subsequences, 2nd highest occurs in nC1 subsequences. In general, r'th highest number occurs in nCr-1 sunsequences.
Now, how to calculate nCr without mod? Ever heard of Pascal's triangle?