#include <bits/stdc++.h>
using namespace std;
const int N = 2e2 + 5;
int arr[N];
int main() {
  int T;
  cin >> T;
  while (T--) {
    memset(arr, 0, sizeof arr);
    int n, k;
    cin >> n >> k;
    vector<int> tap(k);
    for (int i = 0; i < k; i++) {
      cin >> tap[i];
    }
    int cnt = 0, cntn = 0, b = 0;
    while (true) {
      for (int i = 0; i < k; i++) {
        if (cntn == n) {
          b = 1;
          break;
        }
        if (tap[i] - cnt > 0 && !arr[tap[i] - cnt])
          arr[tap[i] - cnt] = cnt + 1, ++cntn;
        if (tap[i] + cnt <= n && !arr[tap[i] + cnt])
          arr[tap[i] + cnt] = cnt + 1, ++cntn;
      }
      if (b) break;
      ++cnt;
    }
    cout << *max_element(arr, arr + n + 1) << endl;
  }
  return 0;
}
