#include <bits/stdc++.h>
using namespace std;
const long long arr = 2e5 + 100;
long long a[arr];
void solve() {
  long long n;
  cin >> n;
  long long k;
  cin >> k;
  for (long long i = 1; i <= k; i++) cin >> a[i];
  long long ans = 0;
  for (long long j = 1; j <= n; j++) {
    long long now = 1e9;
    for (long long i = 1; i <= k; i++) now = min(now, abs(a[i] - j));
    ans = max(ans, now);
  }
  cout << ans + 1 << '\n';
}
signed main() {
  long long t;
  cin >> t;
  while (t--) solve();
}
