# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
472425 | yasseenkamel | Railway (BOI17_railway) | C++14 | 119 ms | 1828 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC optimize("-Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef int in;
#define int long long
#define s second
#define f first
const long double EPS=1e-9;
const int MOD=1e9+7;
const int N=1e6;
int n,m,k;
int f[100005];
in main(){
cin >> n >> m >> k;
for(int i = 0 ; i < n - 1 ; i ++){
int x,y;
cin >> x >> y;
}
for(int i = 0 ; i < m ; i ++){
int x;
cin >> x;
for(int j = 0 ; j < x ; j ++){
int y;
cin >> y;
f[y] ++;
}
}
vector<int> v;
for(int i = 1 ; i <= n ; i ++){
if(f[i] >= k){
v.push_back(i);
}
}
cout << v.size() << endl;
for(int i = 0 ; i < v.size() ; i ++){
cout << v[i] << " ";
}
return 0;
}
Compilation message (stderr)
# | 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... |