#include <bits/stdc++.h>
using namespace std;
int solve(int total_len, vector<int> &tap_locations) {
  int res = max(tap_locations[0],
                total_len - tap_locations[tap_locations.size() - 1] + 1);
  for (int i = 1; i < tap_locations.size(); i++) {
    res = max(res, (tap_locations[i] - tap_locations[i - 1] - 1 + 3) / 2);
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int test_cases_count;
  cin >> test_cases_count;
  int total_len, tap_count, tap_location;
  vector<int> tap_locations;
  while (test_cases_count--) {
    cin >> total_len >> tap_count;
    tap_locations.clear();
    while (tap_count--) {
      cin >> tap_location;
      tap_locations.push_back(tap_location);
    }
    cout << solve(total_len, tap_locations) << endl;
  }
  return 0;
}
