Codeforces Round #494 (Div. 3) ----A
程序员文章站
2022-06-02 11:53:06
...
相同的硬币不能装在同一个口袋,那么能用多少个口袋装,由出现次数最多的硬币决定,那么就是找输入的数重复次数最多的数
#include <bits/stdc++.h>
using namespace std;
int a[105];
int main(){
int n,num,k = 0;
cin >> n;
for (int i=0; i<n; i++) {
cin >> num;
a[num]++;
if (a[num] > k) k = a[num];
}
cout << k << endl;
return 0;
}
推荐阅读
-
Codeforces Round #280 (Div. 2) B_html/css_WEB-ITnose
-
Codeforces Round #214 (Div. 2)??Dima and Salad_html/css_WEB-ITnose
-
Codeforces Round #251 (Div. 2)-C,D_html/css_WEB-ITnose
-
Codeforces Round #252 (Div. 2)-C,D_html/css_WEB-ITnose
-
Codeforces Round #277.5 (Div. 2)-D_html/css_WEB-ITnose
-
Codeforces Round #225 (Div. 1) C 树状数组 || 线段树_html/css_WEB-ITnose
-
Codeforces Round #275 (Div. 1)D(树形DP)_html/css_WEB-ITnose
-
Codeforces Round #264 (Div. 2)
-
Codeforces Round #281 (Div. 2)_html/css_WEB-ITnose
-
Codeforces Round #259 (Div. 2) A B C 三连发_html/css_WEB-ITnose