1630 - [Usaco2007 Demo]Ant Counting

同OJ2023

输入

  • 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

输出

  • 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.

样例

输入

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?

输出

10

OUTPUT DETAILS:

5 sets of ants with two members; 5 more sets of ants with three members
时间限制 1 秒
内存限制 128 MB
讨论 统计
上一题 下一题