/ MYOJ /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:13:25: error: 'ans' was not declared in this scope
   for(int i=a;i<=b;i++) ans+=a[i];
                         ^~~
foo.cc:13:25: note: suggested alternative: 'abs'
   for(int i=a;i<=b;i++) ans+=a[i];
                         ^~~
                         abs
foo.cc:13:33: error: invalid types 'int[int]' for array subscript
   for(int i=a;i<=b;i++) ans+=a[i];
                                 ^
foo.cc:14:9: error: 'ans' was not declared in this scope
   cout<<ans<<endl;
         ^~~
foo.cc:14:9: note: suggested alternative: 'abs'
   cout<<ans<<endl;
         ^~~
         abs
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1001 乱七八糟(第一弹)
语言
C++
递交时间
2021-08-27 16:23:54
评测时间
2021-08-27 16:23:54
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes