This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> // Compile: g++ -O3 -march=native -fomit-frame-pointer life.cpp -o life.exe | |
| using namespace std; | |
| #define MAX_SIZE (2558 + 2) // 2558 + walls in each edge | |
| #define DSTEP 1024 | |
| #define PARENT_SIZE (DSTEP/4 * (ly+2) * (lx+2)) | |
| #define parents(step, y, x) parents[(step)*(ly+2)*(lx+2) + (y)*(lx+2) + (x)] | |
| int dchr[4] = { 'D', 'R', 'U', 'L' }; // Down, Right, Up, Left |