QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#322731#5015. 树locseyCompile Error//C++201.5kb2024-02-07 16:23:172024-02-07 16:23:17

详细

implementer.cpp: In function ‘void regduj260135279::init()’:
implementer.cpp:32:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   32 |                 scanf("%d",&n);
      |                 ~~~~~^~~~~~~~~
implementer.cpp:45:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   45 |                         scanf("%d%d",&u,&v);
      |                         ~~~~~^~~~~~~~~~~~~~
answer.code: In function ‘void solve(std::vector<int>, std::vector<int>)’:
answer.code:28:40: error: ‘ask’ was not declared in this scope
   28 |         for(int &x : b) Y.emplace_back(ask(x, A), x);
      |                                        ^~~
answer.code: In function ‘void solver(int, int, int)’:
answer.code:45:46: error: ‘ask’ was not declared in this scope
   45 |         for(int i = 2; i <= n; ++i) dep[i] = ask(i, {1}), G[dep[i]].push_back(i);
      |                                              ^~~
answer.code:47:37: error: ‘answer’ was not declared in this scope
   47 |         for(int i = 2; i <= n; ++i) answer(prt[i], i);
      |                                     ^~~~~~