Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
3675 | 孙浚轩 | 晚餐 | C++ | Accepted | 0 MS | 256 KB | 429 | 2024-06-22 17:23:36 |
#include<iostream> using namespace std; int main(){ string tableware[4]={"bowl","knife","fork","chopsticks"},s[10]; int n; while(scanf("%d",&n)!=EOF){ for(int i=0;i<n;i++) cin>>s[i]; for(int i=0;i<n;i++){ for(int j=0;j<4;j++) if(s[i]==tableware[j]){ cout<<s[i]<<" "; break; } } cout<<endl; } return 0; }