记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:25:31: error: reference to 'count' is ambiguous
   25 |         for(int i=1;i<=n;i++) count+=cnt[i];
      |                               ^~~~~
In file included from /nix/store/dm8k43g793kzl9rc4s12hh2fdwxwsb67-gcc/include/c++/12.3.0/algorithm:61,
                 from foo.cc:2:
/nix/store/dm8k43g793kzl9rc4s12hh2fdwxwsb67-gcc/include/c++/12.3.0/bits/stl_algo.h:4026:5: note: candidates are: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4026 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
foo.cc:9:5: note:                 'int count'
    9 | int count;
      |     ^~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1492 Problem 1E. 最小化网络并发线程分配
语言
C++
递交时间
2023-10-07 21:52:12
评测时间
2023-10-07 21:52:12
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes