Submission #1004111

#TimeUsernameProblemLanguageResultExecution timeMemory
1004111ayankarimovaRailway (BOI17_railway)C++14
0 / 100
39 ms4188 KiB
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define ll long long const ll sz=2005; /* {} [] */ int main() { ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); ll n, m, k; cin>>n>>m>>k; for(int i=1; i<n; i++){ ll a, b; cin>>a>>b; } set<ll>s; map<ll, ll>mp; for(int i=1; i<=m; i++){ ll x; cin>>x; for(int j=1; j<=x; j++){ ll t; cin>>t; mp[t]++; } } for(auto i:mp){ if(i.second>=k){ s.insert(i.first); } } cout<<s.size()<<endl; for(auto i:s) cout<<i<<' '; } /* {} [] */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...