#include using namespace std; int main() { int t; cin >> t; while (t--) { int a, b, c; cin >> a >> b >> c; int ans = 0; for (int i = 1; i <= min(a, b); ++i) { int fixed = min(a, b) - i; int o = max(a, b) - i; if (a + b - fixed == c) { ans = fixed; } } cout << ans << '\n'; } return 0; }