In file included from minerals.cpp:24:
grader.cpp: In function 'int Query(int)':
grader.cpp:39:7: error: reference to 'count' is ambiguous
39 | --count[type];
| ^~~~~
grader.cpp:22:5: note: candidates are: 'int {anonymous}::count [86011]'
22 | int count[2 * MAX_N + 1];
| ^~~~~
In file included from /usr/include/c++/10/algorithm:74,
from minerals.cpp:5:
/usr/include/c++/10/pstl/glue_algorithm_defs.h:101:1: note: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~~
In file included from /usr/include/c++/10/algorithm:62,
from minerals.cpp:5:
/usr/include/c++/10/bits/stl_algo.h:4077:5: note: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
4077 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
| ^~~~~
In file included from minerals.cpp:24:
grader.cpp:40:9: error: reference to 'count' is ambiguous
40 | if (count[type] == 0) {
| ^~~~~
grader.cpp:22:5: note: candidates are: 'int {anonymous}::count [86011]'
22 | int count[2 * MAX_N + 1];
| ^~~~~
In file included from /usr/include/c++/10/algorithm:74,
from minerals.cpp:5:
/usr/include/c++/10/pstl/glue_algorithm_defs.h:101:1: note: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~~
In file included from /usr/include/c++/10/algorithm:62,
from minerals.cpp:5:
/usr/include/c++/10/bits/stl_algo.h:4077:5: note: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
4077 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
| ^~~~~
In file included from minerals.cpp:24:
grader.cpp:45:7: error: reference to 'count' is ambiguous
45 | ++count[type];
| ^~~~~
grader.cpp:22:5: note: candidates are: 'int {anonymous}::count [86011]'
22 | int count[2 * MAX_N + 1];
| ^~~~~
In file included from /usr/include/c++/10/algorithm:74,
from minerals.cpp:5:
/usr/include/c++/10/pstl/glue_algorithm_defs.h:101:1: note: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~~
In file included from /usr/include/c++/10/algorithm:62,
from minerals.cpp:5:
/usr/include/c++/10/bits/stl_algo.h:4077:5: note: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
4077 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
| ^~~~~
In file included from minerals.cpp:24:
grader.cpp:46:9: error: reference to 'count' is ambiguous
46 | if (count[type] == 1) {
| ^~~~~
grader.cpp:22:5: note: candidates are: 'int {anonymous}::count [86011]'
22 | int count[2 * MAX_N + 1];
| ^~~~~
In file included from /usr/include/c++/10/algorithm:74,
from minerals.cpp:5:
/usr/include/c++/10/pstl/glue_algorithm_defs.h:101:1: note: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~~
In file included from /usr/include/c++/10/algorithm:62,
from minerals.cpp:5:
/usr/include/c++/10/bits/stl_algo.h:4077:5: note: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
4077 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
| ^~~~~
minerals.cpp: At global scope:
minerals.cpp:25:5: error: redefinition of 'int Query(int)'
25 | int Query(int x) {
| ^~~~~
In file included from minerals.cpp:24:
grader.cpp:29:5: note: 'int Query(int)' previously defined here
29 | int Query(int x) {
| ^~~~~
minerals.cpp: In function 'int Query(int)':
minerals.cpp:26:12: error: 'query' was not declared in this scope; did you mean 'Query'?
26 | return query(x);
| ^~~~~
| Query
minerals.cpp: At global scope:
minerals.cpp:28:6: error: redefinition of 'void Answer(int, int)'
28 | void Answer(int a, int b) {
| ^~~~~~
In file included from minerals.cpp:24:
grader.cpp:53:6: note: 'void Answer(int, int)' previously defined here
53 | void Answer(int a, int b) {
| ^~~~~~
minerals.cpp: In function 'void Answer(int, int)':
minerals.cpp:29:23: error: '{anonymous}::answer' cannot be used as a function
29 | return answer(a, b);
| ^
minerals.cpp: In function 'void calc(std::vector<int>, std::vector<int>, int)':
minerals.cpp:51:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
51 | for(int i=k+1;i<a.size();i++)
| ~^~~~~~~~~
minerals.cpp:53:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
53 | for(int i=0;i<b.size();i++){
| ~^~~~~~~~~
In file included from minerals.cpp:24:
grader.cpp: At global scope:
grader.cpp:22:5: warning: '{anonymous}::count' defined but not used [-Wunused-variable]
22 | int count[2 * MAX_N + 1];
| ^~~~~