| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 80420 | 石晋骁 | 18成绩修改 | C++ | Compile Error | 0 MS | 0 KB | 282 | 2024-07-11 14:24:52 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,x,f; int a[n]; cin >> n; for(int i = 1;i < n;i++){ cin >> a[i]; } cin >> x; cin >> f; for(int j = 1;j < n;j++){ if(j == x){ cout << f; }else{ cout >> x[j]; } } return 0; }
Main.cc: In function 'int main()':
Main.cc:16:15: error: invalid types 'int[int]' for array subscript
cout >> x[j];
^