#include <bits/stdc++.h>
using namespace std;
const int N = 222, mod = 1e9 + 7;
const long long INF = 2e18;
int t, n, k;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  while (t--) {
    int n, k, ans = 0;
    cin >> n >> k;
    int b[N];
    fill(b + 1, b + n + 1, 1e9);
    for (int i = 1; i <= k; ++i) {
      int x;
      cin >> x;
      for (int j = 1; j <= n; ++j) {
        b[j] = min(b[j], abs(x - j) + 1);
      }
    }
    ans = *max_element(b + 1, b + n + 1);
    cout << ans << "\n";
  }
  return 0;
}
