| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 159002 | 格林老师 | 晚餐 | C++ | Compile Error | 0 MS | 0 KB | 410 | 2026-08-24 21:31:12 |
#include<bits/stdc++.h> using namespace std; int main(){ while (1){ int N; cin>>N; string a[N],arr[4]={bowl,knife,fork,chopsticks}; for (int i=0;i<N;i++){ cin>>a[i]; for (int j=0;j<4;j++){ if (arr[j]==a[i]){ cout<<arr[j]<<<" "; } } } cout<<endl; } return 0; }
Main.cc: In function 'int main()':
Main.cc:7:29: error: 'bowl' was not declared in this scope
string a[N],arr[4]={bowl,knife,fork,chopsticks};
^
Main.cc:7:34: error: 'knife' was not declared in this scope
string a[N],arr[4]={bowl,knife,fork,chopsticks};
^
Main.cc:7:40: error: 'fork' was not declared in this scope
string a[N],arr[4]={bowl,knife,fork,chopsticks};
^
Main.cc:7:45: error: 'chopsticks' was not declared in this scope
string a[N],arr[4]={bowl,knife,fork,chopsticks};
^
Main.cc:12:32: error: expected primary-expression before '<' token
cout<