QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#100428#5828. 游戏alch07Compile Error//C++144.3kb2023-04-26 02:57:092023-04-26 02:57:11

Details

answer.code:17:1: error: ‘vector’ does not name a type
   17 | vector <int> edgs [maxn];
      | ^~~~~~
answer.code: In function ‘void dfs(int, int)’:
answer.code:24:24: error: ‘edgs’ was not declared in this scope
   24 |     for(int i = 0; i < edgs[x].size(); i++){
      |                        ^~~~
answer.code:29:24: error: ‘edgs’ was not declared in this scope
   29 |     for(int i = 0; i < edgs[x].size(); i++){
      |                        ^~~~
answer.code: In function ‘void dfs2(int, int)’:
answer.code:44:24: error: ‘edgs’ was not declared in this scope
   44 |     for(int i = 0; i < edgs[x].size(); i++){
      |                        ^~~~
answer.code:57:5: error: ‘assert’ was not declared in this scope
   57 |     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:58:5: error: ‘secDeep’ was not declared in this scope; did you mean ‘sdeep’?
   58 |     secDeep = smv;
      |     ^~~~~~~
      |     sdeep
answer.code:59:24: error: ‘edgs’ was not declared in this scope
   59 |     for(int i = 0; i < edgs[x].size(); i++){
      |                        ^~~~
answer.code:76:24: error: ‘edgs’ was not declared in this scope
   76 |     for(int i = 0; i < edgs[x].size(); i++){
      |                        ^~~~
answer.code: In function ‘void getTop3()’:
answer.code:86:9: error: ‘vector’ was not declared in this scope
   86 |         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:86:29: error: expected primary-expression before ‘>’ token
   86 |         vector <pair<int,int>> v;
      |                             ^~
answer.code:86:32: error: ‘v’ was not declared in this scope
   86 |         vector <pair<int,int>> v;
      |                                ^
answer.code:90:28: error: ‘edgs’ was not declared in this scope
   90 |         for(int j = 0; j < edgs[i].size(); j++){
      |                            ^~~~
answer.code:97:9: error: ‘sort’ was not declared in this scope; did you mean ‘short’?
   97 |         sort(v.begin(), v.end(), greater<pair<int,int>>());
      |         ^~~~
      |         short
answer.code: In function ‘int getNodeAway(int, int, int)’:
answer.code:109:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
  109 |         if(ch == par[nod]){
      |            ~~~^~~~~~~~~~~
answer.code: In function ‘void solveQuery(int, int, int, int, int)’:
answer.code:154:5: error: ‘vector’ was not declared in this scope
  154 |     vector <pair<int,int>> edgs = {{(a+b-c)/2, 0}, {(a+c-b)/2, 1}, {(c+b-a)/2, 2}};
      |     ^~~~~~
answer.code:154:5: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
answer.code:154:25: error: expected primary-expression before ‘>’ token
  154 |     vector <pair<int,int>> edgs = {{(a+b-c)/2, 0}, {(a+c-b)/2, 1}, {(c+b-a)/2, 2}};
      |                         ^~
answer.code:154:28: error: ‘edgs’ was not declared in this scope
  154 |     vector <pair<int,int>> edgs = {{(a+b-c)/2, 0}, {(a+c-b)/2, 1}, {(c+b-a)/2, 2}};
      |                            ^~~~
answer.code:155:58: error: expected primary-expression before ‘)’ token
  155 |     sort(edgs.begin(), edgs.end(), greater<pair<int,int>>);
      |                                                          ^
answer.code:155:5: error: ‘sort’ was not declared in this scope; did you mean ‘short’?
  155 |     sort(edgs.begin(), edgs.end(), greater<pair<int,int>>);
      |     ^~~~
      |     short
answer.code: In function ‘int getNodeAway(int, int, int)’:
answer.code:148:1: warning: control reaches end of non-void function [-Wreturn-type]
  148 | }
      | ^