以揭秘qq号为例,若是美女告诉你个qq号码你不会解密那就很尴尬了。
![]()
如过没有排错的话,最终结果应该是“6 1 5 9 4 7 2 8 3”。
| #include<iostream>using namespace std;
 struct queue {
 int data[101];
 int head;
 int tail;
 };
 
 | 
| int main() {queue q;
 int n;
 cin >> n;
 q.head = 1;
 q.tail = 1;
 for (int i = 1; i <= n; i++) {
 cin >> q.data[q.tail];
 q.tail++;
 }
 while (q.head < q.tail) {
 printf("%d ", q.data[q.head]);
 q.head++;
 q.data[q.tail] = q.data[q.head];
 q.tail++;
 q.head++;
 }
 system("pause");
 return 0;
 }
 
 | 
想到singularity等大佬已经那么强了,不写点东西心里难受。
![]()
一会儿要出去吃饭,嘻嘻嘻。
![]()