답안 #975888

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
975888 2024-05-06T02:15:48 Z vjudge1 Pizza (COCI21_pizza) C++17
컴파일 오류
0 ms 0 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;

    vector <bool> v(101, 0);
    //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;
                goto mem;
            }
        }

        //if(flag)
        //{
            ans++;
        //}
        mem:
    }
    cout << ans << endl;
}

Compilation message

Main.cpp: In function 'int32_t main()':
Main.cpp:54:5: error: expected primary-expression before '}' token
   54 |     }
      |     ^
Main.cpp:32:14: warning: unused variable 'flag' [-Wunused-variable]
   32 |         bool flag = true;
      |              ^~~~