rt,本人蒟蒻,不知道哪里不对
#include <bits/stdc++.h>
using namespace std;
char str[350];
priority_queue<int,vector<int>,greater<int> >q;
void shengcheng(int n)
{
q.push(1);
for(int i=0;i<n;i++)
{
int x=q.top();
q.pop();
cout<<x;
str[i]=x+'0';
q.push(2*x+1);
q.push(4*x+5);
}
}
int main()
{
int t,n,len;
cin>>len>>n;
shengcheng(len);
while(n--)
{
for(int i=0;i<len-1;i++)
{
if(str[i]<str[i+1])
{
for(int j=i;j<len-1;j++)
{
str[j]=str[j+1];
}
break;
}
}
len--;
}
str[len] ='\0';
cout<<str<<endl;
return 0;
}