Compile Error

foo.cc: In function 'int main()':
foo.cc:10:6: error: invalid types 'double [100001][double]' for array subscript
  a[p1]+=s1;
      ^
foo.cc:5:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lf",&n);
  ~~~~~^~~~~~~~~~
foo.cc:7:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lf",&a[i]);
   ~~~~~^~~~~~~~~~~~~
foo.cc:9:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lf %lf %lf %lf",&m,&p1,&s1,&s2);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P2232 龙虎斗
语言
C++
递交时间
2021-10-24 10:07:15
评测时间
2021-10-24 10:07:15
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes