Compile Error

foo.cc: In function 'void dfs(int, int)':
foo.cc:11:12: error: 'total' was not declared in this scope
    if(sum==total/s) {
            ^~~~~
foo.cc:11:12: note: suggested alternative: 'strtol'
    if(sum==total/s) {
            ^~~~~
            strtol
foo.cc: In function 'int main()':
foo.cc:31:3: error: 'total' was not declared in this scope
   total+=a[i];
   ^~~~~
foo.cc:31:3: note: suggested alternative: 'strtol'
   total+=a[i];
   ^~~~~
   strtol
foo.cc:39:6: error: 'total' was not declared in this scope
   if(total%i!=0) {
      ^~~~~
foo.cc:39:6: note: suggested alternative: 'strtol'
   if(total%i!=0) {
      ^~~~~
      strtol
foo.cc:30:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&a[i]);
   ~~~~~^~~~~~~~~~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。

信息

递交者
类型
自测
题目
「一本通 1.3 例 3」小木棍
语言
C++
递交时间
2021-03-07 10:27:37
评测时间
2021-03-07 10:27:37
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes