| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 155635 | zxy | 求点积 | C++ | Compile Error | 0 MS | 0 KB | 279 | 2026-06-08 17:25:14 |
#include <iostream> using namespace std; int main(){ int n; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; } for(int i=0;i<n;i++){ cin>>b[i]; } long long sum=0; for(int i=0;i<n;i++){ sum=sum+a[i]*b[i]; } cout<<sum;
Main.cc: In function 'int main()':
Main.cc:7:11: error: 'a' was not declared in this scope
cin>>a[i];
^
Main.cc:11:11: error: 'b' was not declared in this scope
cin>>b[i];
^
Main.cc:15:15: error: 'a' was not declared in this scope
sum=sum+a[i]*b[i];
^
Main.cc:15:20: error: 'b' was not declared in this scope
sum=sum+a[i]*b[i];
^
Main.cc:17:14: error: expected '}' at end of input
cout<