#include <bits/stdc++.h>
using namespace std;
int vis[209];
int q[4];
int main() {
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    memset(vis, 0, sizeof(vis));
    for (int i = 0; i < m; i++) {
      int q;
      cin >> q;
      vis[q] = 1;
    }
    for (int i = 1; i <= 300; i++) {
      int flag = 0;
      for (int j = 1; j <= n; j++) {
        if (!vis[j] && (vis[j + 1] == i || vis[j - 1] == i)) {
          vis[j] = i + 1;
          flag = 1;
        }
      }
      if (!flag) {
        cout << i << endl;
        break;
      }
    }
  }
  return 0;
}
