#include <bits/stdc++.h>
using namespace std;
int n;
int cmd;
int main(){
cin>>n;
vector<int>site[20];
for (int i = 0,j = 1; j < 101; ++j) {
site[i].push_back(j);
if(j % 5 == 0)
i++;
}
for (int i = 0; i < 20; ++i)
reverse(site[i].begin(),site[i].end());
while (n--){
cin>>cmd;
bool flag = true;
for (int i = 0; i < 20; ++i) {
if(site[i].size() >= cmd){
flag = false;
while (cmd--){
cout<<site[i].back()<<" ";
site[i].pop_back();
}
}
}
if(flag){
while (cmd--){
int i = 0;
while (site[i].size() == 0) i++;
cout<<site[i].back()<<" ";
site[i].pop_back();
}
}
cout<<endl;
}
return 0;
}
csp火车购票
最新推荐文章于 2023-02-21 23:50:01 发布