#include using namespace std; // 参考:全探索O(2^n) int main(){ int n,m; int i,j,k; int a,b; cin >> n>>m; assert(2<=n && n<=150); assert((n+1)/2<=m && m<=n*(n-1)/2 && m<=1000); vector> vertex(n); for (i=0;i check(m,false); int count = 0; for (i=0;0 < bits>>i;i++){ if ((bits>>i)&1){ for(int e:vertex[i]){ if (!check[e]){ check[e]=true; count++; } } } } if (count==m){ result = bits; break; } } // cout << result << endl; stack stack; while (result){ stack.push((result&1)+'0'); result>>=1; } while (!stack.empty()){ cout << stack.top(); stack.pop(); } cout << endl; return 0; }