#include <bits/stdc++.h>
using namespace std;
const int MAXN = 210;
void Solve() {
  int n, k;
  scanf("%d%d", &n, &k);
  vector<int> x(k);
  for (int& e : x) scanf("%d", &e);
  int ans = 1;
  for (int i = 1; i <= n; ++i) {
    int dist = 1E9;
    for (int e : x) (dist) = min((dist), (abs(e - i) + 1));
    (ans) = max((ans), (dist));
  }
  printf("%d\n", ans);
}
int main() {
  int q;
  scanf("%d", &q);
  while (q-- > 0) Solve();
  return 0;
}
