#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 4;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t, n, k, x[250], pre[250];
  cin >> t;
  while (t--) {
    cin >> n >> k;
    for (int i = 1; i <= k; ++i) cin >> x[i];
    int lo = 1, hi = n, mid, ans = 1;
    while (lo <= hi) {
      mid = (lo + hi) >> 1;
      memset(pre, 0, sizeof(pre));
      for (int i = 1; i <= k; ++i) {
        ++pre[max(1, x[i] - (mid - 1))];
        --pre[min(n, x[i] + (mid - 1)) + 1];
      }
      int flag = 0;
      for (int i = 1; i <= n && !flag; ++i) {
        pre[i] += pre[i - 1];
        if (!pre[i]) flag = 1;
      }
      if (!flag) {
        hi = mid - 1;
        ans = mid;
      } else {
        lo = mid + 1;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
