#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-5;
int main() {
  int T;
  scanf("%d", &T);
  int n, k;
  while (T--) {
    int ans = 0, a, b;
    scanf("%d%d", &n, &k);
    for (int i = 1; i <= k; i++) {
      scanf("%d", &a);
      if (i == 1) ans = max(ans, a);
      if (i == k) ans = max(ans, n - a + 1);
      if (i != 1) {
        ans = max(ans, (a - b) / 2 + 1);
      }
      b = a;
    }
    printf("%d\n", ans);
  }
}
