2 条题解

  • -4
    @ 2022-10-6 10:16:41

    #include<bits/stdc++.h> using namespace std; string s[1000000],a,b; int t=1,h=1,n; int main(){ while(1){ cin>>a; if(a=="PUSH"){ cin>>b; s[t]=b; t++; } else if(a=="POP"){ if(th)cout<<"EMPTY"<<endl; else{ cout<<s[h]<<endl;; h++; } } else if(a"END"){ break; } } return 0; }

    信息

    ID
    486
    时间
    1000ms
    内存
    128MiB
    难度
    5
    标签
    递交数
    140
    已通过
    49
    上传者