fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4. long long n,s=1,x;
  5. vector <int> vt;
  6. int main()
  7. {
  8. ios_base::sync_with_stdio(0);
  9. cin.tie(0);cout.tie(0);
  10. while(cin>>n)
  11. {
  12. vt.push_back(n);
  13. }
  14. sort(vt.begin(),vt.end());
  15. for(int i=0;i<vt.size()-1;i++) if(vt[i]!=vt[i+1]) s++;
  16. cout<<s;
  17. return 0;
  18. }
  19.  
Runtime error #stdin #stdout 0.04s 5300KB
stdin
Standard input is empty
stdout
Standard output is empty