#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define getmid(l,r) ((l) + ((r) - (l)) / 2) #define MEM(a,b) memset(a,b,sizeof(a)) #define MP(a,b) make_pair(a,b) #define PB push_back typedef long long ll; typedef pair pii; const double eps = 1e-8; const int INF = (1 << 30) - 1; const int MAXN = 100010; const ll mod = 1e9 + 7; int T; int N,M; double dp[2010]; int pos[2010]; int main(){ scanf("%d",&T); while(T--){ memset(pos,0,sizeof(pos)); scanf("%d%d",&N,&M); for(int i = 1; i <= M; ++i){ int a; scanf("%d",&a); a++; pos[a] = 1; } memset(dp,0,sizeof(dp)); for(int i = 1; i <= N; ++i){ int p = i; for(; p >= 1; --p){ if(pos[p]) break; } if(p == 1){ dp[i] = log(1.0 * i); } //printf("%d %d\n",p,i); for(int j = p; j >= 1; --j){ if(j < p && pos[j]) break; dp[i] = max(dp[i],dp[j - 1] + log(1.0 * (i - j + 1))); } //printf("%d %f\n",i,dp[i]); } ll ans = (ll)(1e6 * dp[N] / log(2.0)); printf("%I64d\n",ans); } return 0; }