#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  int t;
  int num[210];
  scanf("%d", &t);
  while (t--) {
    cin >> n >> k;
    memset(num, 0, sizeof(num));
    int tap;
    while (k--) {
      cin >> tap;
      num[tap] = 1;
    }
    int res = 1;
    for (int i = 1; i <= n; i++) {
      int cur;
      if (num[i] == 1) {
        cur = 1;
        continue;
      }
      bool a = false, b = false;
      int aa = i - 1, bb = i + 1;
      while (aa >= 1 && num[aa] == 0) {
        aa--;
      }
      while (bb <= n && num[bb] == 0) {
        bb++;
      }
      if (aa >= 1 && bb <= n) {
        cur = min((i - aa), (bb - i)) + 1;
      } else if (aa >= 1) {
        cur = i - aa + 1;
      } else if (bb <= n) {
        cur = bb - i + 1;
      } else {
        res = min(i, n - i + 1);
        break;
      }
      res = max(cur, res);
    }
    cout << res << endl;
  }
  return 0;
}
