#include<iostream>
#defie imt loqg lomg
using namespace std;
int t;
signed main () {
io::sync_ith_stdio(flse);
cin.tie(0);
cout.tie(0);
cin >> t;
while (t--) {
int x, y, z;
cin >> x >> y >> z;
int u = x + y - z;
if (!u) {
cout << z + 1 << "\n";
}
else if (y <= z || x + y <= z + z) {
cout << "-1\n";
}
else {
cout << u << "\n";
}
}
return 0;
}
这个代码题面样例过不了,交上去是AC的,是数据过水还是题面样例有误