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_39536986_8247.cpp: In function 'void build(int)':
0_0_39536986_8247.cpp:10:26: error: no matching function for call to 'begin(std::pair<int, int>&)'
   10 |         for (auto i : e[x])
      |                          ^
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/algorithmfwd.h:39,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:59,
                 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++/initializer_list:88:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)'
   88 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/initializer_list:88:5: note:   template argument deduction/substitution failed:
0_0_39536986_8247.cpp:10:26: note:   'std::pair<int, int>' is not derived from 'std::initializer_list<_Tp>'
   10 |         for (auto i : e[x])
      |                          ^
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:53,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bitset:52,
                 from .\stdc++.h:52:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:52:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&)'
   52 |     begin(_Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:52:5: note:   template argument deduction/substitution failed:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h: In substitution of 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&) [with _Container = std::pair<int, int>]':
0_0_39536986_8247.cpp:10:19:   required from here
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:52:50: error: 'struct std::pair<int, int>' has no member named 'begin'
   52 |     begin(_Container& __cont) -> decltype(__cont.begin())
      |                                           ~~~~~~~^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:63:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&)'
   63 |     begin(const _Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:63:5: note:   template argument deduction/substitution failed:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h: In substitution of 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&) [with _Container = std::pair<int, int>]':
0_0_39536986_8247.cpp:10:19:   required from here
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:63:56: error: 'const struct std::pair<int, int>' has no member named 'begin'
   63 |     begin(const _Container& __cont) -> decltype(__cont.begin())
      |                                                 ~~~~~~~^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:95:5: note: candidate: 'template<class _Tp, long long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])'
   95 |     begin(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:95:5: note:   template argument deduction/substitution failed:
0_0_39536986_8247.cpp:10:26: note:   mismatched types '_Tp [_Nm]' and 'std::pair<int, int>'
   10 |         for (auto i : e[x])
      |                          ^
In file included from .\stdc++.h:166:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/valarray:1219:5: note: candidate: 'template<class _Tp> _Tp* std::begin(valarray<_Tp>&)'
 1219 |     begin(valarray<_Tp>& __va) noexcept
      |     ^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/valarray:1219:5: note:   template argument deduction/substitution failed:
0_0_39536986_8247.cpp:10:26: note:   'std::pair<int, int>' is not derived from 'std::valarray<_Tp>'
   10 |         for (auto i : e[x])
      |                          ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/valarray:1230:5: note: candidate: 'template<class _Tp> const _Tp* std::begin(const valarray<_Tp>&)'
 1230 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/valarray:1230:5: note:   template argument deduction/substitution failed:
0_0_39536986_8247.cpp:10:26: note:   'std::pair<int, int>' is not derived from 'const std::valarray<_Tp>'
   10 |         for (auto i : e[x])
      |                          ^
0_0_39536986_8247.cpp:10:26: error: no matching function for call to 'end(std::pair<int, int>&)'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/initializer_list:99:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
   99 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/initializer_list:99:5: note:   template argument deduction/substitution failed:
0_0_39536986_8247.cpp:10:26: note:   'std::pair<int, int>' is not derived from 'std::initializer_list<_Tp>'
   10 |         for (auto i : e[x])
      |                          ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:74:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:74:5: note:   template argument deduction/substitution failed:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h: In substitution of 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&) [with _Container = std::pair<int, int>]':
0_0_39536986_8247.cpp:10:19:   required from here
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:74:48: error: 'struct std::pair<int, int>' has no member named 'end'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |                                         ~~~~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:85:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:85:5: note:   template argument deduction/substitution failed:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h: In substitution of 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&) [with _Container = std::pair<int, int>]':
0_0_39536986_8247.cpp:10:19:   required from here
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:85:54: error: 'const struct std::pair<int, int>' has no member named 'end'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |                                               ~~~~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:106:5: note: candidate: 'template<class _Tp, long long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:106:5: note:   template argument deduction/substitution failed:
0_0_39536986_8247.cpp:10:26: note:   mismatched types '_Tp [_Nm]' and 'std::pair<int, int>'
   10 |         for (auto i : e[x])
      |                          ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/valarray:1241:5: note: candidate: 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1241 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/valarray:1241:5: note:   template argument deduction/substitution failed:
0_0_39536986_8247.cpp:10:26: note:   'std::pair<int, int>' is not derived from 'std::valarray<_Tp>'
   10 |         for (auto i : e[x])
      |                          ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/valarray:1257:5: note: candidate: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1257 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/valarray:1257:5: note:   template argument deduction/substitution failed:
0_0_39536986_8247.cpp:10:26: note:   'std::pair<int, int>' is not derived from 'const std::valarray<_Tp>'
   10 |         for (auto i : e[x])
      |                          ^
0_0_39536986_8247.cpp: In function 'void dfs(int, int)':
0_0_39536986_8247.cpp:25:26: error: no matching function for call to 'begin(std::pair<int, int>&)'
   25 |         for (auto i : e[x])
      |                          ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/initializer_list:88:5: note: candidate: 'template<clas


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-12-01 10:49:13, Gzip enabled