#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, k, ans = 0;
    cin >> n >> k;
    int a[k];
    for (int i = 0; i < k; i++) cin >> a[i];
    sort(a, a + k);
    ans = max(ans, n + 1 - a[k - 1]);
    ans = max(ans, a[0]);
    for (int i = 0; i < k - 1; i++) {
      ans = max(ans, (a[i + 1] - a[i] + 2) / 2);
    }
    cout << ans << endl;
  }
}
