/ /

记录详情

Compile Error

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)提供评测服务

信息

递交者
类型
递交
题目
P1089 A10-2 有序子序列的合并
语言
C++
递交时间
2021-07-12 11:30:32
评测时间
2021-07-12 11:30:32
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes