#include <bits/stdc++.h>
using namespace std;
int a[1000];
int main() {
  int T;
  int n, k;
  cin >> T;
  while (T--) {
    cin >> k >> n;
    memset(a, 0, sizeof(a));
    for (int i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    int ans = 0;
    ans = max(ans, a[0]);
    for (int i = 0; i < n - 1; i++) {
      int k = (a[i + 1] - a[i]) / 2;
      if (a[i + 1] - a[i] % 2 != 0) k++;
      ans = max(ans, k);
    }
    ans = max(ans, k - a[n - 1] + 1);
    cout << ans << endl;
  }
  return 0;
}
