UOJ Logo 黑暗爆炸OJ

DARKBZOJ

#1630. [Usaco2007 Demo]Ant Counting

统计 下载数据

Description

同OJ2023

Input

* Line 1: 4 space-separated integers: T, A, S, and B

* Lines 2..A+1: Each line contains a single integer that is an ant type present in the hive

Output

* Line 1: The number of sets of size S..B (inclusive) that can be created. A set like {1,2} is the same as the set {2,1} and should not be double-counted. Print only the LAST SIX DIGITS of this number, with no leading zeroes or spaces.

Sample Input

3 5 2 3
1
2
2
1
3

INPUT DETAILS:

Three types of ants (1..3); 5 ants altogether. How many sets of size 2 or
size 3 can be made?

Sample Output

10

OUTPUT DETAILS:

5 sets of ants with two members; 5 more sets of ants with three members

Hint

Source

Silver