2025-07-27 18:53:45
发布于:河北

全部评论 3

num>=m2025-07-27 来自 河北
0#include <bits/stdc++.h> using namespace std; stack <string> stk; int n,m; string us; string post; int main() { cin >> n >> m; int num=0; while (n--) { cin >> us; if (us=="C") { cin >> post; stk.push(post); if (num>=stk.size())continue; num++; } else if (us=="Q"&&stk.empty()) { cout << "Everyone, come and deliver it." << endl; } else if (us=="Q"&&stk.size()>0) { cout << stk.top() << endl; stk.pop(); num--; } } return 0; }2025-07-27 来自 河北
0
2025-07-27 来自 河北
0













有帮助,赞一个