Submission
Status:
Compilation Error
Score: 0
User: ShynyC
Problemset: กองชาม
Language: cpp
Time: 0.000 second
Submitted On: 2025-04-10 18:57:21
#include <iostream>
#include <vector>
using namespace std;
int main(){
int n,temp,repeat = 1,max = 1;
cin >> n;
vector<int> plates;
for(int i = 0; i < n; i++){
cin >> temp;
plates.push_back(temp);
}
sort(plates.begin(),plates.end());
for(int i = 0; i < n-1; i++){
for(int j = i+1; j < n; j++){
if(plates[i] == plates[j]){
repeat++;
if(repeat > max){
max = repeat;
}
}else{
break;
}
}
repeat = 1;
}
cout << max;
}