/ Vijos /

记录详情

Compile Error

/in/foo.cc:7:24: error: two or more data types in declaration of 'dp'
 long long dp[MAXN][MAXN];
                        ^
/in/foo.cc:8:11: error: two or more data types in declaration of 'ans'
 long long ans;
           ^~~
/in/foo.cc:9:11: error: two or more data types in declaration of 'n'
 long long n,r,g,b,t;
           ^
/in/foo.cc:9:13: error: two or more data types in declaration of 'r'
 long long n,r,g,b,t;
             ^
/in/foo.cc:9:15: error: two or more data types in declaration of 'g'
 long long n,r,g,b,t;
               ^
/in/foo.cc:9:17: error: two or more data types in declaration of 'b'
 long long n,r,g,b,t;
                 ^
/in/foo.cc:9:19: error: two or more data types in declaration of 't'
 long long n,r,g,b,t;
                   ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:16:39: error: 'n' was not declared in this scope
     scanf("%lld %lld %lld %lld %lld",&n,&r,&g,&b,&t);
                                       ^
/in/foo.cc:16:42: error: 'r' was not declared in this scope
     scanf("%lld %lld %lld %lld %lld",&n,&r,&g,&b,&t);
                                          ^
/in/foo.cc:16:45: error: 'g' was not declared in this scope
     scanf("%lld %lld %lld %lld %lld",&n,&r,&g,&b,&t);
                                             ^
/in/foo.cc:16:48: error: 'b' was not declared in this scope
     scanf("%lld %lld %lld %lld %lld",&n,&r,&g,&b,&t);
                                                ^
/in/foo.cc:16:51: error: 't' was not declared in this scope
     scanf("%lld %lld %lld %lld %lld",&n,&r,&g,&b,&t);
                                                   ^
/in/foo.cc:21:17: error: 'dp' was not declared in this scope
                 dp[i][j]=mymax(dp[i][j],dp[i-1][j]+g*j*(t+b*(i-1))); 
                 ^~
/in/foo.cc:21:67: error: 'max' was not declared in this scope
                 dp[i][j]=mymax(dp[i][j],dp[i-1][j]+g*j*(t+b*(i-1))); 
                                                                   ^
/in/foo.cc:23:17: error: 'dp' was not declared in this scope
                 dp[i][j]=mymax(dp[i][j],dp[i][j-1]+g*(j-1)*(t+b*i));
                 ^~
/in/foo.cc:23:67: error: 'max' was not declared in this scope
                 dp[i][j]=mymax(dp[i][j],dp[i][j-1]+g*(j-1)*(t+b*i));
                                                                   ^
/in/foo.cc:24:13: error: 'ans' was not declared in this scope
             ans=mymax(ans,dp[i][j]+(n-i-j)*(g*j+r)*(t+i*b));
             ^~~
/in/foo.cc:24:27: error: 'dp' was not declared in this scope
             ans=mymax(ans,dp[i][j]+(n-i-j)*(g*j+r)*(t+i*b));
                           ^~
/in/foo.cc:24:59: error: 'max' was not declared in this scope
             ans=mymax(ans,dp[i][j]+(n-i-j)*(g*j+r)*(t+i*b));
                                                           ^
/in/foo.cc:26:21: error: 'ans' was not declared in this scope
     printf("%lld\n",ans);
                     ^~~

信息

递交者
类型
递交
题目
P1417 魔法塔防
语言
C++
递交时间
2020-06-05 22:01:00
评测时间
2020-06-05 22:01:00
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes