#include <bits/stdc++.h>
using namespace std;
int t;
int main() {
  scanf("%d", &t);
  while (t--) {
    int n, k;
    int x[1000] = {0};
    int tap[1000];
    scanf("%d%d", &n, &k);
    for (int i = 1; i <= k; i++) {
      scanf("%d", &tap[i]);
      x[tap[i]]++;
    }
    if (n == k) {
      printf("1\n");
      continue;
    }
    int second = 1, j = 1;
    while (1) {
      for (int i = 1; i <= k; i++) {
        if (x[tap[i] - j] == 0 && tap[i] - j > 0) {
          x[tap[i] - j] = 1;
        }
        if (x[tap[i] + j] == 0 && tap[i] + j <= n) {
          x[tap[i] + j] = 1;
        }
      }
      int c = 0;
      second++;
      for (int i = 1; i <= n; i++)
        if (x[i] == 1) c++;
      if (c == n) break;
      j++;
    }
    printf("%d\n", second);
  }
  return 0;
}
