#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx") #include using std::cerr; using std::cin; using std::cout; using std::abs; using std::min; using std::max; using std::swap; using std::map; using std::pair; using std::set; using std::string; using std::vector; using ll = long long; using uint = unsigned int; using pii = pair; using pll = pair; #define ff first #define ss second #define pb emplace_back template void _dbg(const char* _s, T _h) { cerr << _s << " = " << _h <<"\n"; } template void _dbg(const char* _s, T _h, Ts... _t) { int _b = 0; while (((_b += *_s == '(') -= *_s == ')') != 0 || *_s != ',') cerr << *_s++; cerr << " = " << _h << ","; _dbg(_s+1, _t...); } #ifdef LOCAL #define dbg(...) _dbg(#__VA_ARGS__, __VA_ARGS__) #else #define dbg(...) #endif struct init { init() { cin.tie(0); std::iostream::sync_with_stdio(0); cout << std::fixed << std::setprecision(10); cerr << std::fixed << std::setprecision(5); #ifdef LOCAL srand(300); #else using namespace std::chrono; srand(duration_cast(high_resolution_clock::now().time_since_epoch()).count()); #endif } ~init() { #ifdef LOCAL cerr << "Time elapsed: " << (double)clock() / CLOCKS_PER_SEC << "s.\n"; #endif } } init; int main() { int t; cin >> t; while (t--) { int a, b, c; cin >> a >> b >> c; cout << a + b - c << '\n'; } return 0; }