QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#478152#4929. Longest Unfriendly SubsequenceHuangHanShengCompile Error//C++141.0kb2024-07-14 17:53:172024-07-14 17:53:17

Details

answer.code: In function ‘void solve()’:
answer.code:28:13: error: redeclaration of ‘int j’
   28 |         int j;bool flag=true;
      |             ^
answer.code:18:17: note: ‘int j’ previously declared here
   18 |         for(int j=1;j<=5;j++){
      |                 ^
answer.code:42:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   42 | int main(){
      |         ^~
answer.code:42:9: note: remove parentheses to default-initialize a variable
   42 | int main(){
      |         ^~
      |         --
answer.code:42:9: note: or replace parentheses with braces to value-initialize a variable
answer.code:42:11: error: a function-definition is not allowed here before ‘{’ token
   42 | int main(){
      |           ^
answer.code:46:2: error: expected ‘}’ at end of input
   46 | }
      |  ^
answer.code:6:13: note: to match this ‘{’
    6 | void solve(){
      |             ^