#include #include #include #include #include #include #include int main(){ int n,one,two,three,four,five; one=0; two=0; three=0; four=0; five=0; scanf("%d",&n); int *types = malloc(sizeof(int) * n); for(int types_i = 0; types_i < n; types_i++){ scanf("%d",&types[types_i]); } // your code goes here for(int types_i=0; types_i < n; types_i++){ if(types[types_i]==1) one++; else if(types[types_i]==2) two++; else if(types[types_i]==3) three++; else if(types[types_i]==4) four++; else five++; } if(one>=two&&one>=three&&one>=four&&one>=five) printf("1"); else if(two>=one&&two>=three&&two>=four&&two>=five){ if(two==one) printf("1"); else printf("2"); } else if(three>=two&&three>=one&&three>=four&&three>=five){ if(three==two&&three==one) printf("1"); else if(three==two) printf("2"); else printf("3"); } else if(four>=two&&four>=three&&four>=one&&four>=five){ if(four==three&&four==two&&four==one) printf("1"); else if(four==three&&four==two) printf("2"); else if(four==three) printf("3"); else printf("4"); } else{ if(five==four&&three==five&&five==one&&five==two) printf("1"); else if(five==four&&five==three&&five==two) printf("2"); else if(five==four&&five==three) printf("3"); else if(five==four) printf("4"); else printf("5"); } return 0; }