#include <bits/stdc++.h>
using namespace std;
queue<long long> q;
stack<long long> s;
deque<long long> deq;
priority_queue<long long> pq;
const long long maxn = 200005;
long long n, m, l, r, k;
long long ans = 0;
long long a[maxn];
int main() {
  long long T;
  cin >> T;
  while (T--) {
    long long ans = 0;
    cin >> n >> m >> k;
    if (m + k >= n) {
      long long i, ans;
      i = 0;
      ans = 0;
      while (2 * i < n - m + k) {
        i++;
      }
      cout << i << endl;
    } else
      cout << k + 1 << endl;
  }
  return 0;
}
