#include <bits/stdc++.h>
int main() {
  int t;
  scanf("%d", &t);
  for (int a = 0; a < t; a++) {
    int n, k, data[205] = {0};
    scanf("%d %d", &n, &k);
    for (int i = 0; i < k; i++) {
      int x;
      scanf("%d", &x);
      data[x] = 1;
    }
    int cnt = 0;
    while (1) {
      int temp[205] = {0}, sum = 0;
      for (int i = 1; i <= n; i++) {
        sum += data[i];
      }
      if (sum == n) break;
      for (int i = 1; i <= n; i++) {
        if (data[i] == 1) {
          temp[i - 1] = temp[i] = temp[i + 1] = 1;
        }
      }
      for (int i = 1; i <= n; i++) {
        data[i] = temp[i];
      }
      cnt++;
    }
    printf("%d\n", cnt + 1);
  }
  return 0;
}
