Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
118119 小徐老师 晚餐 C++ Accepted 2 MS 272 KB 479 2025-04-23 21:39:22

Tests(1/1):


Code:

#include <iostream> #include <string> using namespace std; int main() { string s1 = "bowl"; string s2 = "knife"; string s3 = "fork"; string s4 = "chopsticks"; int n; while(cin >> n) { string s; for(int i = 0; i < n; ++i) { cin >> s; if(s == s1 || s == s2 || s == s3 || s == s4) cout << s << ' '; } cout << endl; } return 0; }