F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39075223_25230.cpp: In function 'void solve()':
0_0_39075223_25230.cpp:12:5: error: expected ',' or ';' before 'function'
   12 |     function<void(int,int)> merge = [&](int a,int b) {
      |     ^~~~~~~~
0_0_39075223_25230.cpp:21:14: error: no matching function for call to 'merge(int&, int&)'
   21 |         merge(a,b);
      |         ~~~~~^~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:61,
                 from .\stdc++.h:51:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:4946:5: note: candidate: 'template<class _IIter1, class _IIter2, class _OIter> constexpr _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter)'
 4946 |     merge(_InputIterator1 __first1, _InputIterator1 __last1,
      |     ^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:4946:5: note:   template argument deduction/substitution failed:
0_0_39075223_25230.cpp:21:14: note:   candidate expects 5 arguments, 2 provided
   21 |         merge(a,b);
      |         ~~~~~^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:4997:5: note: candidate: 'template<class _IIter1, class _IIter2, class _OIter, class _Compare> constexpr _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare)'
 4997 |     merge(_InputIterator1 __first1, _InputIterator1 __last1,
      |     ^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:4997:5: note:   template argument deduction/substitution failed:
0_0_39075223_25230.cpp:21:14: note:   candidate expects 6 arguments, 2 provided
   21 |         merge(a,b);
      |         ~~~~~^~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:73:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/pstl/glue_algorithm_defs.h:412:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::merge(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _ForwardIterator, _Compare)'
  412 | merge(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
      | ^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/pstl/glue_algorithm_defs.h:412:1: note:   template argument deduction/substitution failed:
0_0_39075223_25230.cpp:21:14: note:   candidate expects 7 arguments, 2 provided
   21 |         merge(a,b);
      |         ~~~~~^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/pstl/glue_algorithm_defs.h:417:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::merge(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _ForwardIterator)'
  417 | merge(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
      | ^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/pstl/glue_algorithm_defs.h:417:1: note:   template argument deduction/substitution failed:
0_0_39075223_25230.cpp:21:14: note:   candidate expects 6 arguments, 2 provided
   21 |         merge(a,b);
      |         ~~~~~^~~~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 14:40:15, Gzip enabled