foo.cc: In function 'int main()':
foo.cc:16:9: error: no matching function for call to 'sort(int [10000])'
sort(a1);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from foo.cc:1:
/usr/include/c++/7/bits/stl_algo.h:4826:5: note: candidate: template<class _RAIter> void std::sort(_RAIter, _RAIter)
sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
^~~~
/usr/include/c++/7/bits/stl_algo.h:4826:5: note: template argument deduction/substitution failed:
foo.cc:16:9: note: candidate expects 2 arguments, 1 provided
sort(a1);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from foo.cc:1:
/usr/include/c++/7/bits/stl_algo.h:4856:5: note: candidate: template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)
sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
^~~~
/usr/include/c++/7/bits/stl_algo.h:4856:5: note: template argument deduction/substitution failed:
foo.cc:16:9: note: candidate expects 3 arguments, 1 provided
sort(a1);
^
foo.cc:17:9: error: no matching function for call to 'sort(int [10000])'
sort(a2);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from foo.cc:1:
/usr/include/c++/7/bits/stl_algo.h:4826:5: note: candidate: template<class _RAIter> void std::sort(_RAIter, _RAIter)
sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
^~~~
/usr/include/c++/7/bits/stl_algo.h:4826:5: note: template argument deduction/substitution failed:
foo.cc:17:9: note: candidate expects 2 arguments, 1 provided
sort(a2);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from foo.cc:1:
/usr/include/c++/7/bits/stl_algo.h:4856:5: note: candidate: template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)
sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
^~~~
/usr/include/c++/7/bits/stl_algo.h:4856:5: note: template argument deduction/substitution failed:
foo.cc:17:9: note: candidate expects 3 arguments, 1 provided
sort(a2);
^
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务