#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, t = 1;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') t = -1, ch = getchar();
  while (ch <= '9' && ch >= '0') x = x * 10 + ch - 48, ch = getchar();
  return x * t;
}
int n, K, x[500];
int tt[500];
int main() {
  int T = read();
  while (T--) {
    n = read();
    K = read();
    memset(tt, 63, sizeof(tt));
    for (int i = 1; i <= K; ++i) {
      int x = read();
      for (int i = 1; i <= n; ++i) tt[i] = min(tt[i], abs(i - x));
    }
    int ans = 0;
    for (int i = 1; i <= n; ++i) ans = max(ans, tt[i]);
    printf("%d\n", ans + 1);
  }
  return 0;
}
