5.话题焦点人物
#include <bits/stdc++.h> using namespace std; map<int,int>x; int main(){ int n,maxx = 0,c; cin>>n; int a[n+1],b[n+1],k[n+1]; for(int i = 1;i<=n;i++){ cin>>a[i]>>b[i]; for(int j = 1;j<=b[i];j++){ cin>>k[j]; x[k[j]]++; maxx = max(maxx,x[k[j]]); if(x[k[j]]>maxx){ c = j; } } } cout<<maxx<<endl<<c; for(int i = 1;i<=n;i++){ for(int j = 1;j<=b[i];j++){ if(b[j]==c){ cout<<a[j]<<" "; } } } return 0; } /*5 1 2 3 4 1 0 90 3 1 2 4 4 2 3 2 2 1 3*/
标签:2309,二级,maxx,int,c++,main From: https://www.cnblogs.com/wangyihang-xh/p/17818129.html