iliya785

queue

May 24th, 2012
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.27 KB | None | 0 0
  1. const count = 100000;
  2. var queue:array[1..count] of longint;
  3.     i,j,n,s,e,a:longint;
  4. procedure push(a:longint);
  5.  begin
  6.   inc(e); queue[e]:=a;
  7.  end;
  8. procedure pop;
  9.  begin
  10.   inc(s);
  11.  end;
  12. Begin
  13. read(n);
  14. for i:=1 to n do
  15.  begin
  16.   read(a); push(a);
  17.  end;
  18. end.
Advertisement
Add Comment
Please, Sign In to add comment