Submission #381887

# Submission time Handle Problem Language Result Execution time Memory
381887 2021-03-26T06:32:58 Z VEGAnn Pizza (COCI21_pizza) C++14
50 / 50
2 ms 364 KB
#include <bits/stdc++.h>
using namespace std;
const int N = 110;
int n, ans, m;
bool mrk[N];

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);

#ifdef _LOCAL
    freopen("in.txt","r",stdin);
#endif // _LOCAL

    cin >> n;

    for (int i = 1; i <= n; i++){
        int x; cin >> x;

        mrk[x] = 1;
    }

    cin >> m;

    for (; m; m--){
        int k; cin >> k;

        bool ok = 1;

        for (int j = 1; j <= k; j++){
            int x; cin >> x;

            ok &= !mrk[x];
        }

        ans += ok;
    }

    cout << ans;

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 2 ms 364 KB Output is correct