#include #include using namespace std; #define VAR(name, min, max) int name template struct simulator { vector automaty; vector kopie; int N; int cas; simulator(int N) { this->N = N; automaty.resize(N); kopie.resize(N); cas = 0; } void krok() { for (int i=0; i 0) ? &kopie[i-1] : NULL; automaty[i].P = (i < N-1) ? &kopie[i+1] : NULL; } for (int i=0; i