- 东海兵器店
东海兵器店(题解)
- @ 2025-12-21 10:12:08
#include <bits/stdc++.h>
using namespace std;
queue<string> q;
int main(){
char a;
string b;
while(cin>>a)
{
if(a=='A')
{
if(!q.empty())
{
cout<<"-"<<q.front()<<endl;
q.pop();
}
else{
cout<<"-None"<<endl;
}
}
if(a=='B')
{
cin>>b;
q.push(b);
}
}
return 0;
}
0 条评论
目前还没有评论...
信息
- ID
- 657
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 4
- 标签
- 递交数
- 256
- 已通过
- 76
- 上传者