Submission #968779

# Submission time Handle Problem Language Result Execution time Memory
968779 2024-04-24T04:17:54 Z vjudge1 Pizza (COCI21_pizza) C++17
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    cin >> N;
    for (int i = 0; i < N; i++) {
        int x;
        cin >> x;
        A.insert(x);
    }
    int ans = 0;
    cin >> M;
    while (M--) {
        int x;
        cin >> x;
        bool liked = true;
        while (x--) {
            int y;
            cin >> y;
            if (A.count(y)) liked = false;
        }
        if (liked) ans++;
    }
    cout << ans << endl;
    return 0;
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:6:12: error: 'N' was not declared in this scope
    6 |     cin >> N;
      |            ^
Main.cpp:10:9: error: 'A' was not declared in this scope
   10 |         A.insert(x);
      |         ^
Main.cpp:13:12: error: 'M' was not declared in this scope
   13 |     cin >> M;
      |            ^
Main.cpp:21:17: error: 'A' was not declared in this scope
   21 |             if (A.count(y)) liked = false;
      |                 ^