#include <cstdlib>
#include <iostream>
#include <queue>
using namespace std;
int main()
{
int testCase;
cin>>testCase;
while (testCase--){
int num;
cin >> num;
queue<int> q;
for (int i = 1; i <= num; i++)
q.push(i);
while( q.size() > 1)
{
cout << q.front() <<" ";
q.pop();
q.push(q.front());
q.pop();
}
cout << q.front() << " " << endl;
}
return 0;
}
sicily 1931. 卡片游戏
最新推荐文章于 2019-06-26 23:26:57 发布