#include #include #include #include using namespace std; const int bufsize=8*100010; char buf[bufsize]; int main() { int L, M, N, Q; fgets(buf, bufsize, stdin); sscanf(buf, "%d%d%d", &L, &M, &N); bitset<100001> a; fgets(buf, bufsize, stdin); a.set(atoi(strtok(buf, " "))); for(int i=1;i b; fgets(buf, bufsize, stdin); b.set(atoi(strtok(buf, " "))); for(int i=1;i