#include <bits/stdc++.h>
using namespace std;
long long a[1005];
long long max(long long, long long);
long long abso(long long);
int main() {
  long long t_;
  cin >> t_;
  while (t_--) {
    long long n, k;
    cin >> n >> k;
    for (int i = 0; i < k; i++) {
      cin >> a[i];
    }
    long long temp = a[0];
    for (int i = 1; i < k; i++) {
      long long mid = (a[i] + a[i - 1]) / 2;
      long long temp1 = max(abso(a[i] - mid), abso(a[i - 1] - mid));
      if ((a[i] - a[i - 1] - 1) % 2) {
        temp1++;
      }
      temp = max(temp, temp1);
    }
    cout << max(temp, n - a[k - 1] + 1) << endl;
  }
  return 0;
}
long long max(long long a, long long b) {
  if (a > b)
    return a;
  else
    return b;
}
long long abso(long long a) {
  if (a < 0)
    return -a;
  else
    return a;
}
