#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const int MAX = 100005;
const int MOD = 1000000007;
inline bool isEq(double a, double b) { return abs(a - b) < EPS; }
inline double toRad(double deg) { return deg * PI / 180; }
inline double toDeg(double rad) { return rad * 180 / PI; }
inline int geti(int &_int) { return scanf("%d", &_int); }
inline int getii(int &_int, int &_int2) {
  return scanf("%d %d", &_int, &_int2);
}
inline int getiii(int &_int, int &_int2, int &_int3) {
  return scanf("%d %d %d", &_int, &_int2, &_int3);
}
inline int getl(long long &_ll) { return scanf("%lld", &_ll); }
inline int getll(long long &_ll, long long &_ll2) {
  return scanf("%lld %lld", &_ll, &_ll2);
}
inline int getlll(long long &_ll, long long &_ll2, long long &_ll3) {
  return scanf("%lld %lld %lld", &_ll, &_ll2, &_ll3);
}
inline int getd(double &_double) { return scanf("%lf", &_double); }
inline int getdd(double &_double, double &_double2) {
  return scanf("%lf %lf", &_double, &_double2);
}
inline int getstr(char *str) { return scanf("%s", str); }
int main(int argc, char *argv[]) {
  int t, n, k, ara[1000], gar[1000];
  geti(t);
  while (t--) {
    getii(n, k);
    memset(gar, 0, sizeof(gar));
    for (int i = 0; i < k; i++) {
      geti(ara[i]);
    }
    int tim = 0;
    bool ch = false;
    int w = 0;
    do {
      ch = false;
      for (int i = 0; i < k; i++) {
        int l = ara[i] - tim - 1;
        int r = ara[i] + tim - 1;
        if (l >= 0 && gar[l] == 0) {
          gar[l] = 1;
          ch = true;
          w++;
        }
        if (r < n && gar[r] == 0) {
          gar[r] = 1;
          ch = true;
          w++;
        }
      }
      tim++;
    } while (w < n);
    printf("%d\n", tim);
  }
  return 0;
}
