测试

我的第一个标签

曾经的是这样的

###也许是这样的
asdafasfasfasdfa新政策是徐水电费水电费水电费阿斯蒂芬达到

我的第二个标签

现在是这样的

也许是这样的

#include
#define INF 0x3f3f3f3f
#define DOF 0x7f7f7f7f
#define endl '\n'
#define mem(a,b) memset(a,b,sizeof(a))
#define debug(case,x); cout<" : "<
#define IO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
typedef long long ll;
using namespace std;
const int maxn = 2e5 + 10;
int a[maxn];
struct node{
ll len,l,r;
bool operator<(const node& a)const {
if(a.len==len) return a.l
else return a.len>len;
}
};
priority_queueqt;
void solve()
{
// priority_queueqt;
ll n;cin>>n;
qt.push({n,1,n});
for(int i=1;i<=n;++i){
node tmp=qt.top();qt.pop();
ll mid=(tmp.l+tmp.r)/2;
a[mid]=i;
ll len=tmp.len,l=tmp.l,r=tmp.r;
if(len&1){
qt.push({len/2,l,mid-1});
qt.push({len/2,mid+1,r});
}else{
qt.push({len/2-1,l,mid-1});
qt.push({len/2,mid+1,r});
}
}
for(int i=1;i<=n;++i){
cout<" ";

}
cout<<endl;

}

int main()
{
// freopen("ii.txt","r",stdin);
// freopen("oo.txt","w",stdout);
int t;cin>>t;
while(t--){
solve();
}
}