Submission #975565

# Submission time Handle Problem Language Result Execution time Memory
975565 2024-05-05T13:27:40 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 500 KB
#include <bits/stdc++.h>

using namespace std;

#define int long long
#define Foxfur ios_base::sync_with_stdio(0);cin.tie(NULL);

int32_t main()
{
Foxfur

    int n; cin >> n;

    bool v[101];
    memset(v,false,sizeof(v));

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

        v[x] = true;
    }

    int m; cin >> m;
    int ans=0;

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

        bool flag = true;

        for(int j=0; j<k; j++)
        {
            cin >> bingkisan[j];
        }

        for(int j=0; j<k; j++)
        {
            if(v[bingkisan[j]] == true)
            {
                flag = false;
                break;
            }
        }

        if(flag)
        {
            ans++;
        }
    }
    cout << ans << endl;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 500 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 500 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 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct