更新至A…
题A
题意:$n$ 组camp,每组若干个人,问多少人参加了全部camp
解:略
#include<bits/stdc++.h>
using namespace std;
map<string,int> p, q;
int main(){
int n; cin >> n;
set<string> s;
for(int j = 1; j <= n; ++ j){
int c; cin >> c;
for(int i = 1; i <= c; ++ i) {
string x; cin >> x;
p[x] ++;
s.insert(x);
}
}
for(auto [x, y]: p) if(y == n) q[x] ++;
cout << q.size() << '\n';
for(auto [x, y]: q) cout << x << '\n';
}