#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9;
const long long inf64 = 1e18;
const long long MOD = inf + 7;
void solve() {
  long long n, x;
  cin >> n >> x;
  long long vis[405];
  for (long long i = 0; i < (long long)405; i++) vis[i] = 1;
  for (long long i = 0; i < (long long)n; i++) {
    long long a;
    cin >> a;
    vis[a] = 0;
  }
  vis[0] = 0;
  for (long long i = 1; i < (long long)405; i++) vis[i] += vis[i - 1];
  long long ans = 0;
  for (long long i = 1; i < (long long)201; i++)
    if (vis[i] <= x) ans = max(ans, i);
  cout << ans << "\n";
}
int32_t main() {
  ios::sync_with_stdio(false), cin.tie(nullptr);
  ;
  long long t = 1;
  cin >> t;
  while (t--) solve();
}
