fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. long long n1, n2, n3, arr[1000000], k, count=0, n;
  7. cin>>n1>>n2>>n3; n=n1+n2+n3;
  8. for(int i=0; i<1000000; i++) arr[i]=0;
  9. while(n--) {cin>>k; arr[k]++;}
  10. for(int i=0; i<1000000; i++) if(arr[i]>1) count++;
  11. cout<<count<<endl;
  12. for(int i=0; i<1000000; i++) if(arr[i]>1) cout<<i<<endl;
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 11032KB
stdin
2 3 1
-4 -2
-6 -4 -2
10
stdout
0