fork download
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. using namespace std;
  5.  
  6. void solve(long int T, long int test) {
  7. long int x1, x2, x3, x4, y1, y2, y3, y4;
  8.  
  9. ifstream input("input.txt");
  10. ofstream output("output.txt");
  11.  
  12. input >> x1 >> y1;
  13. input >> x2 >> y2;
  14. input >> x3 >> y3;
  15. x4 = (x1 ^ x2) ^ x3;
  16. y4 = (y1 ^ y2) ^ y3;
  17. output << "Case #" << test << ": " << x4 << ' ' << y4 << endl;
  18.  
  19. input.close();
  20. output.close();
  21. }
  22.  
  23. int main() {
  24. long int T, test;
  25.  
  26. ifstream input("input.txt");
  27. input >> T;
  28. for (test = 1; test <= T; test++) {
  29. input.ignore(); // to ignore the newline character
  30. solve(T, test);
  31. }
  32. input.close();
  33. return 0;
  34. }
Success #stdin #stdout 0s 5316KB
stdin
50

1 5
4 7
4 5

16 12
94 36
94 12

596516650 189641422
428685712 189641422
428685712 23000073

783368691 19632786
783368691 102520060
478160381 102520060

365180541 540383427
304089172 222688882
304089172 540383427

35005212 521595369
35005212 162170322
14660871 521595369

336465783 861021531
336465783 233665123
278722862 861021531

145174068 395870394
85295453 395870394
145174068 468703136

315634023 490175108
106596977 635723059
106596977 490175108

59961394 89018457
59961394 54145816
28561071 89018457

131176230 653377374
72427041 653377374
131176230 607790171

517747628 756898538
608413785 459797248
517747628 459797248

149798316 38664371
149798316 30146042
80978201 30146042

260655588 424268981
260655588 324972892
412776092 324972892

137806863 6499768
18258955 42999171
137806863 42999171

511702306 84420926
511702306 54496881
402370166 84420926

572660337 41356669
233090509 159126506
572660337 159126506

34341670 433925858
100661314 84353895
100661314 433925858

119259648 1100546
939819583 1100546
119259648 865691

153313173 174323385
153313173 585990365
610515435 174323385

467946188 356426809
477171088 356426809
477171088 107813133

491705403 499715481
491705403 709393585
780695789 499715481

752392755 474612400
549214422 474612400
549214422 314870260

120848385 843993369
411549677 843993369
120848385 296223274

0 0
0 1
1 0

2 0
2 1
6 1

49 0
68 2
49 2

330573318 603570493
35060062 603570493
330573318 56690263

402724286 485560281
959997302 485560281
402724286 107649160

194953866 158487239
169274578 894429690
194953866 894429690

221558441 8639737
177724267 8639737
221558441 270744730

114738098 690387
114738098 7905772
92977305 7905772

21583857 498777856
610120710 498777856
610120710 791698928

255179498 524872354
72075088 524872354
72075088 522532257

82950912 192099256
82950912 703964684
269455307 703964684

160051529 31061285
160051529 40332872
112805732 31061285

378409504 515530020
378409504 26773308
199620254 26773308

143347213 77486716
409959709 77486716
409959709 4297113

200747797 289700724
200747797 168002245
113403633 168002245

150122847 439493452
90155839 439493452
90155839 2269747

231192380 338888228
231192380 622597489
111537764 338888228

147469842 269441500
147469842 438792351
141527089 438792351

13628669 116087765
13628669 39237149
142757035 116087765

6321447 387346491
8936988 387346491
6321447 982275857

350322228 841148366
209098719 77985204
209098719 841148366

473165004 39636468
771151433 39636468
771151433 186452552

187594922 128448265
187594922 213975408
476153276 128448265

653468859 130794396
585567170 53539693
585567170 130794396

605908236 350573794
76065818 350573794
76065818 203599252

0 0
1 1
0 1
stdout
Standard output is empty