#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, m, te;
  cin >> t;
  while (t--) {
    cin >> n >> m;
    int a[m + 1], d[m + 1];
    a[0] = 0;
    for (int i = 1; i <= m; i++) {
      cin >> a[i];
      d[i - 1] = a[i] - a[i - 1] + (i != 1);
      if (i != 1) d[i - 1] = ceil(((float)d[i - 1]) / 2);
    }
    d[m] = n - a[m] + 1;
    sort(d, d + m + 1);
    cout << d[m] << endl;
  }
}
