Problem
Input format
The first line contains the number `N`. The next `N` lines each contain one operation in the formats described above. - `0 <= N <= 1000`; - values `x` are natural numbers, `0 <= x <= 1_000_000`; - operations are given in the order they should be applied.
Output format
The program prints to standard output either the queue elements separated by spaces, or the word `VIDA`, followed by a newline.
Example
6 1 5 1 8 1 3 2 1 9 1 2
8 3 9 2
Stuck?
Use the Get Hint button in the action bar to reveal a guided hint.
💬 Discussion
Loading...No comments yet. Be the first to start the discussion!
Sample cases (from the problem)
Sample Case 1
6 1 5 1 8 1 3 2 1 9 1 2
8 3 9 2
Solve it your way first
Community solutions unlock after you submit a passing solution. Don't peek.
Ready to solve this challenge?
Create a free account to write code, submit solutions, and track your progress.