/ Vijos /

记录详情

Compile Error

/in/foo.c:55:1: error: unknown type name 'Node'
 Node query(int root,int l,int r,int fl,int fr)
 ^~~~
/in/foo.c:55:1: note: use 'struct' keyword to refer to the type
/in/foo.c: In function 'query':
/in/foo.c:59:14: error: incompatible types when returning type 'struct Node' but 'int' was expected
   return tree[root];
          ~~~~^~~~~~
/in/foo.c:66:2: error: unknown type name 'Node'
  Node res, res1, res2;
  ^~~~
/in/foo.c:66:2: note: use 'struct' keyword to refer to the type
/in/foo.c:69:5: error: request for member 'maxsum' in something not a structure or union
  res.maxsum = res1.maxsum + res2.maxsum;
     ^
/in/foo.c:69:19: error: request for member 'maxsum' in something not a structure or union
  res.maxsum = res1.maxsum + res2.maxsum;
                   ^
/in/foo.c:69:33: error: request for member 'maxsum' in something not a structure or union
  res.maxsum = res1.maxsum + res2.maxsum;
                                 ^
/in/foo.c:70:5: error: request for member 'maxleft' in something not a structure or union
  res.maxleft = max(res1.maxleft, res1.maxsum + res2.maxleft);
     ^
/in/foo.c:70:24: error: request for member 'maxleft' in something not a structure or union
  res.maxleft = max(res1.maxleft, res1.maxsum + res2.maxleft);
                        ^
/in/foo.c:70:38: error: request for member 'maxsum' in something not a structure or union
  res.maxleft = max(res1.maxleft, res1.maxsum + res2.maxleft);
                                      ^
/in/foo.c:70:52: error: request for member 'maxleft' in something not a structure or union
  res.maxleft = max(res1.maxleft, res1.maxsum + res2.maxleft);
                                                    ^
/in/foo.c:71:5: error: request for member 'maxright' in something not a structure or union
  res.maxright = max(res2.maxright, res2.maxsum + res1.maxright);
     ^
/in/foo.c:71:25: error: request for member 'maxright' in something not a structure or union
  res.maxright = max(res2.maxright, res2.maxsum + res1.maxright);
                         ^
/in/foo.c:71:40: error: request for member 'maxsum' in something not a structure or union
  res.maxright = max(res2.maxright, res2.maxsum + res1.maxright);
                                        ^
/in/foo.c:71:54: error: request for member 'maxright' in something not a structure or union
  res.maxright = max(res2.maxright, res2.maxsum + res1.maxright);
                                                      ^
/in/foo.c:72:5: error: request for member 'maxm' in something not a structure or union
  res.maxm = max(res1.maxright + res2.maxleft, max(res1.maxm, res2.maxm));
     ^
/in/foo.c:72:21: error: request for member 'maxright' in something not a structure or union
  res.maxm = max(res1.maxright + res2.maxleft, max(res1.maxm, res2.maxm));
                     ^
/in/foo.c:72:37: error: request for member 'maxleft' in something not a structure or union
  res.maxm = max(res1.maxright + res2.maxleft, max(res1.maxm, res2.maxm));
                                     ^
/in/foo.c:72:55: error: request for member 'maxm' in something not a structure or union
  res.maxm = max(res1.maxright + res2.maxleft, max(res1.maxm, res2.maxm));
                                                       ^
/in/foo.c:72:66: error: request for member 'maxm' in something not a structure or union
  res.maxm = max(res1.maxright + res2.maxleft, max(res1.maxm, res2.maxm));
                                                                  ^
/in/foo.c:66:18: warning: variable 'res2' set but not used [-Wunused-but-set-variable]
  Node res, res1, res2;
                  ^~~~
/in/foo.c:66:12: warning: variable 'res1' set but not used [-Wunused-but-set-variable]
  Node res, res1, res2;
            ^~~~
/in/foo.c: In function 'main':
/in/foo.c:89:39: error: request for member 'maxm' in something not a structure or union
    printf("%d\n", query(1, 1, m, x, y).maxm);
                                       ^

信息

递交者
类型
递交
题目
P1083 小白逛公园
语言
C
递交时间
2017-08-19 08:56:56
评测时间
2017-08-19 08:56:56
评测机
分数
0
总耗时
19ms
峰值内存
3.18 MiB