/ AOCode /

记录详情

Compile Error

foo.cc:33:5: error: conflicting declaration 'll n'
   33 | int n,m,a[50005];
      |     ^
foo.cc:3:5: note: previous declaration as 'int n'
    3 | int n,m;
      |     ^
foo.cc:33:7: error: conflicting declaration 'll m'
   33 | int n,m,a[50005];
      |       ^
foo.cc:3:7: note: previous declaration as 'int m'
    3 | int n,m;
      |       ^
foo.cc:36:10: error: array bound is not an integer constant before ']' token
   36 | }tree[n*2];
      |          ^
foo.cc: In function 'void pushup(ll)':
foo.cc:38:5: error: 'tree' was not declared in this scope; did you mean 'free'?
   38 |     tree[x].sum=tree[lc(x)].sum+tree[rc(x)].sum;
      |     ^~~~
      |     free
foo.cc: In function 'void build(ll, ll, ll)':
foo.cc:43:6: error: declaration of 'll l' shadows a parameter
   43 |  int l=1,r=n,p=1;
      |      ^
foo.cc:43:10: error: declaration of 'll r' shadows a parameter
   43 |  int l=1,r=n,p=1;
      |          ^
foo.cc:43:14: error: declaration of 'll p' shadows a parameter
   43 |  int l=1,r=n,p=1;
      |              ^
foo.cc:44:5: error: 'tree' was not declared in this scope; did you mean 'free'?
   44 |     tree[p].l=l,tree[p].r=r;
      |     ^~~~
      |     free
foo.cc: In function 'void update(ll, ll)':
foo.cc:56:8: error: 'tree' was not declared in this scope; did you mean 'free'?
   56 |     if(tree[p].l==tree[p].r){
      |        ^~~~
      |        free
foo.cc:61:14: error: 'tree' was not declared in this scope; did you mean 'free'?
   61 |     int mid=(tree[p].l+tree[p].r)/2;
      |              ^~~~
      |              free
foo.cc:62:39: error: too many arguments to function 'void update(ll, ll)'
   62 |     if(pos<=mid) update(pos,nval,lc(p));
      |                                       ^
foo.cc:54:6: note: declared here
   54 | void update(int pos,int nval){
      |      ^~~~~~
foo.cc:63:31: error: too many arguments to function 'void update(ll, ll)'
   63 |     else update(pos,nval,rc(p));
      |                               ^
foo.cc:54:6: note: declared here
   54 | void update(int pos,int nval){
      |      ^~~~~~
foo.cc: In function 'll querysum(ll, ll)':
foo.cc:68:11: error: 'tree' was not declared in this scope; did you mean 'free'?
   68 |     if(l<=tree[p].l&&r>=tree[p].r) return tree[p].sum;
      |           ^~~~
      |           free
foo.cc:69:14: error: 'tree' was not declared in this scope; did you mean 'free'?
   69 |     int mid=(tree[p].l+tree[p].r)/2,ans=0
      |              ^~~~
      |              free
foo.cc:71:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   71 |     if(r>mid) ans+=querysum(l,r,rc(p));
      |               ^~~
      |               abs
foo.cc:71:38: error: too many arguments to function 'll querysum(ll, ll)'
   71 |     if(r>mid) ans+=querysum(l,r,rc(p));
      |                                      ^
foo.cc:66:5: note: declared here
   66 | int querysum(int l,int r){
      |     ^~~~~~~~
foo.cc:72:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   72 |     return ans;
      |            ^~~
      |            abs
foo.cc: In function 'll querymax(ll, ll)':
foo.cc:76:11: error: 'tree' was not declared in this scope; did you mean 'free'?
   76 |     if(l<=tree[p].l&&r>=tree[p].r) return tree[p].maxv;
      |           ^~~~
      |           free
foo.cc:77:14: error: 'tree' was not declared in this scope; did you mean 'free'?
   77 |     int mid=(tree[p].l+tree[p].r)/2,ans=-65536;
      |              ^~~~
      |              free
foo.cc:78:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   78 |     if(l<=mid) ans=max(ans,querymax(l,r,lc(p)));
      |                ^~~
      |                abs
foo.cc:78:46: error: too many arguments to function 'll querymax(ll, ll)'
   78 |     if(l<=mid) ans=max(ans,querymax(l,r,lc(p)));
      |                                              ^
foo.cc:74:5: note: declared here
   74 | int querymax(int l,int r){
      |     ^~~~~~~~
foo.cc:79:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   79 |     if(r>mid) ans=max(ans,querymax(l,r,rc(p)));
      |               ^~~
      |               abs
foo.cc:79:45: error: too many arguments to function 'll querymax(ll, ll)'
   79 |     if(r>mid) ans=max(ans,querymax(l,r,rc(p)));
      |                                             ^
foo.cc:74:5: note: declared here
   74 | int querymax(int l,int r){
      |     ^~~~~~~~
foo.cc:80:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   80 |     return ans;
      |            ^~~
      |            abs
foo.cc: In function 'll querymin(ll, ll)':
foo.cc:84:11: error: 'tree' was not declared in this scope; did you mean 'free'?
   84 |     if(l<=tree[p].l&&r>=tree[p].r) return tree[p].minv;
      |           ^~~~
      |           free
foo.cc:85:14: error: 'tree' was not declared in this scope; did you mean 'free'?
   85 |     int mid=(tree[p].l+tree[p].r)/2,ans=65535;
      |              ^~~~
      |              free
foo.cc:86:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   86 |     if(l<=mid) ans=min(ans,querymin(l,r,lc(p)));
      |                ^~~
      |                abs
foo.cc:86:46: error: too many arguments to function 'll querymin(ll, ll)'
   86 |     if(l<=mid) ans=min(ans,querymin(l,r,lc(p)));
      |                                              ^
foo.cc:82:5: note: declared here
   82 | int querymin(int l,int r){
      |     ^~~~~~~~
foo.cc:87:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   87 |     if(r>mid) ans=min(ans,querymin(l,r,rc(p)));
      |               ^~~
      |               abs
foo.cc:87:45: error: too many arguments to function 'll querymin(ll, ll)'
   87 |     if(r>mid) ans=min(ans,querymin(l,r,rc(p)));
      |                                             ^
foo.cc:82:5: note: declared here
   82 | int querymin(int l,int r){
      |     ^~~~~~~~
foo.cc:88:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   88 |     return ans;
      |            ^~~
      |            abs
foo.cc: At global scope:
foo.cc:32:13: error: '::main' must return 'int'
   32 | #define int ll
      |             ^~
foo.cc:90:1: note: in expansion of macro 'int'
   90 | int main(){
      | ^~~
foo.cc: In function 'int main()':
foo.cc:94:11: error: too few arguments to function 'void build(ll, ll, ll)'
   94 |     build();
      |           ^
foo.cc:42:6: note: declared here
   42 | void build(int l,int r,int p){
      |      ^~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1038 The FLF Tokens
语言
C++
递交时间
2022-05-05 21:58:45
评测时间
2022-05-05 21:58:45
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes