#include <bits/stdc++.h>
using namespace std;
const int time_max = 250;
const int maxn = 250;
int garden[maxn];
int vis[maxn];
int main() {
  int n;
  scanf("%d", &n);
  int numBed, numTap;
  while (n--) {
    fill(garden, garden + maxn, 0);
    scanf("%d %d", &numBed, &numTap);
    for (int i = 0; i < numTap; i++) {
      int tapth;
      scanf("%d", &tapth);
      garden[tapth] = 1;
    }
    for (int time = 1; time <= maxn; time++) {
      int flag = 1;
      for (int j = 1; j <= numBed; j++) {
        if (garden[j] == 0) flag = 0;
      }
      if (flag == 1) {
        printf("%d\n", time);
        break;
      }
      fill(vis, vis + maxn, 0);
      for (int j = 1; j <= numBed; j++) {
        if (garden[j] == 1) {
          if (j - 1 >= 1 && garden[j - 1] == 0) vis[j - 1] = 1;
          if (j + 1 <= numBed && garden[j + 1] == 0) vis[j + 1] = 1;
        }
      }
      for (int j = 1; j <= numBed; j++) {
        if (vis[j] == 1) garden[j] = 1;
        if (vis[j] == 1) garden[j] = 1;
      }
    }
  }
  return 0;
}
