Submission #975478

# Submission time Handle Problem Language Result Execution time Memory
975478 2024-05-05T09:15:11 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
2 ms 348 KB
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;

    int a[n];

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

    long long cnt = 0;

    int m;
    cin >> m;

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

        bool like = true;

        for (int i = 0; i < k; i++)
        {
            int tmp;
            cin >> tmp;

            for (int j = 0; j < n; j++)
            {
                if (tmp == a[j])
                {
                    like = false;
                    break;
                }
            }
        }

        if (like)
            cnt++;
    }

    cout << cnt;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct