#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    int n, k;
    cin >> n >> k;
    int prev_crane = 0;
    int max_dist = numeric_limits<int>::max();
    for (int j = 1; j <= k; ++j) {
      int x;
      cin >> x;
      if (j == 1) max_dist = x - 1;
      if (j == k) max_dist = max(max_dist, n - x);
      if (k != 1 && j != 1) {
        max_dist = max(max_dist, (int)ceil((x - prev_crane - 1) / 2.0));
      }
      prev_crane = x;
    }
    cout << max_dist + 1 << '\n';
  }
  return 0;
}
