#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, p, s;
  int ar[210];
  cin >> t;
  while (t--) {
    int a[210] = {0};
    int c = 1;
    cin >> n >> p;
    for (int i = 0; i < p; i++) {
      cin >> ar[i];
    }
    s = n * (n + 1);
    s /= 2;
    while (1) {
      for (int i = 0; i < p; i++) {
        if ((ar[i] - c + 1) > 0 && a[ar[i] - c + 1] == 0) {
          a[ar[i] - c + 1] = 1;
          s -= ar[i] - c + 1;
        }
        if ((ar[i] + c - 1) > 0 && (ar[i] + c - 1) <= n &&
            a[ar[i] + c - 1] == 0) {
          a[ar[i] + c - 1] = 1;
          s -= ar[i] + c - 1;
        }
      }
      if (s > 0)
        c++;
      else
        break;
    }
    cout << c << endl;
  }
  return 0;
}
