Submission #976585

# Submission time Handle Problem Language Result Execution time Memory
976585 2024-05-06T19:02:49 Z vjudge1 Railway (BOI17_railway) C++17
0 / 100
20 ms 2908 KB
#include <bits/stdc++.h>

using namespace std;

using ll = long long;

#define int ll
#define fore(a, b, c) for(int a=b; a<c; ++a)
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define ii pair<int,int>
#define vi vector<int>

signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    
    int n, m, k;
    cin >> n >> m >> k;
    fore(i, 1, n){
        int u, v;
        cin >> u >> v;
    }

    vi a(n);

    fore(i, 0, m){
        int s;
        cin >> s;
        fore(j, 0, s){
            int x;
            cin >> x;
            a[x]++;
        }
    }

    vi res;

    fore(i, 1, n){
        if(a[i] >= k){
            res.push_back(i);
        }
    }

    cout << sz(res) << endl;
    for(auto xx : res){
        cout << xx << ' ';
    }

}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 20 ms 2904 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 19 ms 2908 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 19 ms 2908 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -