include iostream define bigLen 1000000 define len 100 using namespace

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <iostream>
#define bigLen 1000000
#define len 100
using namespace std;
int b[bigLen];
class Q{
private:
int a[len];
int n;
public:
void Enter(){
cout << "Vvedite dlinu massiva" << endl;
cin >> n;
cout << "Vvedite elementi massiva" << endl;
for (int q=0; q<n; q++)
cin >> a[q];
}
void Output(){
cout << endl;
for (int q=0; q<n; q++)
cout << a[q] << " ";
cout << endl;
}
int TaskOutPut(){
int maxValue = -bigLen;
for (int q=0; q<bigLen; q++)
b[q] = 0;
for (int q=0; q<n; q++)
b[a[q]]++;
for (int q=0; q<bigLen; q++)
if (b[q] > maxValue)
maxValue = b[q];
return maxValue;
}
};
int main(){
Q obj;
obj.Enter();
cout << obj.TaskOutPut() << endl;
}