#include<bits/stdc++.h>
using namespace std;
int main(){
priority_queue<int,vector>,greater<int> >;
priority_queue<int,vector>,less<int> >;
queue.push(入队元素);//将指定元素入队
queue.pop();//出队
queue.top();//返回队头,注意不是front
queue.size();//返回队列长度
queue.empty();
}
#include<bits/stdc++.h>
using namespace std;
void g(unsigned long long int n,unsigned long long int k){
if(n==0uLL) return ;
if(k<(1uLL<<n-1)){
cout << '0';
g(n-1uLL,k);
}
else{
cout << '1';
g(n-1uLL,(1uLL<<n-1)-(k-(1uLL<<(n-1)))-1uLL);
}
}
int main(){
unsigned long long int n,k;
cin >> n >> k;
g(n,k);
}
weavesilk.com
yorg.io