Submission
Status:
PPPPPPTTTT
Subtask/Task Score:
60/100
Score: 60
User: speed_coding
Problemset: กองชาม
Language: cpp
Time: 1.094 second
Submitted On: 2026-09-27 20:24:37
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int a[100000];
for(int i = 0; i < n ; i++){
cin >> a[i];
}
for(int i = 0; i < n-1; i++){
int minindex = i;
for(int j = i +1; j < n; j++){
if(a[j] < a[minindex]){
minindex = j;
}
}
int temp;
temp = a[i];
a[i] = a[minindex] ;
a[minindex] = temp;
}
int count = 1;
int answer = 1;
for(int i =1; i< n; i++){
if(a[i] == a[i-1]){
count++;
}
else{
count = 1;
}
if (count > answer){
answer = count;
}
}
cout << answer;
}