fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. //freopen("DIF.INP","r",stdin);
  6. //freopen("DIF.OUT","w",stdout);
  7. int n;
  8. cin >> n;
  9. int a[n];
  10. int b[100001]={0};
  11. for (int i=0;i<n;i++) {
  12. cin >> a[i];
  13. b[a[i]]++;
  14. }
  15. int d=0;
  16. for (int j=1;j<=100000;j++) {
  17. if (b[j]>d) {
  18. d=b[j];
  19. }
  20. }
  21. cout << d;
  22. }
Success #stdin #stdout 0s 5320KB
stdin
9
3 3 4 5 1 2 1 3 6
stdout
3