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