#include #include int main() { int N; int M; int *P; int *Q; scanf("%d", &N); scanf("%d", &M); P = (int*)malloc(sizeof(int)*M); Q = (int*)malloc(sizeof(int)*M); int i; for (i=0; i