QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#413999#7986. 游戏MaMengQiCompile Error//C++98885b2024-05-18 13:49:422024-05-18 13:49:43

Details

answer.code: In function ‘void dfs(int)’:
answer.code:23:18: error: ‘i’ does not name a type
   23 |         for(auto i:G[cur]){
      |                  ^
answer.code:28:10: error: expected ‘;’ before ‘d’
   28 |         }
      |          ^
      |          ;
   29 |         d[cur]-=1;
      |         ~ 
answer.code:30:9: error: expected primary-expression before ‘if’
   30 |         if(d[cur]>0 || cnt==0) d[cur]=1;
      |         ^~
answer.code:29:19: error: expected ‘)’ before ‘if’
   29 |         d[cur]-=1;
      |                   ^
      |                   )
   30 |         if(d[cur]>0 || cnt==0) d[cur]=1;
      |         ~~         
answer.code:23:12: note: to match this ‘(’
   23 |         for(auto i:G[cur]){
      |            ^