#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, k, seconds, tapesInt[200], curTape;
  bool beds[200], tapesBool[200], done;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    cin >> n >> k;
    memset(beds, false, n);
    memset(tapesBool, false, n);
    for (int j = 0; j < k; ++j) {
      cin >> curTape;
      tapesInt[j] = curTape - 1;
      tapesBool[curTape - 1] = true;
    }
    for (int j = 0; j < k; ++j) beds[tapesInt[j]] = true;
    done = false;
    seconds = 1;
    while (!done) {
      done = true;
      for (int j = 0; j < n; ++j) {
        if (!beds[j]) {
          done = false;
          break;
        }
      }
      for (int j = 0; j < n; ++j) {
        if (tapesBool[j]) {
          if (j - seconds >= 0) beds[j - seconds] = true;
          if (j + seconds <= n) beds[j + seconds] = true;
        }
      }
      if (!done) ++seconds;
    }
    cout << seconds << '\n';
  }
}
