/ GCOJ /

记录详情

Compile Error

foo.cc: In function 'bool is_same(int, int)':
foo.cc:12:30: error: reference to 'is_same' is ambiguous
     return ew[a] == ew[b] && is_same(gov[a][0], gov[b][1]) && is_same(gov[a][1], gov[b][0]);
                              ^~~~~~~
foo.cc:5:6: note: candidates are: bool is_same(int, int)
 bool is_same(int a, int b){
      ^~~~~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
                 from /usr/include/c++/7/bits/nested_exception.h:40,
                 from /usr/include/c++/7/exception:143,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/type_traits:994:12: note:                 template<class, class> struct std::is_same
     struct is_same;
            ^~~~~~~
foo.cc:12:63: error: reference to 'is_same' is ambiguous
     return ew[a] == ew[b] && is_same(gov[a][0], gov[b][1]) && is_same(gov[a][1], gov[b][0]);
                                                               ^~~~~~~
foo.cc:5:6: note: candidates are: bool is_same(int, int)
 bool is_same(int a, int b){
      ^~~~~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
                 from /usr/include/c++/7/bits/nested_exception.h:40,
                 from /usr/include/c++/7/exception:143,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/type_traits:994:12: note:                 template<class, class> struct std::is_same
     struct is_same;
            ^~~~~~~
foo.cc: In function 'void dfs(int)':
foo.cc:23:20: error: reference to 'is_same' is ambiguous
     ans = max(ans, is_same(gov[n][0], gov[n][1]) * sz[n]);
                    ^~~~~~~
foo.cc:5:6: note: candidates are: bool is_same(int, int)
 bool is_same(int a, int b){
      ^~~~~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
                 from /usr/include/c++/7/bits/nested_exception.h:40,
                 from /usr/include/c++/7/exception:143,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/type_traits:994:12: note:                 template<class, class> struct std::is_same
     struct is_same;
            ^~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1023 [NOIP2018 普及组] 对称二叉树
语言
C++
递交时间
2021-10-09 22:11:48
评测时间
2021-10-09 22:11:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes