#include <bits/stdc++.h>
using namespace std;
const int N = 210;
int t, n, k, a[N];
int main() {
  scanf("%d", &t);
  for (int tt = 1; tt <= t; tt++) {
    scanf("%d%d", &n, &k);
    for (int i = 1; i <= k; i++) scanf("%d", a + i);
    int mx = 0;
    for (int i = 1; i <= n; i++) {
      int tmp = 0x3f3f3f3f;
      for (int j = 1; j <= k; j++) {
        tmp = min(tmp, abs(i - a[j]));
      }
      mx = max(mx, tmp);
    }
    printf("%d\n", mx + 1);
  }
}
