#include <bits/stdc++.h>
using namespace std;
vector<int> v;
map<int, int> mp;
bool vis[205];
int main() {
  int t, n, kl, q, mx, k;
  cin >> t;
  while (t--) {
    cin >> n >> kl;
    mx = 0;
    int a[kl];
    if (kl == 1) {
      cin >> q;
      int p = max(q - 1 + 1, n - q + 1);
      cout << p << endl;
      continue;
    }
    cin >> a[0];
    for (int i = 1; i < kl; i++) {
      cin >> a[i];
      int d = a[i] - a[i - 1];
      if (d == 1)
        k = 1;
      else if (d % 2 == 0)
        k = d / 2 + 1;
      else if (d % 2 == 1)
        k = d / 2 + 1;
      mx = max(k, mx);
    }
    int p = max(a[0] - 1 + 1, n - a[kl - 1] + 1);
    mx = max(p, mx);
    cout << mx << endl;
  }
}
