fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int a,b,c,d;
  7. cin>>a>>b>>c>>d;
  8. set<int> s;
  9. s.insert(a);
  10. s.insert(b);
  11. s.insert(b);
  12. s.insert(d);
  13. cout<<4-s.size();
  14. return 0;
  15. }
Success #stdin #stdout 0s 4500KB
stdin
1 7 3 3
stdout
1