QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#756212 | #9570. Binary Tree | ucup-team4412 | Compile Error | / | / | C++14 | 2.0kb | 2024-11-16 19:22:18 | 2024-11-16 19:22:18 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘void solve()’: answer.code:10:16: error: missing template arguments before ‘p’ 10 | vector p(n+1,vector<int>()); | ^ answer.code:13:22: error: ‘p’ was not declared in this scope 13 | if(x)p[i].push_back(x),p[x].push_back(i); | ^ answer.code:14:22: error: ‘p’ was not declared in this scope 14 | if(y)p[i].push_back(y),p[y].push_back(i); | ^ answer.code: In lambda function: answer.code:23:35: error: ‘p’ was not declared in this scope 23 | for(int y:p[x]){ | ^ answer.code: In lambda function: answer.code:53:35: error: ‘p’ was not declared in this scope 53 | for(int y:p[x]){ | ^ answer.code: In function ‘void solve()’: answer.code:61:28: error: ‘p’ was not declared in this scope 61 | for(auto y:p[rt2])if(!vis[y]){ | ^ answer.code:62:38: error: no matching function for call to ‘std::vector<std::array<int, 2> >::push_back(<brace-enclosed initializer list>)’ 62 | tmp.push_back({sz[y],y}); | ~~~~~~~~~~~~~^~~~~~~~~~~ In file included from /usr/include/c++/13/vector:66, from /usr/include/c++/13/queue:63, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:157, from answer.code:1: /usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::array<int, 2>; _Alloc = std::allocator<std::array<int, 2> >; value_type = std::array<int, 2>]’ 1278 | push_back(const value_type& __x) | ^~~~~~~~~ /usr/include/c++/13/bits/stl_vector.h:1278:35: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::vector<std::array<int, 2> >::value_type&’ {aka ‘const std::array<int, 2>&’} 1278 | push_back(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/13/bits/stl_vector.h:1295:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::array<int, 2>; _Alloc = std::allocator<std::array<int, 2> >; value_type = std::array<int, 2>]’ 1295 | push_back(value_type&& __x) | ^~~~~~~~~ /usr/include/c++/13/bits/stl_vector.h:1295:30: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::vector<std::array<int, 2> >::value_type&&’ {aka ‘std::array<int, 2>&&’} 1295 | push_back(value_type&& __x) | ~~~~~~~~~~~~~^~~ answer.code: In lambda function: answer.code:68:35: error: ‘p’ was not declared in this scope 68 | for(int y:p[x]){ | ^