#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int maxn = 1000005;
int a[205], b[205];
int lll[205], rrr[205];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    for (int i = 1; i <= k; i++) cin >> a[i];
    int l = 300;
    int r = -1;
    int goal = -1;
    for (int i = 1; i <= 200; i++) {
      memset(b, 0, sizeof(b));
      for (int j = 1; j <= k; j++) {
        lll[j] = a[j] - i + 1;
        rrr[j] = a[j] + i - 1;
        for (int q = max(1, lll[j]); q <= min(n, rrr[j]); q++) b[q] = 1;
      }
      int flag = 1;
      for (int j = 1; j <= n; j++)
        if (!b[j]) flag = 0;
      if (flag) {
        goal = i;
        break;
      }
    }
    cout << goal << endl;
  }
  return 0;
}
