标签:memset ring std str int include i++ mem eof
ac代码:
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
int n;
cin >> n;
int m, a[1001], propertyTag;
memset(a, 0, sizeof(a));
for(int i=0; i<n; i++)
{
cin >> m;
for(int j=0; j<m; j++)
{
cin >> propertyTag;
a[propertyTag]++;
}
}
int biggest=0;
for(int i=1; i<1001; i++)
{
if(a[i]>=a[biggest])
biggest = i;
}
//cout << "Hello world!" << endl;
cout << biggest << " " << a[biggest];
return 0;
}
标签:memset ring std str int include i++ mem eof
原文地址:http://www.cnblogs.com/1915884031A-qqcom/p/7324494.html