Run ID:165124
提交时间:2026-11-10 20:40:46
#include <bits\stdc++.h> using namespace std; int main() { int N; while (cin >> N) { bool first = true; for (int i = 0; i < N; i++) { string s; cin >> s; if (s == "bowl" || s == "knife" || s == "fork" || s == "chopsticks") { if (!first) cout << " "; cout << s; first = false; } } cout << endl; } return 0; }