#include <bits/stdc++.h>
using namespace std;
void fill_this(vector<bool>& v) {
  vector<bool> w(v);
  for (int i = 0; i < v.size(); i++) {
    int prev = i - 1;
    int next = i + 1;
    if (w[i] == true && prev >= 0) {
      v[prev] = true;
    }
    if (w[i] == true && next < v.size()) {
      v[next] = true;
    }
  }
}
int main() {
  int t, n, k, tap;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> n;
    cin >> k;
    vector<bool> v(n, false);
    for (int j = 0; j < k; j++) {
      cin >> tap;
      v[tap - 1] = true;
    }
    int count = accumulate(v.begin(), v.end(), 0);
    int time = 1;
    if (count == n) {
      cout << 1 << '\n';
    } else {
      do {
        fill_this(v);
        time++;
      } while ((count = accumulate(v.begin(), v.end(), 0)) < n);
      cout << time << '\n';
    }
  }
  return 0;
}
