fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void solve(int test) {
  6. int x1, x2, x3, x4, y1, y2, y3, y4;
  7.  
  8. cin >> x1 >> y1;
  9. cin >> x2 >> y2;
  10. cin >> x3 >> y3;
  11. x4 = (x1 ^ x2) ^ x3;
  12. y4 = (y1 ^ y2) ^ y3;
  13. cout << "Case #" << test << ": ";
  14. cout << x4 << ' ' << y4 << endl;
  15. }
  16.  
  17. int main() {
  18. // freopen("input.txt", "r", stdin);
  19. // freopen("output.txt", "w", stdout);
  20. int T, test;
  21. cin >> T;
  22. for (test = 1; test <= T; test++) {
  23. cin.ignore();
  24. solve(test);
  25. }
  26. return 0;
  27. }
Success #stdin #stdout 0s 5328KB
stdin
2

0 0
42 0
0 42

7 8
7 5
2 8
stdout
Case #1: 42 42
Case #2: 2 5