-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1920.cpp
More file actions
39 lines (35 loc) · 681 Bytes
/
1920.cpp
File metadata and controls
39 lines (35 loc) · 681 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <stdio.h>
int not_fun_heap[100001];
int main()
{
int n,a;
bool yes_zero = 0;
scanf("%d",&n);
for (int i = 0; i < n; i ++)
{
scanf("%d",&a);
if (a == 0)
{
yes_zero = 1;
}
int now = a;
int index_now = 1;
while (1)
{
if (a == 0) break;
if (not_fun_heap[index_now] == 0)
{
not_fun_heap[index_now] = now;
break;
}
}
}
int m;
scanf("%d",&m);
for (int i = 0; i < n; i ++)
{
scanf("%d",&a);
if (a == 0) printf("%d",yes_zero);
}
return 0;
}