A natural number N is read, followed by N operations applied to a circular queue of capacity 1000, implemented with an array and two indices (front, rear). Each operation is on its own line and can be:
1 x-- add the valuexto the queue (if there is room; otherwise ignore);
2-- remove the element at the front of the queue (if the queue is empty, ignore).
After all operations have been applied, print the contents of the queue, from front to back, values separated by single spaces. If the queue is empty at the end, print the word VIDA.
Use a plain array and modulo 1000 arithmetic. Do not use STL containers.