ZOJ-3652-Maze(BFS)(二)

2015-01-27 14:13:09 · 作者: · 浏览: 60
t.step=step+1; t.state=qt.state; if(!vis[t.state][t.x][t.y]) { vis[t.state][t.x][t.y]=1; que.push(t); } } else { if((1< 0) q.push(qt); qt.step++; t.x=qt.x; t.y=qt.y; t.step=step+1; t.state=qt.state; if(!vis[t.state][t.x][t.y]) { vis[t.state][t.x][t.y]=1; que.push(t); } } else { t.x=qt.x; t.y=qt.y; t.step=step+1; t.state=qt.state; if(!vis[t.state][t.x][t.y]) { vis[t.state][t.x][t.y]=1; que.push(t); } } } } else//有妖怪 { if(mp[qt.x][qt.y]==0) { qt.step--; qt.state|=(1< 0) q.push(qt); qt.step++; t.x=qt.x; t.y=qt.y; t.step=step+1; t.state=(qt.state|(1< 0) q.push(qt); qt.step++; t.x=qt.x; t.y=qt.y; t.step=step+1; t.state=(qt.state|(1<