#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int t;
  cin >> t;
  for (int h = 0; h < t; h++) {
    int n, k;
    cin >> n >> k;
    int times[n];
    vector<int> myvector;
    for (int j = 0; j < k; j++) {
      int aux;
      cin >> aux;
      myvector.push_back(aux);
    }
    int res = 201;
    for (int i = 1; i <= n; i++) {
      res = 201;
      for (int j = 0; j < k; j++) {
        res = min(abs(i - myvector[j]), res);
        times[i - 1] = res;
      }
    }
    for (int i = 0; i < n; i++) {
      res = max(res, times[i]);
    }
    cout << res + 1 << "\n";
  }
  return 0;
}
