bool process(state* astate, queue<state*>& bfsq) { if(astate->clocks == ten9) { return print(astate); } for(int i=0; i<9; i++) { newstate.set(astate); newstate.inc(config[i]); //cout<<"trying state: "<<newstates[i].getnum()<<", foundsz="<<answers.size()<<endl; if(visited.find(newstate.clocks) == visited.end()) { state *ns = new state(); ns->clocks = newstate.clocks; ns->prevop = i+1; ns->prevstate = astate; bfsq.push(ns); visited[ns->clocks] = true; nobj++; } } return true; }