#include <bits/stdc++.h>
using namespace std;
const int xa = 300;
int a[xa];
int b[xa];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    int k;
    int c = 0;
    cin >> n >> k;
    memset(a, 0, sizeof(a));
    for (int i = 0; i < k; i++) {
      int o;
      cin >> o;
      b[i] = o;
      a[o] = 1;
    }
    bool pan = true;
    while (pan) {
      for (int i = 0; i < k; i++) {
        a[b[i] - c] = 1;
        a[b[i] + c] = 1;
      }
      c++;
      pan = false;
      for (int i = 1; i <= n; i++) {
        if (a[i] != 1) {
          pan = true;
          break;
        }
      }
    }
    cout << c << endl;
  }
}
