QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#722971#9570. Binary Treeucup-team5467Compile Error//C++202.5kb2024-11-07 20:45:462024-11-07 20:45:46

Details

answer.code:31:1: error: ‘vector’ does not name a type
   31 | vector<int> e[N];
      | ^~~~~~
answer.code: In function ‘void dfs(int, int)’:
answer.code:47:22: error: ‘e’ was not declared in this scope; did you mean ‘std::numbers::e’?
   47 |         for(auto i : e[u]){
      |                      ^
      |                      std::numbers::e
In file included from /usr/include/c++/13/bits/max_size_type.h:37,
                 from /usr/include/c++/13/bits/ranges_base.h:39,
                 from /usr/include/c++/13/string_view:48,
                 from /usr/include/c++/13/bits/basic_string.h:47,
                 from /usr/include/c++/13/string:54,
                 from /usr/include/c++/13/bits/locale_classes.h:40,
                 from /usr/include/c++/13/bits/ios_base.h:41,
                 from /usr/include/c++/13/ios:44,
                 from /usr/include/c++/13/ostream:40,
                 from /usr/include/c++/13/iostream:41,
                 from answer.code:1:
/usr/include/c++/13/numbers:122:27: note: ‘std::numbers::e’ declared here
  122 |   inline constexpr double e = e_v<double>;
      |                           ^
answer.code: In function ‘int dfs1(int, int)’:
answer.code:63:22: error: ‘e’ was not declared in this scope; did you mean ‘std::numbers::e’?
   63 |         for(auto i : e[u]){
      |                      ^
      |                      std::numbers::e
/usr/include/c++/13/numbers:122:27: note: ‘std::numbers::e’ declared here
  122 |   inline constexpr double e = e_v<double>;
      |                           ^
answer.code: In function ‘void solve()’:
answer.code:86:17: error: ‘e’ was not declared in this scope; did you mean ‘std::numbers::e’?
   86 |                 e[i].clear();st[i] = 0;
      |                 ^
      |                 std::numbers::e
/usr/include/c++/13/numbers:122:27: note: ‘std::numbers::e’ declared here
  122 |   inline constexpr double e = e_v<double>;
      |                           ^
answer.code:91:26: error: ‘e’ was not declared in this scope; did you mean ‘std::numbers::e’?
   91 |                 if(x!=0) e[x].push_back(i),e[i].push_back(x);
      |                          ^
      |                          std::numbers::e
/usr/include/c++/13/numbers:122:27: note: ‘std::numbers::e’ declared here
  122 |   inline constexpr double e = e_v<double>;
      |                           ^
answer.code:92:26: error: ‘e’ was not declared in this scope; did you mean ‘std::numbers::e’?
   92 |                 if(y!=0) e[y].push_back(i),e[i].push_back(y);
      |                          ^
      |                          std::numbers::e
/usr/include/c++/13/numbers:122:27: note: ‘std::numbers::e’ declared here
  122 |   inline constexpr double e = e_v<double>;
      |                           ^
answer.code:104:17: error: ‘vector’ was not declared in this scope
  104 |                 vector<pair<int,int>> v;
      |                 ^~~~~~
answer.code:4:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
    3 | #include <cstring>
  +++ |+#include <vector>
    4 | using namespace std;
answer.code:104:36: error: expected primary-expression before ‘>’ token
  104 |                 vector<pair<int,int>> v;
      |                                    ^~
answer.code:104:39: error: ‘v’ was not declared in this scope
  104 |                 vector<pair<int,int>> v;
      |                                       ^
answer.code:105:30: error: ‘e’ was not declared in this scope; did you mean ‘std::numbers::e’?
  105 |                 for(auto i : e[ans]){
      |                              ^
      |                              std::numbers::e
/usr/include/c++/13/numbers:122:27: note: ‘std::numbers::e’ declared here
  122 |   inline constexpr double e = e_v<double>;
      |                           ^
answer.code: In function ‘int check(int, int)’:
answer.code:41:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   41 |         scanf("%d",&s);
      |         ~~~~~^~~~~~~~~
answer.code: In function ‘int main()’:
answer.code:154:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  154 |         scanf("%d",&t);
      |         ~~~~~^~~~~~~~~