/ Vijos /

记录详情

Compile Error

foo.cc: In function 'int set(int)':
foo.cc:8:8: error: reference to 'set' is ambiguous
    8 | return set(i/2)+set(i-2);
      |        ^~~
In file included from /nix/store/jgdz5wfqc6q6qhy17lsqnfpbkfi1fcar-gcc-12.2.0/include/c++/12.2.0/set:61,
                 from stdc++.h:87:
/nix/store/jgdz5wfqc6q6qhy17lsqnfpbkfi1fcar-gcc-12.2.0/include/c++/12.2.0/bits/stl_set.h:94:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   94 |     class set
      |           ^~~
foo.cc:4:5: note:                 'int set(int)'
    4 | int set(int i)
      |     ^~~
foo.cc:8:17: error: reference to 'set' is ambiguous
    8 | return set(i/2)+set(i-2);
      |                 ^~~
/nix/store/jgdz5wfqc6q6qhy17lsqnfpbkfi1fcar-gcc-12.2.0/include/c++/12.2.0/bits/stl_set.h:94:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   94 |     class set
      |           ^~~
foo.cc:4:5: note:                 'int set(int)'
    4 | int set(int i)
      |     ^~~
foo.cc: In function 'int main()':
foo.cc:19:7: error: reference to 'set' is ambiguous
   19 | cout<<set(n)<<endl;
      |       ^~~
/nix/store/jgdz5wfqc6q6qhy17lsqnfpbkfi1fcar-gcc-12.2.0/include/c++/12.2.0/bits/stl_set.h:94:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   94 |     class set
      |           ^~~
foo.cc:4:5: note:                 'int set(int)'
    4 | int set(int i)
      |     ^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1130 数的计数
语言
C++
递交时间
2023-12-09 19:11:27
评测时间
2023-12-09 19:11:27
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes