HDU1702:ACboy needs your help again! (二)

2014-11-24 03:23:26 · 作者: · 浏览: 1
if(S.empty())
printf("None\n");
else
{
printf("%d\n",S.top());
S.pop();
}
}
}
}

int main()
{
int n;
while(~scanf("%d",&n))
{
while(n--)
{
int m;
char str[100];
scanf("%d%s",&m,str);
if(!strcmp(str,"FIFO"))
que_ex(m);
else if(!strcmp(str,"FILO"))
sta_ex(m);
else
printf("error\n");
}
}

return 0;
}