#include <bits/stdc++.h>
inline int geti() {
  int x, f = 1;
  char c;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') f = -1;
  x = c - '0';
  while ((c = getchar()) >= '0' && c <= '9') x = x * 10 + c - '0';
  return x * f;
}
const int N = 200;
int n, k, V[N + 5];
bool P[N + 5];
bool pan() {
  for (int i = 1; i <= n; i++)
    if (!P[i]) return 0;
  return 1;
}
int main() {
  int T = geti();
  while (T--) {
    n = geti();
    k = geti();
    for (int i = 1; i <= k; i++) V[i] = geti();
    for (int i = 1; i <= n; i++) P[i] = 0;
    int ans = 0;
    while (!pan()) {
      ans++;
      for (int i = 1; i <= k; i++) {
        if (V[i] - ans + 1 >= 1) P[V[i] - ans + 1] = 1;
        if (V[i] + ans - 1 <= n) P[V[i] + ans - 1] = 1;
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
