Submission #366283

# Submission time Handle Problem Language Result Execution time Memory
366283 2021-02-13T19:07:48 Z model_code Pizza (COCI21_pizza) C++17
50 / 50
1 ms 364 KB
#include <bits/stdc++.h>
using namespace std;

int a[100], k[100], b[100][100];

int main() {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++)
        cin >> a[i];

    int m;
    cin >> m;

    int sol = 0;
    for (int i = 0; i < m; i++) {
        cin >> k[i];

        bool ok = true;
        for (int j = 0; j < k[i]; j++) {
            cin >> b[i][j];
            for (int x = 0; x < n; x++)
                if (a[x] == b[i][j])
                    ok = false;
        }

        if (ok) sol++;
    }

    cout << sol << '\n';

    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 0 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