123456789
void Check(int** a, int** b, int** c, int width, int height) { for (int h=0;h<height;h++) for (int w=0;w<width;w++) if (a[h*height+w]==b[h*height+w]) c[h*height+w]=1; else c[h*height+w]=0; }