#include <bits/stdc++.h>
int sum(int n, int a[205]) {
  int i, m;
  m = 0;
  for (i = 0; i < n; i++) {
    m += a[i];
  }
  return m;
}
int main() {
  int m, n, i, j, k, p, q, t;
  scanf("%d", &t);
  while (t) {
    t--;
    scanf("%d%d", &n, &k);
    int w[205];
    for (i = 0; i < n; i++) w[i] = 1;
    int tap[205];
    for (i = 0; i < k; i++) {
      scanf("%d", &tap[i]);
      tap[i]--;
      w[tap[i]] = 0;
    }
    m = 1;
    while (sum(n, w)) {
      for (i = 0; i < k; i++) {
        if ((tap[i] - m) >= 0) w[tap[i] - m] = 0;
        if ((tap[i] + m) < n) w[tap[i] + m] = 0;
      }
      m++;
    }
    printf("%d\n", m);
  }
  return 0;
}
