/ Vijos /

记录详情

Compile Error

foo.cc:5:9: error: 'maxn' was not declared in this scope
    5 | LLI sma[maxn],big[maxn],pri[maxn];
      |         ^~~~
foo.cc:5:19: error: 'maxn' was not declared in this scope
    5 | LLI sma[maxn],big[maxn],pri[maxn];
      |                   ^~~~
foo.cc:5:29: error: 'maxn' was not declared in this scope
    5 | LLI sma[maxn],big[maxn],pri[maxn];
      |                             ^~~~
foo.cc:6:8: error: 'maxn' was not declared in this scope
    6 | LLI dp[maxn][maxn];
      |        ^~~~
foo.cc:6:14: error: 'maxn' was not declared in this scope
    6 | LLI dp[maxn][maxn];
      |              ^~~~
foo.cc: In function 'int main()':
foo.cc:11:12: error: 'dp' was not declared in this scope
   11 |     memset(dp,-1,sizeof(dp));
      |            ^~
foo.cc:13:31: error: 'sma' was not declared in this scope; did you mean 'fma'?
   13 |         scanf("%lld%lld%lld",&sma[i],&big[i],&pri[i]);
      |                               ^~~
      |                               fma
foo.cc:13:39: error: 'big' was not declared in this scope
   13 |         scanf("%lld%lld%lld",&sma[i],&big[i],&pri[i]);
      |                                       ^~~
foo.cc:13:47: error: 'pri' was not declared in this scope
   13 |         scanf("%lld%lld%lld",&sma[i],&big[i],&pri[i]);
      |                                               ^~~
foo.cc:20:33: error: 'sma' was not declared in this scope; did you mean 'fma'?
   20 |                 LLI x = min(j + sma[i],s);
      |                                 ^~~
      |                                 fma
foo.cc:21:33: error: 'big' was not declared in this scope
   21 |                 LLI y = min(k + big[i],b);
      |                                 ^~~
foo.cc:22:59: error: 'pri' was not declared in this scope
   22 |                 if(dp[x][y] == -1)  dp[x][y] = dp[j][k] + pri[i];
      |                                                           ^~~
foo.cc:23:72: error: 'pri' was not declared in this scope
   23 |                 else                dp[x][y] = min(dp[x][y],dp[j][k] + pri[i]);
      |                                                                        ^~~
foo.cc:10:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   10 |     scanf("%lld%lld%lld",&n,&s,&b);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1428 贪婪格尔曼
语言
C++
递交时间
2021-12-23 23:41:54
评测时间
2021-12-23 23:41:54
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes