/ Vijos /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:7:21: error: 'n' was not declared in this scope
  while(~scanf("%d",&n))
                     ^
foo.cc:9:15: error: 'm' was not declared in this scope
   scanf("%d",&m);
               ^
foo.cc:10:7: error: 'dp' was not declared in this scope
   mem(dp,127);mem(maxx,0);sum[0]=0;
       ^~
foo.cc:10:3: error: 'mem' was not declared in this scope
   mem(dp,127);mem(maxx,0);sum[0]=0;
   ^~~
foo.cc:10:19: error: 'maxx' was not declared in this scope
   mem(dp,127);mem(maxx,0);sum[0]=0;
                   ^~~~
foo.cc:10:19: note: suggested alternative: 'main'
   mem(dp,127);mem(maxx,0);sum[0]=0;
                   ^~~~
                   main
foo.cc:10:27: error: 'sum' was not declared in this scope
   mem(dp,127);mem(maxx,0);sum[0]=0;
                           ^~~
foo.cc:10:27: note: suggested alternative: 'enum'
   mem(dp,127);mem(maxx,0);sum[0]=0;
                           ^~~
                           enum
foo.cc:13:16: error: 'a' was not declared in this scope
    scanf("%d",&a[i]);
                ^
foo.cc:24:44: error: 'a' was not declared in this scope
     maxx[i][j]=maxx[j][i]=max(maxx[i][j-1],a[j]);
                                            ^
foo.cc:24:27: error: 'max' was not declared in this scope
     maxx[i][j]=maxx[j][i]=max(maxx[i][j-1],a[j]);
                           ^~~
foo.cc:24:27: note: suggested alternative: 'main'
     maxx[i][j]=maxx[j][i]=max(maxx[i][j-1],a[j]);
                           ^~~
                           main
foo.cc:30:14: error: 'min' was not declared in this scope
     dp[i][j]=min(dp[i+1][j]+maxx[i][j],dp[j-1][i]+((i-m-1)+(n-j-m))*maxx[i][j]);
              ^~~
foo.cc:30:14: note: suggested alternative: 'main'
     dp[i][j]=min(dp[i+1][j]+maxx[i][j],dp[j-1][i]+((i-m-1)+(n-j-m))*maxx[i][j]);
              ^~~
              main
foo.cc:35:14: error: 'min' was not declared in this scope
     dp[i][j]=min(dp[i-1][j]+maxx[i][j],dp[j+1][i]+((j-m-1)+(n-i-m))*maxx[i][j]);
              ^~~
foo.cc:35:14: note: suggested alternative: 'main'
     dp[i][j]=min(dp[i-1][j]+maxx[i][j],dp[j+1][i]+((j-m-1)+(n-i-m))*maxx[i][j]);
              ^~~
              main
foo.cc:38:5: error: 'max' was not declared in this scope
   x=max(dp[m+2][n-m],dp[n-m][m+2])+sum[n];
     ^~~
foo.cc:38:5: note: suggested alternative: 'main'
   x=max(dp[m+2][n-m],dp[n-m][m+2])+sum[n];
     ^~~
     main
foo.cc:5:10: warning: unused variable 'k' [-Wunused-variable]
  int i,j,k,l;
          ^
foo.cc:6:8: warning: unused variable 'y' [-Wunused-variable]
  int x,y,z;
        ^
foo.cc:6:10: warning: unused variable 'z' [-Wunused-variable]
  int x,y,z;
          ^
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。

信息

递交者
类型
自测
题目
P1451 圆环取数
语言
C++
递交时间
2021-03-20 16:31:21
评测时间
2021-03-20 16:31:21
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes