Pagini recente » Cod sursa (job #1802792) | Cod sursa (job #2226704) | Cod sursa (job #317522) | Cod sursa (job #2911428) | Cod sursa (job #1614136)
#include <iostream>
#include <fstream>
using namespace std;
int main()
{ ifstream f("date.in");
ofstream g("date.out");
int a,b,c,n,i,o,x,j,k,V[100000];
a=1;
f>>n;
for(i=1;i<=n;i++)
{
f>>x;
c=1000000;
j=1;
if(x==1)
{
f>>V[a];
a=a+1;
}
if(x==2)
{
f>>b;
V[b]=0;
}
if(x==3)
{
for(j=1;j<=a;j++)
{
if(c>V[j] && V[j]>0)
{
c=V[j];
}
}
g<<c<<endl;
}
}
return 0;
}