Bomber Man wants to bomb an Array.

Time Limit: 2000ms
Memory Limit: 65536KB
This problem will be judged on HDU. Original ID: 5653
64-bit integer IO format: %I64d      Java class name: Main

Description

Given an array and some positions where to plant the bombs, You have to print the Total Maximum Impact.

Each Bomb has some left destruction capability $L$ and some right destruction capability $R$ which means if a bomb is dropped at $i$th location it will destroy $L$ blocks on the left and $R$ blocks on the right.
Number of Blocks destroyed by a bomb is $L + R + 1$
Total Impact is calculated as product of number of blocks destroyed by each bomb.
If $i$th bomb destroys $Xi$ blocks then $Total Impact = X1 * X2 * .... Xm$

Given the bombing locations in the array, print the Maximum Total Impact such that every block of the array is destoryed exactly once(i.e it is effected by only one bomb).

### Rules of Bombing
1. Bomber Man wants to plant a bomb at every bombing location.
2. Bomber Man wants to destroy each block with only once.
3. Bomber Man wants to destroy every block.

Input

There are multi test cases denote by a integer $T(T \leq 20)$ in the first line.

First line two Integers $N$ and $M$ which are the number of locations and number of bombing locations respectivly.
Second line contains $M$ distinct integers specifying the Bombing Locations.

1 <= N <= 2000

1 <= M <= N

Output

as Maximum Total Impact can be very large print the floor(1000000 * log2(Maximum Total Impact)).

Hint:
Sample 1:



Sample 2:

Sample Input

2
10 2
0 9
10 3
0 4 8

Sample Output

4643856
5169925

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .