【模板】洛谷P2622_状态压缩+bfs_关灯问题_

该题数据较小,想到状态压缩 不可能则输出-1,想到bfs队空后的输出状态 每一个状态都是由上个状态到达的web #include <cstdio> #include <queue> #include <cstring> using namespace std; int n, m, a[111][11]; bool vis[1<<11]; typedef struct pii {int x, s
相关文章
相关标签/搜索