Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int b,c,d=0,e,i,j,k,l;
- cin>>b>>c;
- int a[b+10];
- for(i=1;i<=b;i++)
- {
- cin>>e;
- a[e]++;
- }
- for(j=1;j<=c;j++)
- {
- if(a[j]%2)
- {
- d++;
- }
- }
- cout<<b-d/2<<"\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement