跳到正文

个人记录

手打队列

Gu123456aaa约 1 分钟
原文
文章信息与版本

文章信息

发布
2025年4月9日
收录
2026年10月25日
更新
2026年11月22日
篇幅
约 1 分钟
获赞
1

版本

  1. v1当前
C++
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int q[30]={0,6,3,1,7,5,2,9,4,8},head=1,tail=10;
	while(head!=tail)
	{
		cout << q[head];
		head++;
		q[tail]=q[head];
		head++;tail++;
	}
	return 0;
}
原文