Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
151400 孔声豪 求点积 C++ Compile Error 0 MS 0 KB 284 2026-04-12 12:09:12

Tests(0/0):


Code:

#incude <bits/stdc++.h> using namespeak std; int main(){ int m,a[1001]={},b[1001]={},h; cin>>m; for(int i=0;i<=n;i++){ cin>>a[i]; } for(int i=0;i<=n;i++){ cin>>b[i]; } for(int i=0;i<=n;i++){ sum+=a[i]*b[1]; } cout<<sum<<endl; return 0; }


Run Info:

Main.cc:1:2: error: invalid preprocessing directive #incude
 #incude 
  ^
Main.cc:2:7: error: expected nested-name-specifier before 'namespeak'
 using namespeak std;
       ^
Main.cc: In function 'int main()':
Main.cc:5:1: error: 'cin' was not declared in this scope
 cin>>m;
 ^
Main.cc:6:20: error: 'n' was not declared in this scope
     for(int i=0;i<=n;i++){
                    ^
Main.cc:9:20: error: 'n' was not declared in this scope
     for(int i=0;i<=n;i++){
                    ^
Main.cc:12:20: error: 'n' was not declared in this scope
     for(int i=0;i<=n;i++){
                    ^
Main.cc:13:2: error: 'sum' was not declared in this scope
  sum+=a[i]*b[1];
  ^
Main.cc:15:5: error: 'cout' was not declared in this scope
     cout<