#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, k;
  cin >> t;
  while (t--) {
    cin >> n >> k;
    vector<int> v(k);
    for (int i = 0; i < k; i++) {
      cin >> v[i];
    }
    sort(v.begin(), v.end());
    int x = 1;
    for (int i = 0; i + 1 < k; i++) {
      x = max(x, v[i + 1] - v[i] + 1);
    }
    x = (x / 2) + (x % 2 != 0);
    x = max(x, v[0]);
    x = max(x, n - v[k - 1] + 1);
    cout << x << "\n";
  }
  return 0;
}
