#include <bits/stdc++.h>
using namespace std;
int a[100010], ans, q, n, m;
int main() {
  scanf("%d", &q);
  for (int i = 1; i <= q; i++) {
    scanf("%d%d", &n, &m);
    for (int j = 1; j <= m; j++) scanf("%d", &a[j]);
    ans = a[1];
    ans = max(ans, n - a[m] + 1);
    for (int j = 2; j <= m; j++) ans = max(ans, (a[j] - a[j - 1]) / 2 + 1);
    cout << ans << endl;
  }
  return 0;
}
