首页 > 其他 > 详细

L1-034. 点赞

时间:2017-08-09 12:12:08      阅读:312      评论:0      收藏:0      [点我收藏+]

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;
}

L1-034. 点赞

原文:http://www.cnblogs.com/1915884031A-qqcom/p/7324494.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!