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_39281407_8171.cpp: In function 'int find(int, int)':
0_0_39281407_8171.cpp:11:27: error: no matching function for call to 'find(int&)'
   11 |                 fa[x]=find(fx);
      |                       ~~~~^~~~
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:3889:5: note: candidate: 'template<class _IIter, class _Tp> constexpr _IIter std::find(_IIter, _IIter, const _Tp&)'
 3889 |     find(_InputIterator __first, _InputIterator __last,
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:3889:5: note:   template argument deduction/substitution failed:
0_0_39281407_8171.cpp:11:27: note:   candidate expects 3 arguments, 1 provided
   11 |                 fa[x]=find(fx);
      |                       ~~~~^~~~
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:60:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
   60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/pstl/glue_algorithm_defs.h:60:1: note:   template argument deduction/substitution failed:
0_0_39281407_8171.cpp:11:27: note:   candidate expects 4 arguments, 1 provided
   11 |                 fa[x]=find(fx);
      |                       ~~~~^~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iterator:66,
                 from .\stdc++.h:54:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> > >::__type std::find(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
0_0_39281407_8171.cpp:11:27: note:   mismatched types 'std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >' and 'int'
   11 |                 fa[x]=find(fx);
      |                       ~~~~^~~~
0_0_39281407_8171.cpp:6:5: note: candidate: 'int find(int, int)'
    6 | int find(int x,int y)
      |     ^~~~
0_0_39281407_8171.cpp:6:5: note:   candidate expects 2 arguments, 1 provided
0_0_39281407_8171.cpp: In function 'void merge(int, int)':
0_0_39281407_8171.cpp:27:19: error: no matching function for call to 'find(int&)'
   27 |         int a=find(i),b=find(j);
      |               ~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:3889:5: note: candidate: 'template<class _IIter, class _Tp> constexpr _IIter std::find(_IIter, _IIter, const _Tp&)'
 3889 |     find(_InputIterator __first, _InputIterator __last,
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:3889:5: note:   template argument deduction/substitution failed:
0_0_39281407_8171.cpp:27:19: note:   candidate expects 3 arguments, 1 provided
   27 |         int a=find(i),b=find(j);
      |               ~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/pstl/glue_algorithm_defs.h:60:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
   60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/pstl/glue_algorithm_defs.h:60:1: note:   template argument deduction/substitution failed:
0_0_39281407_8171.cpp:27:19: note:   candidate expects 4 arguments, 1 provided
   27 |         int a=find(i),b=find(j);
      |               ~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> > >::__type std::find(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
0_0_39281407_8171.cpp:27:19: note:   mismatched types 'std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >' and 'int'
   27 |         int a=find(i),b=find(j);
      |               ~~~~^~~
0_0_39281407_8171.cpp:6:5: note: candidate: 'int find(int, int)'
    6 | int find(int x,int y)
      |     ^~~~
0_0_39281407_8171.cpp:6:5: note:   candidate expects 2 arguments, 1 provided
0_0_39281407_8171.cpp:28:15: error: 'b' was not declared in this scope
   28 |         if(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-09-20 08:50:56, Gzip enabled