QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#100422#5828. 游戏alch07Compile Error//C++144.0kb2023-04-26 00:45:242023-04-26 00:45:26

詳細信息

answer.code:16:1: error: ‘vector’ does not name a type
   16 | vector <int> edgs [maxn];
      | ^~~~~~
answer.code: In function ‘void dfs(int, int)’:
answer.code:23:24: error: ‘edgs’ was not declared in this scope
   23 |     for(int i = 0; i < edgs[x].size(); i++){
      |                        ^~~~
answer.code:28:24: error: ‘edgs’ was not declared in this scope
   28 |     for(int i = 0; i < edgs[x].size(); i++){
      |                        ^~~~
answer.code: In function ‘void dfs2(int, int)’:
answer.code:43:24: error: ‘edgs’ was not declared in this scope
   43 |     for(int i = 0; i < edgs[x].size(); i++){
      |                        ^~~~
answer.code:56:5: error: ‘assert’ was not declared in this scope
   56 |     assert(mxv == dpath[x][0]);
      |     ^~~~~~
answer.code:2:1: note: ‘assert’ is defined in header ‘<cassert>’; did you forget to ‘#include <cassert>’?
    1 | #include <iostream>
  +++ |+#include <cassert>
    2 | 
answer.code:57:5: error: ‘secDeep’ was not declared in this scope; did you mean ‘sdeep’?
   57 |     secDeep = smv;
      |     ^~~~~~~
      |     sdeep
answer.code:58:24: error: ‘edgs’ was not declared in this scope
   58 |     for(int i = 0; i < edgs[x].size(); i++){
      |                        ^~~~
answer.code:75:24: error: ‘edgs’ was not declared in this scope
   75 |     for(int i = 0; i < edgs[x].size(); i++){
      |                        ^~~~
answer.code: In function ‘void getTop3()’:
answer.code:85:9: error: ‘vector’ was not declared in this scope
   85 |         vector <pair<int,int>> v;
      |         ^~~~~~
answer.code:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | 
answer.code:85:29: error: expected primary-expression before ‘>’ token
   85 |         vector <pair<int,int>> v;
      |                             ^~
answer.code:85:32: error: ‘v’ was not declared in this scope
   85 |         vector <pair<int,int>> v;
      |                                ^
answer.code:89:28: error: ‘edgs’ was not declared in this scope
   89 |         for(int j = 0; j < edgs[i].size(); j++){
      |                            ^~~~
answer.code:96:9: error: ‘sort’ was not declared in this scope; did you mean ‘short’?
   96 |         sort(v.begin(), v.end(), greater<pair<int,int>>());
      |         ^~~~
      |         short
answer.code: In function ‘int getNodeAway(int, int, int)’:
answer.code:108:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
  108 |         if(ch == par[nod]){
      |            ~~~^~~~~~~~~~~
answer.code:147:1: warning: control reaches end of non-void function [-Wreturn-type]
  147 | }
      | ^