#include #include #define MAXN 100000 #define MAXM 200000 int A[MAXM], B[MAXM], V[MAXM]; char S[MAXN+1]; int main() { FILE *fr, *fw; int N, M, i; fr = fopen("input.txt", "r"); fw = fopen("output.txt", "w"); assert(2 == fscanf(fr, "%d %d", &N, &M)); for(i=0; i