#include <bits/stdc++.h>
using namespace std;
const int mod = (int)1e9 + 7;
const int INF = (int)1e18;
void fileio() {}
long long bin_search(long long a, long long b, long long l, long long r) {
  long long mid, res = -1;
  long long tot = r;
  while (r >= l) {
    mid = l + (r - l) / 2;
    long long x = a + (tot - mid);
    long long y = b + mid;
    if (x > y) {
      res = mid;
      l = mid + 1;
    } else
      r = mid - 1;
  }
  return res;
}
void solve() {
  long long a, b, c;
  cin >> a >> b >> c;
  long long ans = bin_search(a, b, 0, c);
  cout << ans + 1 << "\n";
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  fileio;
  int t;
  cin >> t;
  while (t--) solve();
}
