оптимизируй    #include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <iostream>
using namespace std;
int main()
{
	int c[100000], p[100000], t[100000];
	int i, n, j, k;

	cin >> n;
	for (i = 1; i <= n; i++)
	{
		cin >> c[i];
	}

	cin >> k;
	for (j = 1; j <= k; j++)
		cin >> p[j];
	for (i = 1; i <= n; i++)
		t[i] = 0;
	for (i = 1; i <= n; i++)
		for (j = 1; j <= k; j++)
			if (p[j] == i)
				t[i]++;
	for (i = 1; i <= n; i++)
		if (t[i]>c[i]) { cout << "yes" << endl; }
		else { cout << "no" << endl; }
		system("pause");
}