Bomber Man wants to bomb an Array.

Accepts: 56
Submissions: 225
Time Limit: 4000/2000 MS (Java/Others)
Memory Limit: 65536/65536 K (Java/Others)
Problem 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: ![http://bestcoder.hdu.edu.cn/data/images/C681-1004-1.jpg](http://bestcoder.hdu.edu.cn/data/images/C681-1004-1.jpg) Sample 2: ![http://bestcoder.hdu.edu.cn/data/images/C681-1004-2.jpg](http://bestcoder.hdu.edu.cn/data/images/C681-1004-2.jpg)
Sample Input
2
10 2
0 9
10 3
0 4 8
Sample Output
4643856
5169925