站外题求助,0分RE
  • 板块灌水区
  • 楼主Lastheart
  • 当前回复6
  • 已保存回复6
  • 发布时间2024/12/12 19:33
  • 上次更新2024/12/12 22:42:07
查看原帖
站外题求助,0分RE
979476
Lastheart楼主2024/12/12 19:33

只有最后一个点RE

#include<bits/stdc++.h>
using namespace std;
queue<int> q;
int t,n;
int main() 
{
    cin>>n;
    for(int i=1;i<=n;i++) q.push(i);
    while(!q.empty())
    {
        cout<<q.front()<<" ";
        q.pop();
        t=q.front();
        q.pop();
        q.push(t);
    }
    return 0;
}
2024/12/12 19:33
加载中...