Advertisement
a53

unique

a53
Dec 17th, 2021
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. bitset<200001> a,b;
  4.  
  5. int main()
  6. {
  7. int x, cnt=0;
  8. while(cin>>x)
  9. {
  10. if(a[x]==0)
  11. ++cnt,a[x]=1;
  12. else
  13. {
  14. if(b[x]==0)
  15. --cnt;
  16. b[x]=1;
  17. }
  18. }
  19. cout<<cnt;
  20. return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement