This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
///LW M4 ACC HAZ3L GAMED
///YARAB WALA...I MEAN YARAB ACC
#include<bits/stdc++.h>
#define ll long long
#define endl "\n"
const ll mod = (ll) 1e9 + 7;
const ll oo = (ll) 1e18;
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
ll n,m,k;
cin>>n>>m>>k;
n--;
while (n--){
ll a,b;
cin>>a>>b;
}
vector<ll>ans;
map<ll,ll>mp;
while (m--){
cin>>n;
while (n--){
ll x;
cin>>x;
mp[x]++;
}
}
for (auto i:mp){
if (i.second>=k)
ans.push_back(i.first);
}
sort(ans.begin(),ans.end());
cout<<ans.size()<<endl;
for (auto i:ans)
cout<<i<<" ";
cout<<endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |