#include <bits/stdc++.h>
const long double PI = 3.1415926535897932384626433832795;
const long double EPS = 0.00000000000000000000001;
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t, w;
  cin >> t;
  for (w = 1; w <= t; w++) {
    long long n, k, i;
    cin >> n >> k;
    long long a[k + 2];
    for (i = 1; i <= k; i++) cin >> a[i];
    long long mx = 0;
    for (i = 1; i < k; i++) {
      mx = max(a[i + 1] - a[i] + 1, mx);
    }
    if (mx % 2 == 0)
      cout << max(mx / 2, max(a[1] - 0, n + 1 - a[k])) << endl;
    else
      cout << max(mx / 2 + 1, max(a[1] - 0, n + 1 - a[k])) << endl;
  }
  return 0;
}
