﻿ Fuzhou University OnlineJudge ﻿

## Problem Description

One day , iyixaing is running on the playground ,and see the seniors take pictures .He is curious about how many different arrangement can the seniors stand with the limit that the senior back row is higher than the senior front row at each corresponding position and arrange the seniors from left to right , low to high for each row. To simple the problem, we give you the different height of N seniors , And you just need to consider the situation of two rows(of course no rows can be empty and the number of seniors back row should be no more than the front row ).

## Input

First line is number of test cases T. For each test case ,first line is the integer N(2 <= N <= 100).and then N integers hi (1 <= hi <= 1000) followed .

## Output

For each test case , first print “Case #x:” where x is case number. then output the answer mod 20100501.

2 2 1 2 3 1 2 3

## Sample Output

Case #1: 1 Case #2: 2

## Source

FOJ有奖月赛-2010年05月

Submit  Back  Status  Discuss
﻿