Submission #1356649

#TimeUsernameProblemLanguageResultExecution timeMemory
1356649vjudge1A Huge Tower (CEOI10_tower)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

#define int long long

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    
    int n, d;
    cin >> n >> d;

    int arr[n];
    for (auto& p : arr) cin >> p;

    sort()

    vector<int> ap[n + 1];
    for (int i = 0; i < n; i++) {

    }

    return 0;
}

/*


*/

Compilation message (stderr)

tower.cpp: In function 'int main()':
tower.cpp:17:9: error: no matching function for call to 'sort()'
   17 |     sort()
      |     ~~~~^~
In file included from /usr/include/c++/13/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
                 from tower.cpp:1:
/usr/include/c++/13/bits/stl_algo.h:4851:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4851 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/13/bits/stl_algo.h:4851:5: note:   template argument deduction/substitution failed:
tower.cpp:17:9: note:   candidate expects 2 arguments, 0 provided
   17 |     sort()
      |     ~~~~^~
/usr/include/c++/13/bits/stl_algo.h:4882:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4882 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/13/bits/stl_algo.h:4882:5: note:   template argument deduction/substitution failed:
tower.cpp:17:9: note:   candidate expects 3 arguments, 0 provided
   17 |     sort()
      |     ~~~~^~
In file included from /usr/include/c++/13/algorithm:73:
/usr/include/c++/13/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/13/pstl/glue_algorithm_defs.h:292:1: note:   template argument deduction/substitution failed:
tower.cpp:17:9: note:   candidate expects 4 arguments, 0 provided
   17 |     sort()
      |     ~~~~^~
/usr/include/c++/13/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/13/pstl/glue_algorithm_defs.h:296:1: note:   template argument deduction/substitution failed:
tower.cpp:17:9: note:   candidate expects 3 arguments, 0 provided
   17 |     sort()
      |     ~~~~^~