#include <bits/stdc++.h>
using namespace std;
template <class T, class T2>
inline void chkmax(T &x, const T2 &y) {
  if (x < y) x = y;
}
template <class T, class T2>
inline void chkmin(T &x, const T2 &y) {
  if (x > y) x = y;
}
const int MAXN = (1 << 20);
int n, k;
int a[MAXN];
void read() {
  cin >> n >> k;
  for (int i = 0; i < k; i++) cin >> a[i];
}
void solve() {
  for (int ans = 1; ans <= n; ans++) {
    vector<bool> used(n + 1, 0);
    for (int i = 0; i < k; i++)
      for (int j = max(1, a[i] - (ans - 1)); j <= min(n, a[i] + (ans - 1)); j++)
        used[j] = 1;
    int cnt = 0;
    for (int x : used)
      if (x == 1) cnt++;
    if (cnt == n) {
      cout << ans << '\n';
      return;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    read();
    solve();
  }
  return 0;
}
