#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int num[205];
  while (t--) {
    for (int i = 0; i < 205; i++) num[i] = 0;
    int n, m;
    cin >> n >> m;
    for (int i = 0; i < m; i++) {
      int a;
      cin >> a;
      num[a] = 1;
    }
    int temp = 1;
    int flag = 1;
    while (true) {
      int i = 0;
      flag = 1;
      for (i = 1; i <= n; i++) {
        if (num[i] == 0) {
          flag = 0;
          break;
        }
      }
      if (i == n + 1) {
        cout << temp << endl;
        break;
      }
      temp++;
      for (int j = 0; j <= n; j++) {
        if (num[j] == 1) {
          if (num[j - 1] == 0) num[j - 1] = 2;
          if (num[j + 1] == 0) num[j + 1] = 2;
        }
      }
      for (int j = 0; j <= n; j++) {
        if (num[j] == 2) {
          num[j]--;
        }
      }
    }
  }
}
