package fafa;
class queue{
public static final int SIZE=1000;
public int[] x;
public int[] y;
public int x_fornt;
public int x_rear;
public int y_fornt;
public int y_rear;
public queue(){
x=new int[SIZE];
y=new int[SIZE];
x_fornt=x_rear=0;
y_fornt=y_rear=0;
}
public void push(int m,int n){
x[x_rear++]=m;
y[y_rear++]=n;
}
public int pop_x( ){
return x[x_fornt++];
}
public int pop_y( ){
return y[y_fornt++];
}
public boolean isEmpty( ){
boolean res=false;
if(x_fornt==x_rear){
res=true;
}
return res;
}
}
public class ds {
public static void main(String[] args){
queue myqueue=new queue();
myqueue.push(1, 1);
myqueue.push(3, 3);
myqueue.push(4, 4);
myqueue.push(5, 5);
myqueue.push(2, 2);
myqueue.push(0, 0);
while(!myqueue.isEmpty()){
System.out.println("("+myqueue.pop_x()+","+myqueue.pop_y()+")");
}
}
}