#include<iostream>
#include<deque>
using namespace std;
int main()
{
int T;
cin >> T;
int m = T;
while (T--)
{
int n;
cin >> n;
deque<int> q;
q.push_back(n);
int i = n - 1;
while (i>0)
{
q.push_front(i);
int x = q.back();
q.pop_back();
q.push_front(x);
--i;
}
for (int j = 0; j<q.size()-1; ++j)
cout << q[j] << " ";
cout << q[q.size() - 1] << endl;
}
//system("pause");
return 0;
}
不知道哪里错了?????求大神指点