QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#390551#3736. Tree Intersectionucup-team1383Compile Error//C++981.9kb2024-04-15 16:54:192024-04-15 16:54:19

详细

answer.code: In function ‘void dfs(int, int)’:
answer.code:31:21: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   31 |         t[u].insert({a[u], 1});
      |                     ^
answer.code:31:20: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   31 |         t[u].insert({a[u], 1});
      |         ~~~~~~~~~~~^~~~~~~~~~~
answer.code:32:18: error: ‘j’ does not name a type
   32 |         for(auto j : p[u])
      |                  ^
answer.code:51:10: error: expected ‘;’ before ‘if’
   51 |         }
      |          ^
      |          ;
   52 |         if(mp[a[u]] == 1 && !f[a[u]]) now[u] ++ ;
      |         ~~
answer.code:52:9: error: expected primary-expression before ‘if’
   52 |         if(mp[a[u]] == 1 && !f[a[u]]) now[u] ++ ;
      |         ^~
answer.code:51:10: error: expected ‘;’ before ‘if’
   51 |         }
      |          ^
      |          ;
   52 |         if(mp[a[u]] == 1 && !f[a[u]]) now[u] ++ ;
      |         ~~
answer.code:52:9: error: expected primary-expression before ‘if’
   52 |         if(mp[a[u]] == 1 && !f[a[u]]) now[u] ++ ;
      |         ^~
answer.code:51:10: error: expected ‘)’ before ‘if’
   51 |         }
      |          ^
      |          )
   52 |         if(mp[a[u]] == 1 && !f[a[u]]) now[u] ++ ;
      |         ~~
answer.code:32:12: note: to match this ‘(’
   32 |         for(auto j : p[u])
      |            ^
answer.code:57:16: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   57 |         ans[id[{u, fa}]] = t[u].size() - now[u];
      |                ^
answer.code:57:23: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   57 |         ans[id[{u, fa}]] = t[u].size() - now[u];
      |                       ^
answer.code: In function ‘void solve()’:
answer.code:68:26: error: ‘it’ does not name a type; did you mean ‘int’?
   68 |                 for(auto it : mp)
      |                          ^~
      |                          int
answer.code:71:18: error: expected ‘;’ before ‘cnt’
   71 |                 }
      |                  ^
      |                  ;
   72 |                 cnt = s.size();
      |                 ~~~
answer.code:3:20: error: expected primary-expression before ‘for’
    3 | #define rep(x,a,b) for(int x=a;x<=b;x++)
      |                    ^~~
answer.code:73:17: note: in expansion of macro ‘rep’
   73 |                 rep(i, 1, n - 1)
      |                 ^~~
answer.code:72:32: error: expected ‘)’ before ‘for’
   72 |                 cnt = s.size();
      |                                ^
      |                                )
answer.code:68:20: note: to match this ‘(’
   68 |                 for(auto it : mp)
      |                    ^
answer.code:78:28: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   78 |                         id[{u[i], v[i]}] = i;
      |                            ^
answer.code:78:40: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   78 |                         id[{u[i], v[i]}] = i;
      |                                        ^
answer.code:79:28: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   79 |                         id[{v[i], u[i]}] = i;
      |                            ^
answer.code:79:40: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   79 |                         id[{v[i], u[i]}] = i;
      |                                        ^