#include #include #include #include using namespace std; int n,m; int v[1100005]; struct node { int yes; int no; int kill; int add; int time; }tr[105]; struct node1 { int bug; int step; bool operator < (const node1 &a)const { return step > a.step; } }; priority_queue Q; bool ok(int bug,node t) { if((t.no&bug)!=0)return false; if((t.yes&bug)!=t.yes)return false; return true; } int fix(int bug,node t) { int tmp=bug; bug=((~t.kill)&bug); bug=(t.add|bug); if(tmp==bug)return -1; return bug; } void bfs() { node1 w,e; while(!Q.empty()) { w=Q.top(); Q.pop(); if(w.bug==0){printf("Fastest sequence takes %d seconds.\n",w.step);return;} //cout<<"----"<= v[e.bug])continue; v[e.bug] = e.step; Q.push(e); } } } printf("Bugs cannot be fixed.\n"); } int main() { char a[200],b[200]; node1 w; int CASE=1; while(scanf("%d%d",&n,&m)!=EOF && n && m) { int g = 0; g = (1 <