/ Vijos /

记录详情

Compile Error

foo.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
 include<cstdio> include<cstring> include<iostream> include<algorithm>
        ^
foo.c:6:11: error: variably modified 'H' at file scope
 int N, C, H[maxn];
           ^
foo.c:7:4: error: variably modified 'dp' at file scope
 ll dp[maxn][maxn][maxn];
    ^
foo.c:7:4: error: variably modified 'dp' at file scope
foo.c:7:4: error: variably modified 'dp' at file scope
foo.c:8:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
 template<class T>
         ^
foo.c:14:1: error: unknown type name 'bool'
 bool operator < (const Node &o) const {
 ^
foo.c:14:15: error: expected ':', ',', ';', '}' or '__attribute__' before '<' token
 bool operator < (const Node &o) const {
               ^
foo.c:17:3: error: variably modified 'o' at file scope
 } o[maxn];
   ^
foo.c: In function 'Dp':
foo.c:20:4: error: expected identifier or '(' before '&' token
 ll &t = dp[l][r][v];
    ^
foo.c:21:5: error: 't' undeclared (first use in this function)
 if(~t) return t;
     ^
foo.c:21:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:27:1: warning: implicit declaration of function 'Min' [-Wimplicit-function-declaration]
 Min(t, Dp(l, i - 1, v) + Dp(i + 1, r, v) + C + d);
 ^
foo.c: In function 'main':
foo.c:34:1: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
 scanf("%d%d", &N, &C);
 ^
foo.c:34:1: warning: incompatible implicit declaration of built-in function 'scanf' [enabled by default]
foo.c:39:1: warning: implicit declaration of function 'sort' [-Wimplicit-function-declaration]
 sort(o + 1, o + N + 1);
 ^
foo.c:46:1: warning: implicit declaration of function 'unique' [-Wimplicit-function-declaration]
 int hn = unique(H, H + N) - H;
 ^
foo.c:46:27: error: invalid operands to binary - (have 'int' and 'int *')
 int hn = unique(H, H + N) - H;
                           ^
foo.c:48:5: warning: implicit declaration of function 'lower_bound' [-Wimplicit-function-declaration]
     o[i].v = lower_bound(H, H + hn, o[i].v) - H;
     ^
foo.c:48:45: error: invalid operands to binary - (have 'int' and 'int *')
     o[i].v = lower_bound(H, H + hn, o[i].v) - H;
                                             ^
foo.c:49:1: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
 memset(dp, -1, sizeof dp);
 ^
foo.c:49:1: warning: incompatible implicit declaration of built-in function 'memset' [enabled by default]
foo.c:53:1: error: 'cout' undeclared (first use in this function)
 cout << ans << "\n";
 ^
foo.c: In function 'Dp':
foo.c:32:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
P1821 二叉查找树
语言
C
递交时间
2016-11-15 22:34:42
评测时间
2016-11-15 22:34:43
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes