QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#472260#4928. Game With NumbersMaMengQiCompile Error//C++98611b2024-07-11 15:19:392024-07-11 15:19:39

Details

answer.code: In function ‘long long int cmp(long long int, std::vector<long long int>)’:
answer.code:11:26: error: ‘i’ does not name a type
   11 |                 for(auto i:v) t+=i;
      |                          ^
answer.code:11:36: error: expected ‘;’ before ‘return’
   11 |                 for(auto i:v) t+=i;
      |                                    ^
      |                                    ;
   12 |                 return t;
      |                 ~~~~~~              
answer.code:12:17: error: expected primary-expression before ‘return’
   12 |                 return t;
      |                 ^~~~~~
answer.code:11:36: error: expected ‘;’ before ‘return’
   11 |                 for(auto i:v) t+=i;
      |                                    ^
      |                                    ;
   12 |                 return t;
      |                 ~~~~~~              
answer.code:12:17: error: expected primary-expression before ‘return’
   12 |                 return t;
      |                 ^~~~~~
answer.code:11:36: error: expected ‘)’ before ‘return’
   11 |                 for(auto i:v) t+=i;
      |                    ~               ^
      |                                    )
   12 |                 return t;
      |                 ~~~~~~              
answer.code:16:18: error: ‘i’ does not name a type
   16 |         for(auto i:v)
      |                  ^
answer.code:20:10: error: expected ‘;’ before ‘if’
   20 |         }
      |          ^
      |          ;
   21 |         if(k%2) return min(cmp(k+1,x),cmp(k+1,y));
      |         ~~
answer.code:21:9: error: expected primary-expression before ‘if’
   21 |         if(k%2) return min(cmp(k+1,x),cmp(k+1,y));
      |         ^~
answer.code:20:10: error: expected ‘;’ before ‘if’
   20 |         }
      |          ^
      |          ;
   21 |         if(k%2) return min(cmp(k+1,x),cmp(k+1,y));
      |         ~~
answer.code:21:9: error: expected primary-expression before ‘if’
   21 |         if(k%2) return min(cmp(k+1,x),cmp(k+1,y));
      |         ^~
answer.code:20:10: error: expected ‘)’ before ‘if’
   20 |         }
      |          ^
      |          )
   21 |         if(k%2) return min(cmp(k+1,x),cmp(k+1,y));
      |         ~~
answer.code:16:12: note: to match this ‘(’
   16 |         for(auto i:v)
      |            ^
answer.code:22:45: error: expected ‘;’ before ‘}’ token
   22 |         else return max(cmp(k+1,x),cmp(k,y))
      |                                             ^
      |                                             ;
   23 | }
      | ~                                            
answer.code: In function ‘int main()’:
answer.code:37:36: error: ‘b’ was not declared in this scope
   37 |         for(int i=1;i<=m;i++) cin>>b[i];
      |                                    ^
answer.code: In function ‘long long int cmp(long long int, std::vector<long long int>)’:
answer.code:23:1: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      | ^