prog.cpp: In function ‘int main()’:
prog.cpp:35:9: error: reference to ‘count’ is ambiguous
count[a]++;
^~~~~
prog.cpp:17:5: note: candidates are: int count [1005]
int count[maxn] = {0};
^~~~~
In file included from /usr/include/c++/6/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
from prog.cpp:1:
/usr/include/c++/6/bits/stl_algo.h:3961:5: note: template<class _IIter, class _Tp> typename std::iterator_traits<_Iterator>::difference_type std::count(_IIter, _IIter, const _Tp&)
count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
^~~~~
prog.cpp:39:12: error: ‘cnt’ was not declared in this scope
if(cnt[i] > i){
^~~
prog.cpp:50:9: error: reference to ‘count’ is ambiguous
if(count[i]>0){
^~~~~
prog.cpp:17:5: note: candidates are: int count [1005]
int count[maxn] = {0};
^~~~~
In file included from /usr/include/c++/6/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
from prog.cpp:1:
/usr/include/c++/6/bits/stl_algo.h:3961:5: note: template<class _IIter, class _Tp> typename std::iterator_traits<_Iterator>::difference_type std::count(_IIter, _IIter, const _Tp&)
count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
^~~~~
prog.cpp:55:7: error: reference to ‘count’ is ambiguous
count[i]--;
^~~~~
prog.cpp:17:5: note: candidates are: int count [1005]
int count[maxn] = {0};
^~~~~
In file included from /usr/include/c++/6/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
from prog.cpp:1:
/usr/include/c++/6/bits/stl_algo.h:3961:5: note: template<class _IIter, class _Tp> typename std::iterator_traits<_Iterator>::difference_type std::count(_IIter, _IIter, const _Tp&)
count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
^~~~~
prog.cpp:59:12: error: reference to ‘count’ is ambiguous
while(count[i]>0){
^~~~~
prog.cpp:17:5: note: candidates are: int count [1005]
int count[maxn] = {0};
^~~~~
In file included from /usr/include/c++/6/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
from prog.cpp:1:
/usr/include/c++/6/bits/stl_algo.h:3961:5: note: template<class _IIter, class _Tp> typename std::iterator_traits<_Iterator>::difference_type std::count(_IIter, _IIter, const _Tp&)
count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
^~~~~
prog.cpp:63:7: error: reference to ‘count’ is ambiguous
count[i]--;
^~~~~
prog.cpp:17:5: note: candidates are: int count [1005]
int count[maxn] = {0};
^~~~~
In file included from /usr/include/c++/6/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
from prog.cpp:1:
/usr/include/c++/6/bits/stl_algo.h:3961:5: note: template<class _IIter, class _Tp> typename std::iterator_traits<_Iterator>::difference_type std::count(_IIter, _IIter, const _Tp&)
count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
^~~~~