记录详情

Compile Error

foo.cc: In lambda function:
foo.cc:10:29: warning: suggest parentheses around ‘-’ inside ‘>>’ [-Wparentheses]
   10 |                 int mid=l+(r-l>>1);
      |                            ~^~
foo.cc: At global scope:
foo.cc:25:9: warning: lambda capture initializers only available with ‘-std=c++14’ or ‘-std=gnu++14’ [-Wc++14-extensions]
   25 |         BUILD = [](auto &&self,int &k,int l,int r) -> void {
      |         ^~~~~
foo.cc:25:20: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’
   25 |         BUILD = [](auto &&self,int &k,int l,int r) -> void {
      |                    ^~~~
foo.cc: In lambda function:
foo.cc:31:29: warning: suggest parentheses around ‘-’ inside ‘>>’ [-Wparentheses]
   31 |                 int mid=l+(r-l>>1);
      |                            ~^~
foo.cc:32:21: error: expression cannot be used as a function
   32 |                 self(self,lc[k],l,mid),self(self,rc[k],mid+1,r);
      |                 ~~~~^~~~~~~~~~~~~~~~~~
foo.cc:32:44: error: expression cannot be used as a function
   32 |                 self(self,lc[k],l,mid),self(self,rc[k],mid+1,r);
      |                                        ~~~~^~~~~~~~~~~~~~~~~~~~
foo.cc: In lambda function:
foo.cc:35:37: error: no match for call to ‘(const<lambda(int&&, int&, int, int)>) (const<lambda(int&&, int&, int, int)>&, int&, int&, int&)’
   35 | ](int &k,int l,int r) -> void {BUILD(BUILD,k,l,r);};
      |                                ~~~~~^~~~~~~~~~~~~
foo.cc:35:37: note: candidate: ‘void (*)(int&&, int&, int, int)’ (conversion)
foo.cc:35:37: note:   conversion of argument 2 would be ill-formed:
foo.cc:35:38: error: invalid user-defined conversion from ‘const<lambda(int&&, int&, int, int)>’ to ‘int&&’ [-fpermissive]
   35 | ](int &k,int l,int r) -> void {BUILD(BUILD,k,l,r);};
      |                                      ^~~~~
foo.cc:25:17: note: candidate is: ‘<lambda(int&&, int&, int, int)>::operator void (*)(int&&, int&, int, int)() const’ (near match)
   25 |         BUILD = [](auto &&self,int &k,int l,int r) -> void {
      |                 ^
foo.cc:25:17: note:   no known conversion from ‘void (*)(int&&, int&, int, int)’ to ‘int’
foo.cc:35:38: error: invalid conversion from ‘void (*)(int&&, int&, int, int)’ to ‘int’ [-fpermissive]
   35 | ](int &k,int l,int r) -> void {BUILD(BUILD,k,l,r);};
      |                                      ^~~~~
      |                                      |
      |                                      void (*)(int&&, int&, int, int)
foo.cc:25:17: note: candidate: ‘<lambda(int&&, int&, int, int)>’ (near match)
   25 |         BUILD = [](auto &&self,int &k,int l,int r) -> void {
      |                 ^
foo.cc:25:17: note:   conversion of argument 1 would be ill-formed:
foo.cc:35:38: error: invalid user-defined conversion from ‘const<lambda(int&&, int&, int, int)>’ to ‘int&&’ [-fpermissive]
   35 | ](int &k,int l,int r) -> void {BUILD(BUILD,k,l,r);};
      |                                      ^~~~~
foo.cc:25:17: note: candidate is: ‘<lambda(int&&, int&, int, int)>::operator void (*)(int&&, int&, int, int)() const’ (near match)
   25 |         BUILD = [](auto &&self,int &k,int l,int r) -> void {
      |                 ^
foo.cc:25:17: note:   no known conversion from ‘void (*)(int&&, int&, int, int)’ to ‘int’
foo.cc:35:38: error: invalid conversion from ‘void (*)(int&&, int&, int, int)’ to ‘int’ [-fpermissive]
   35 | ](int &k,int l,int r) -> void {BUILD(BUILD,k,l,r);};
      |                                      ^~~~~
      |                                      |
      |                                      void (*)(int&&, int&, int, int)
foo.cc: At global scope:
foo.cc:37:9: warning: lambda capture initializers only available with ‘-std=c++14’ or ‘-std=gnu++14’ [-Wc++14-extensions]
   37 |         CHANGE = [](auto &&self,int pre,int &k,int l,int r,int x,int y,ll v) -> void {
      |         ^~~~~~
foo.cc:37:21: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’
   37 |         CHANGE = [](auto &&self,int pre,int &k,int l,int r,int x,int y,ll v) -> void {
      |                     ^~~~
foo.cc: In lambda function:
foo.cc:42:29: warning: suggest parentheses around ‘-’ inside ‘>>’ [-Wparentheses]
   42 |                 int mid=l+(r-l>>1);
      |                            ~^~
foo.cc:43:32: error: expression cannot be used as a function
   43 |                 if(y<=mid) self(self,lc[pre],lc[k],l,mid,x,y,v);
      |                            ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:44:36: error: expression cannot be used as a function
   44 |                 else if(x>mid) self(self,rc[pre],rc[k],mid+1,r,x,y,v);
      |                                ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:45:26: error: expression cannot be used as a function
   45 |                 else self(self,lc[pre],lc[k],l,mid,x,y,v),self(self,rc[pre],rc[k],mid+1,r,x,y,v);
      |                      ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:45:63: error: expression cannot be used as a function
   45 |                 else self(self,lc[pre],lc[k],l,mid,x,y,v),self(self,rc[pre],rc[k],mid+1,r,x,y,v);
      |                                                           ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc: In lambda function:
foo.cc:48:63: error: no match for call to ‘(const<lambda(int&&, int, int&, int, int, int, int, ll)>) (const<lambda(int&&, int, int&, int, int, int, int, ll)>&, int&, int&, int&, int&, int&, int&, ll&)’
   48 | ](int pre,int &k,int l,int r,int x,int y,ll v) -> void {CHANGE(CHANGE,pre,k,l,r,x,y,v);};
      |                                                         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:48:63: note: candidate: ‘void (*)(int&&, int, int&, int, int, int, int, ll)’ {aka ‘void (*)(int&&, int, int&, int, int, int, int, long long int)’} (conversion)
foo.cc:48:63: note:   conversion of argument 2 would be ill-formed:
foo.cc:48:64: error: invalid user-defined conversion from ‘const<lambda(int&&, int, int&, int, int, int, int, ll)>’ to ‘int&&’ [-fpermissive]
   48 | ](int pre,int &k,int l,int r,int x,int y,ll v) -> void {CHANGE(CHANGE,pre,k,l,r,x,y,v);};
      |                                                                ^~~~~~
foo.cc:37:18: note: candidate is: ‘<lambda(int&&, int, int&, int, int, int, int, ll)>::operator void (*)(int&&, int, int&, int, int, int, int, ll)() const’ (near match)
   37 |         CHANGE = [](auto &&self,int pre,int &k,int l,int r,int x,int y,ll v) -> void {
      |                  ^
foo.cc:37:18: note:   no known conversion from ‘void (*)(int&&, int, int&, int, int, int, int, ll)’ {aka ‘void (*)(int&&, int, int&, int, int, int, int, long long int)’} to ‘int’
foo.cc:48:64: error: invalid conversion from ‘void (*)(int&&, int, int&, int, int, int, int, ll)’ {aka ‘void (*)(int&&, int, int&, int, int, int, int, long long int)’} to ‘int’ [-fpermissive]
   48 | ](int pre,int &k,int l,int r,int x,int y,ll v) -> void {CHANGE(CHANGE,pre,k,l,r,x,y,v);};
      |                                                                ^~~~~~
      |                                                                |
      |                                                                void (*)(int&&, int, int&, int, int, int, int, ll) {aka void (*)(int&&, int, int&, int, int, int, int, long long int)}
foo.cc:37:18: note: candidate: ‘<lambda(int&&, int, int&, int, int, int, int, ll)>’ (near match)
   37 |         CHANGE = [](auto &&self,int pre,int &k,int l,int r,int x,int y,ll v) -> void {
      |                  ^
foo.cc:37:18: note:   conversion of argument 1 would be ill-formed:
foo.cc:48:64: error: invalid user-defined conversion from ‘const<lambda(int&&, int, int&, int, int, int, int, ll)>’ to ‘int&&’ [-fpermissive]
   48 | ](int pre,int &k,int l,int r,int x,int y,ll v) -> void {CHANGE(CHANGE,pre,k,l,r,x,y,v);};
      |                                                                ^~~~~~
foo.cc:37:18: note: candidate is: ‘<lambda(int&&, int, int&, int, int, int, int, ll)>::operator void (*)(int&&, int, int&, int, int, int, int, ll)() const’ (near match)
   37 |         CHANGE = [](auto &&self,int pre,int &k,int l,int r,int x,int y,ll v) -> void {
      |                  ^
foo.cc:37:18: note:   no known conversion from ‘void (*)(int&&, int, int&, int, int, int, int, ll)’ {aka ‘void (*)(int&&, int, int&, int, int, int, int, long long int)’} to ‘int’
foo.cc:48:64: error: invalid conversion from ‘void (*)(int&&, int, int&, int, int, int, int, ll)’ {aka ‘void (*)(int&&, int, int&, int, int, int, int, long long int)’} to ‘int’ [-fpermissive]
   48 | ](int pre,int &k,int l,int r,int x,int y,ll v) -> void {CHANGE(CHANGE,pre,k,l,r,x,y,v);};
      |                                                                ^~~~~~
      |                                                                |
      |                                                                void (*)(int&&, int, int&, int, int, int, int, ll) {aka void (*)(int&&, int, int&, int, int, int, int, long long int)}
foo.cc: At global scope:
foo.cc:50:9: warning: lambda capture initializers only available with ‘-std=c++14’ or ‘-std=gnu++14’ [-Wc++14-extensions]
   50 |         QUERY = [](auto &&self,int k,int l,int r,int x,int y) -> ll {
      |         ^~~~~
foo.cc:50:20: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’
   50 |         QUERY = [](auto &&self,int k,int l,int r,int x,int y) -> ll {
      |                    ^~~~
foo.cc: In lambda function:
foo.cc:53:29: warning: suggest parentheses around ‘-’ inside ‘>>’ [-Wparentheses]
   53 |                 int mid=l+(r-l>>1);
      |                            ~^~
foo.cc:54:39: error: expression cannot be used as a function
   54 |                 if(y<=mid) return self(self,lc[k],l,mid,x,y);
      |                                   ~~~~^~~~~~~~~~~~~~~~~~~~~~
foo.cc:55:43: error: expression cannot be used as a function
   55 |                 else if(x>mid) return self(self,rc[k],mid+1,r,x,y);
      |                                       ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:56:33: error: expression cannot be used as a function
   56 |                 else return self(self,lc[k],l,mid,x,y)+self(self,rc[k],mid+1,r,x,y);
      |                             ~~~~^~~~~~~~~~~~~~~~~~~~~~
foo.cc:56:60: error: expression cannot be used as a function
   56 |                 else return self(self,lc[k],l,mid,x,y)+self(self,rc[k],mid+1,r,x,y);
      |                                                        ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foo.cc: In lambda function:
foo.cc:58:53: error: no match for call to ‘(const<lambda(int&&, int, int, int, int, int)>) (const<lambda(int&&, int, int, int, int, int)>&, int&, int&, int&, int&, int&)’
   58 | ](int k,int l,int r,int x,int y) -> ll {return QUERY(QUERY,k,l,r,x,y);};
      |                                                ~~~~~^~~~~~~~~~~~~~~~~
foo.cc:58:53: note: candidate: ‘ll (*)(int&&, int, int, int, int, int)’ {aka ‘long long int (*)(int&&, int, int, int, int, int)’} (conversion)
foo.cc:58:53: note:   conversion of argument 2 would be ill-formed:
foo.cc:58:54: error: invalid user-defined conversion from ‘const<lambda(int&&, int, int, int, int, int)>’ to ‘int&&’ [-fpermissive]
   58 | ](int k,int l,int r,int x,int y) -> ll {return QUERY(QUERY,k,l,r,x,y);};
      |                                                      ^~~~~
foo.cc:50:17: note: candidate is: ‘<lambda(int&&, int, int, int, int, int)>::operator ll (*)(int&&, int, int, int, int, int)() const’ (near match)
   50 |         QUERY = [](auto &&self,int k,int l,int r,int x,int y) -> ll {
      |                 ^
foo.cc:50:17: note:   no known conversion from ‘ll (*)(int&&, int, int, int, int, int)’ {aka ‘long long int (*)(int&&, int, int, int, int, int)’} to ‘int’
foo.cc:58:54: error: invalid conversion from ‘ll (*)(int&&, int, int, int, int, int)’ {aka ‘long long int (*)(int&&, int, int, int, int, int)’} to ‘int’ [-fpermissive]
   58 | ](int k,int l,int r,int x,int y) -> ll {return QUERY(QUERY,k,l,r,x,y);};
      |                                                      ^~~~~
      |                                                      |
      |                                                      ll (*)(int&&, int, int, int, int, int) {aka long long int (*)(int&&, int, int, int, int, int)}
foo.cc:50:17: note: candidate: ‘<lambda(int&&, int, int, int, int, int)>’ (near match)
   50 |         QUERY = [](auto &&self,int k,int l,int r,int x,int y) -> ll {
      |                 ^
foo.cc:50:17: note:   conversion of argument 1 would be ill-formed:
foo.cc:58:54: error: invalid user-defined conversion from ‘const<lambda(int&&, int, int, int, int, int)>’ to ‘int&&’ [-fpermissive]
   58 | ](int k,int l,int r,int x,int y) -> ll {return QUERY(QUERY,k,l,r,x,y);};
      |                                                      ^~~~~
foo.cc:50:17: note: candidate is: ‘<lambda(int&&, int, int, int, int, int)>::operator ll (*)(int&&, int, int, int, int, int)() const’ (near match)
   50 |         QUERY = [](auto &&self,int k,int l,int r,int x,int y) -> ll {
      |                 ^
foo.cc:50:17: note:   no known conversion from ‘ll (*)(int&&, int, int, int, int, int)’ {aka ‘long long int (*)(int&&, int, int, int, int, int)’} to ‘int’
foo.cc:58:54: error: invalid conversion from ‘ll (*)(int&&, int, int, int, int, int)’ {aka ‘long long int (*)(int&&, int, int, int, int, int)’} to ‘int’ [-fpermissive]
   58 | ](int k,int l,int r,int x,int y) -> ll {return QUERY(QUERY,k,l,r,x,y);};
      |                                                      ^~~~~
      |                                                      |
      |                                                      ll (*)(int&&, int, int, int, int, int) {aka long long int (*)(int&&, int, int, int, int, int)}
正在同步测试数据,请稍后

信息

递交者
类型
递交
题目
To the moon(題面原來就是英文,不是我改的)
语言
C++
递交时间
2024-04-10 19:10:27
评测时间
2024-04-10 19:10:27
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes