记录详情

Compile Error

foo.cc: In function 'int trap(int*, int)':
foo.cc:7:17: error: 'heightSize' was not declared in this scope
     int right = heightSize - 1;  
                 ^~~~~~~~~~
foo.cc:11:36: error: 'height' was not declared in this scope
         while ((left <= right) && (height[left] < high)) 
                                    ^~~~~~
foo.cc:11:36: note: suggested alternative: 'high'
         while ((left <= right) && (height[left] < high)) 
                                    ^~~~~~
                                    high
foo.cc:16:36: error: 'height' was not declared in this scope
         while ((left <= right) && (height[right] < high))
                                    ^~~~~~
foo.cc:16:36: note: suggested alternative: 'high'
         while ((left <= right) && (height[right] < high))
                                    ^~~~~~
                                    high
foo.cc:21:5: error: 'volume' was not declared in this scope
     volume += right - left + 1; 
     ^~~~~~
foo.cc: In function 'int main()':
foo.cc:28:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&T);
  ~~~~~^~~~~~~~~
foo.cc:31:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&N);
   ~~~~~^~~~~~~~~
foo.cc:33:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&a[j]);
   ~~~~~^~~~~~~~~~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。

信息

递交者
类型
递交
题目
P1001 贮存雨水
语言
C++
递交时间
2021-04-25 23:33:59
评测时间
2021-04-25 23:33:59
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes