fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n,m,i,j,x=0,a[10][10];
  6. cin>>n>>m;
  7. for(i=0;i<n;i++)
  8. {
  9. for(j=0;j<m;j++)
  10. {
  11. cin>>a[i][j];
  12. }
  13.  
  14. }
  15. for(i=0;i<n;i++)
  16. {
  17. for(j=0;j<m;j++)
  18. {
  19. x^=a[i][j];
  20. }
  21.  
  22. }
  23. cout<<x;
  24. // your code goes here
  25. return 0;
  26. }
Success #stdin #stdout 0s 3416KB
stdin
2
3
1
2
4
5
7
8
stdout
13