#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e2 + 10;
const int maxm = 1e6;
int P[maxn], Q[maxn];
int n, m;
bool fond;
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d", &n, &m);
    memset(P, 0, sizeof(P));
    int maxa = 1, ins;
    for (int i = 1; i <= m; i++) {
      int k;
      scanf("%d", &k);
      if (i == 1) {
        maxa = max(maxa, k);
      }
      if (i == m) {
        maxa = max(maxa, n - k + 1);
      }
      if (i != 1) {
        maxa = max(maxa, (k - ins + 2) / 2);
      }
      ins = k;
    }
    cout << maxa << endl;
  }
  return 0;
}
