fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int t;
  6. cin >> t;
  7. while (t--) {
  8. long long a, b, c;
  9. cin >> a >> b >> c;
  10. cout << max(abs(a - b), abs(a + c - b)) << '\n';
  11. }
  12. }
  13.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Standard output is empty