#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #ifdef LOCAL #define dbg(x) cerr << #x " = " << x << endl; #include "pretty_print.h" #else #define dbg(x) #endif typedef long double ld; typedef long long ll; typedef unsigned long long ull; #define snd second #define fst first template T sqr(T x) { return x * x; } template T abs(T x) { return x < 0? -x : x; } template T gcd(T a, T b) { return b? gcd(b, a % b) : a; } template bool chmin(T &x, const T& y) { if (x > y) { x = y; return true; } return false; } template bool chmax(T &x, const T& y) { if (x < y) { x = y; return true; } return false; } int main(int /* argc */, char** /* argv */) { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while (t--) { int a, b, c; cin >> a >> b >> c; cout << a + b - c << endl; } cerr << "Time execute: " << clock() / (double)CLOCKS_PER_SEC << " sec" << endl; return 0; }