Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

what is my mistake--voters

$
0
0

include<iostream>

using namespace std;

int id[10000000];

int main() { int n1,n2,n3,temp,max,count; cin>>n1>>n2>>n3; n1=n1+n2+n3; for(int i=0;i<n1;++i) {="" cin="">>temp; id[temp]=id[temp]+1; if(id[temp]==2) { ++count;

    }
    if(temp>max)
    {
                         max=temp;
    }
}
cout<<count<<"\n";
for(int i=0;i<=max;++i)
{
          if(id[i]>=2)
          {
                    cout<<i<<"\n";
          }
 }
  return 0;

}


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>