Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
121400 zhangyuecai 舞林大会 C++ 编译错误 0 0 MS 0 KB 399 2024-01-21 17:25:31

Tests(0/0):


#include<bits/stdc++.h> using namespace std; queue <int> a; int main(){ int n[50],temp=0; for(int i=0;i<n;i++){ cin >> n[i]; } for(int i=1;i<=n;i++){ for(int j=1;j<=n[i];i++){ a.push(i); } } for(int i=0;i<n;i++){ while(a.size() >= 2){ cout << a.front() << " "; a.pop(); a.push(a.front()); a.pop(); } cout << a.front()<<endl; } return 0; }


测评信息: