Run ID:150988

提交时间:2026-04-02 16:02:16

#include <iostream> #include <string> #include <unordered_set> using namespace std; int main() { unordered_set<string> ware{"bowl","knife","fork","chopsticks"}; int N; while(cin >> N) { string s; for(int i = 0; i < N; ++i) { cin >> s; if(ware.count(s)) cout << s << " "; } cout << endl; } return 0; }