Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const size = 100000;
- var stack:array[1..size] of longint;
- i,j,n,e,b,a:longint;
- procedure push(a:longint);
- begin
- inc(e); stack[e]:=a;
- end;
- procedure pop;
- begin
- dec(e);
- end;
- Begin
- read(n);
- for i:=1 to n do
- begin
- read(a); push(a);
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment