#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int modpow(int x, int n, int m) {
  if (n == 0) return 1;
  long long ans = 1;
  while (n > 0) {
    if (n % 2 == 1) ans = (ans * x) % m;
    x = (x * x) % m;
    n /= 2;
  }
  return ans;
}
void solve() {
  long long a, b, c;
  long long d;
  cin >> a >> b >> c;
  d = a - (b + c);
  d = max(d, b - (a + c));
  d = max(d, c - (a + b));
  if (d < 0) d = 0;
  d++;
  if (d <= 0) d = 1;
  cout << d << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  cin >> t;
  while (t--) solve();
}
