fork download
  1. #include <iostream>
  2. #define MAX 101
  3. using namespace std;
  4.  
  5. int a[MAX];
  6.  
  7. int main() {
  8. int n, l, res = 0, i;
  9. cin >> n;
  10. for(l = 0; l < n; l++) cin >> i, a[i]++;
  11. for(i = 1; i <= MAX - 1; i++) res += a[i] / 4;
  12. cout << res << "\n";
  13. return 0;
  14. }
Success #stdin #stdout 0s 15232KB
stdin
5
8 9 8 9 11
stdout
0