foo.cc: In function 'int main()':
foo.cc:30:14: error: reference to 'count' is ambiguous
30 | memory=pos;count++;
| ^~~~~
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from foo.cc:1:
/usr/include/c++/9/bits/stl_algo.h:4113:5: note: candidates are: 'template<class _IIter, class _Tp> typename std::iterator_traits<_Iterator>::difference_type std::count(_IIter, _IIter, const _Tp&)'
4113 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
| ^~~~~
foo.cc:4:11: note: 'int count'
4 | int pos=0,count=0,memory;
| ^~~~~
foo.cc:33:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
33 | while(pos<pas.size())
| ~~~^~~~~~~~~~~
foo.cc:40:4: error: reference to 'count' is ambiguous
40 | count++;
| ^~~~~
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from foo.cc:1:
/usr/include/c++/9/bits/stl_algo.h:4113:5: note: candidates are: 'template<class _IIter, class _Tp> typename std::iterator_traits<_Iterator>::difference_type std::count(_IIter, _IIter, const _Tp&)'
4113 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
| ^~~~~
foo.cc:4:11: note: 'int count'
4 | int pos=0,count=0,memory;
| ^~~~~
foo.cc:44:8: error: reference to 'count' is ambiguous
44 | cout<<count<<" "<<memory<<endl;
| ^~~~~
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from foo.cc:1:
/usr/include/c++/9/bits/stl_algo.h:4113:5: note: candidates are: 'template<class _IIter, class _Tp> typename std::iterator_traits<_Iterator>::difference_type std::count(_IIter, _IIter, const _Tp&)'
4113 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
| ^~~~~
foo.cc:4:11: note: 'int count'
4 | int pos=0,count=0,memory;
| ^~~~~
正在同步测试数据,请稍后
Found 10 testcases.
[Hydro](https://hydro.ac)提供评测服务