#include <bits/stdc++.h>
using namespace std;
int n, k;
int t[200 + 5];
void dfs(int pos, int tm) {
  if (pos == 0 || pos == n + 1) return;
  if (tm < t[pos])
    t[pos] = tm;
  else
    return;
  dfs(pos - 1, tm + 1);
  dfs(pos + 1, tm + 1);
}
int main() {
  int times;
  scanf("%d", &times);
  for (int tmn = 1; tmn <= times; tmn++) {
    scanf("%d %d", &n, &k);
    for (int i = 1; i <= n; i++) t[i] = 0x7FFFFFFF;
    for (int i = 1; i <= k; i++) {
      int pos;
      scanf("%d", &pos);
      dfs(pos, 1);
    }
    int ans = -1;
    for (int i = 1; i <= n; i++) ans = max(ans, t[i]);
    printf("%d\n", ans);
  }
  return 0;
}
