/****************************************/ /* Calculation of LightsOut by takaken */ /* */ /* --> light ysize xsize */ /****************************************/ #include #include #define XSIZE 32 #define YSIZE 32 #define AREA (XSIZE * YSIZE) #define BLOCK ((AREA - 1) / 64 + 1) typedef unsigned __int64 u64; u64 prob[AREA][BLOCK], push[AREA][BLOCK]; int diffy[4] = {-1,0,1, 0}; int diffx[4] = { 0,1,0,-1}; int xsize, ysize, area, block; char ch[2]; void main(int argc, char *argv[]) { int x, y, div, vect, x0, y0, x1, y1; u64 temp, bit, bittb[64]; /* size */ ysize = atoi(argv[1]); xsize = atoi(argv[2]); if (ysize>YSIZE || xsize>XSIZE) { printf("big size!"); return; } /* initialize */ area = xsize * ysize; block = (area - 1) / 64 + 1; for (y=0; y=0 && x1=0 && y1