Pagini recente » Cod sursa (job #44206) | Cod sursa (job #620472) | Cod sursa (job #2442154) | Cod sursa (job #764038) | Cod sursa (job #566126)
Cod sursa(job #566126)
var v:array [0..200000] of longint;
n, i, ii, x, y, j, min:longint;
f, g:text;
begin
assign (f, 'heapuri.in'); reset (f);
assign (g, 'heapuri.ok'); rewrite (g);
read (f, n);
i:=0;
for ii := 1 to n do
begin
read (f, x);
case x of
1:begin
readln (f, y);
i:=i+1;
v[i]:=y;
end;
2:begin
readln (f, y);
v[y]:=maxlongint;
end;
3:begin
min:=maxlongint;
for j := 1 to i do begin if v[j]<min then min:=v[j]; end;
writeln (g, min);
end;
end;
end;
close (f); close (g);
end.