QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#68009 | #5015. 树 | goodman | Compile Error | / | / | C++ | 693b | 2022-12-13 23:37:13 | 2022-12-13 23:37:16 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
详细
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 solver(int, int, int)’: answer.code:5:12: error: request for member ‘push_back’ in ‘D.std::vector<int>::operator[](((std::vector<int>::size_type)dep[i]))’, which is of non-class type ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’} 5 | #define pb push_back | ^~~~~~~~~ answer.code:11:62: note: in expansion of macro ‘pb’ 11 | Q.clear(),Q.pb(i),dep[i]=ask(rt,Q),D[dep[i]].pb(i); | ^~ answer.code:12:23: error: ‘begin’ was not declared in this scope 12 | for(auto x:D[1])answer(rt,x); | ^ answer.code:12:23: note: suggested alternatives: In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95, from tree.h:1, from answer.code:1: /usr/include/c++/11/valarray:1224:5: note: ‘std::begin’ 1224 | begin(const valarray<_Tp>& __va) | ^~~~~ In file included from /usr/include/c++/11/filesystem:46, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129, from tree.h:1, from answer.code:1: /usr/include/c++/11/bits/fs_dir.h:549:3: note: ‘std::filesystem::__cxx11::begin’ 549 | begin(recursive_directory_iterator __iter) noexcept | ^~~~~ answer.code:12:23: error: ‘end’ was not declared in this scope 12 | for(auto x:D[1])answer(rt,x); | ^ answer.code:12:23: note: suggested alternatives: In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95, from tree.h:1, from answer.code:1: /usr/include/c++/11/valarray:1244:5: note: ‘std::end’ 1244 | end(const valarray<_Tp>& __va) | ^~~ In file included from /usr/include/c++/11/filesystem:46, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129, from tree.h:1, from answer.code:1: /usr/include/c++/11/bits/fs_dir.h:554:3: note: ‘std::filesystem::__cxx11::end’ 554 | end(recursive_directory_iterator) noexcept | ^~~ answer.code:13:38: error: request for member ‘size’ in ‘D.std::vector<int>::operator[](((std::vector<int>::size_type)d))’, which is of non-class type ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’} 13 | for(int d=2;d<=n;d++)if(D[d].size()){ | ^~~~ answer.code:14:28: error: request for member ‘size’ in ‘D.std::vector<int>::operator[](((std::vector<int>::size_type)(d - 1)))’, which is of non-class type ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’} 14 | top=D[d-1].size(); | ^~~~ answer.code:15:53: error: invalid types ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]’ for array subscript 15 | for(int i=1;i<=top;i++)stk[i]=D[d-1][i-1]; | ^ answer.code:16:31: error: ‘begin’ was not declared in this scope 16 | for(auto x:D[d]){ | ^ answer.code:16:31: note: suggested alternatives: In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95, from tree.h:1, from answer.code:1: /usr/include/c++/11/valarray:1224:5: note: ‘std::begin’ 1224 | begin(const valarray<_Tp>& __va) | ^~~~~ In file included from /usr/include/c++/11/filesystem:46, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129, from tree.h:1, from answer.code:1: /usr/include/c++/11/bits/fs_dir.h:549:3: note: ‘std::filesystem::__cxx11::begin’ 549 | begin(recursive_directory_iterator __iter) noexcept | ^~~~~ answer.code:16:31: error: ‘end’ was not declared in this scope 16 | for(auto x:D[d]){ | ^ answer.code:16:31: note: suggested alternatives: In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95, from tree.h:1, from answer.code:1: /usr/include/c++/11/valarray:1244:5: note: ‘std::end’ 1244 | end(const valarray<_Tp>& __va) | ^~~ In file included from /usr/include/c++/11/filesystem:46, fr...