Advertisement
Promi_38

cf 519B

May 1st, 2021
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.     int t, i, j, k;
  6.     scanf("%d", &t);
  7.     int a[t], b[t-1], c[t-2];
  8.    
  9.     for(i = 0; i < t; i++) scanf("%d", &a[i]);
  10.     for(j = 0; j < t - 1; j++) scanf("%d", &b[j]);
  11.     for(k = 0; k < t - 2; k++) scanf("%d", &c[k]);
  12.    
  13.     int x = 0;
  14.     for(i = 0; i < t; i++) x ^= a[i];
  15.     for(j = 0; j < t - 1; j++) x ^= b[j];
  16.     printf("%d\n", x);
  17.    
  18.     int y = 0;
  19.     for(j = 0; j < t - 1; j++) y ^= b[j];
  20.     for(k = 0; k < t - 2; k++) y ^= c[k];
  21.     printf("%d\n", y);
  22.  
  23.     return 0;  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement