Submission #808221

# Submission time Handle Problem Language Result Execution time Memory
808221 2023-08-05T05:11:50 Z Tunglam07 Pizza (COCI21_pizza) C++17
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;
	
int main()
{ 
	long long n, m, ans = 0, x, y;
	cin >> n;
	bool ck[100001], ch;
	for(int i = 0; i < n; i++)
	{
		cin >> id;
		ck[id] = 1;
	}
	cin >> m;
	for(int i = 0; i < m; i++)
	{
		ch = 0;
		cin >> id;
		for(int j = 0; j < id; j++)
		{
			cin >> id2;
			if(ck[id2])	
			{
				ch = 1;
			}
		}
		if(!ch)	
		{
			ans++;
		}
	}
	cout << ans;
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:11:10: error: 'id' was not declared in this scope; did you mean 'i'?
   11 |   cin >> id;
      |          ^~
      |          i
Main.cpp:18:10: error: 'id' was not declared in this scope; did you mean 'i'?
   18 |   cin >> id;
      |          ^~
      |          i
Main.cpp:21:11: error: 'id2' was not declared in this scope
   21 |    cin >> id2;
      |           ^~~
Main.cpp:6:27: warning: unused variable 'x' [-Wunused-variable]
    6 |  long long n, m, ans = 0, x, y;
      |                           ^
Main.cpp:6:30: warning: unused variable 'y' [-Wunused-variable]
    6 |  long long n, m, ans = 0, x, y;
      |                              ^