#include <bits/stdc++.h>
const long long INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const double eps = 1e-8;
const double pi = acos(-1.0);
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int T;
  cin >> T;
  while (T--) {
    int n, k;
    int a[250] = {0};
    cin >> n >> k;
    for (int i = 0; i < k; i++) {
      int x;
      cin >> x;
      a[x] = 1;
    }
    int cnt = 1, in = 1;
    while (1) {
      bool f = 1;
      for (int i = 1; i <= n; i++) {
        if (!a[i]) {
          f = 0;
          break;
        }
      }
      if (f) break;
      cnt++;
      for (int i = 1; i <= n; i++) {
        if (a[i] == in && i + 1 <= n)
          if (!a[i + 1]) a[i + 1] = in + 1;
        if (a[i] == in && i - 1 >= 1)
          if (!a[i - 1]) a[i - 1] = in + 1;
      }
      in++;
    }
    cout << cnt << endl;
  }
  return 0;
}
