-->
当前位置:首页 > 题库

PROGRAMMING:Basic operation of team

Luz5年前 (2021-05-10)题库583
Given an initially empty team (the length of team space is 10) and a series of team entry and exit operations, please write a program to output the elements in the team after these operations. The values of elements in the team are all integers.
###Input format:
Enter a positive integer n in the first line to indicate the number of operations;
The second behavior gives n integers, the non-0 element represents the team entry, and the non-0 value is the team entry element, and the 0 element represents the team exit.
###Output format:
The first line outputs all the outbound elements in the outbound order, separated by a space; If the team is empty, it will output "empty". If the team is full, it will output "full".
The second line outputs all the elements in the team, separated by a space.
There is a space at the end.
###Input example:
```in
twelve
3 1 2 0 0 -1 0 0 0 4 5 0
```
###Output example:
```out
3 1 2 -1 EMPTY 4
five
```







answer:If there is no answer, please comment