| Problem ID | 1110 |
|---|---|
| Title | Data Structure - Queue |
| Description | Queue is a basic data structure. Read tutorial for more details. Your task is to implement a queue. |
| Input | The first line contains an integer N (1 ≤ N ≤ 30000), the number of operations.
The follow N lines contains one of the below operation: Push x - push x into the queue, x is an signed 32-bit integer Pop - perform queue's pop. If the queue is empty, skip this operation |
| Output | Print the element in the queue after all operations. If the queue is empty, print an empty line.
|
| Sample Input | 5 Push 3 Push 4 Pop Push 2 Push 7 |
| Sample Output | 4 2 7 |
| Hint | |
| Last Modified | 2012-06-06 17:28:59 |
| Time Limit | 1 seconds |
| Memory Limit | 32 MB |
| Accepted Solutions | 0 |
| Submitted Solutions | 0 |
| Difficulty Factor | 110 |
Facebook