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_37076407_18359.cpp: In function 'void solve()':
0_0_37076407_18359.cpp:95:24: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}' and 'int')
     id[2 * 1 + 1][inf] = ++tot; // 1
                        ^
0_0_37076407_18359.cpp:95:24: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
                 from 0_0_37076407_18359.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:158:7: note: std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_T1, _T2>&) [with _T1 = int; _T2 = int]
       operator=(const pair& __p)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:158:7: note:   no known conversion for argument 1 from 'int' to 'const std::pair<int, int>&'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:166:7: note: std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_T1, _T2>&&) [with _T1 = int; _T2 = int]
       operator=(pair&& __p)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:166:7: note:   no known conversion for argument 1 from 'int' to 'std::pair<int, int>&&'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:177:2: note: template<class _U1, class _U2> std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; _T1 = int; _T2 = int]
  operator=(const pair<_U1, _U2>& __p)
  ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:177:2: note:   template argument deduction/substitution failed:
0_0_37076407_18359.cpp:95:24: note:   mismatched types 'const std::pair<_T1, _T2>' and 'int'
     id[2 * 1 + 1][inf] = ++tot; // 1
                        ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
                 from 0_0_37076407_18359.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:186:2: note: template<class _U1, class _U2> std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; _T1 = int; _T2 = int]
  operator=(pair<_U1, _U2>&& __p)
  ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:186:2: note:   template argument deduction/substitution failed:
0_0_37076407_18359.cpp:95:24: note:   mismatched types 'std::pair<_T1, _T2>' and 'int'
     id[2 * 1 + 1][inf] = ++tot; // 1
                        ^
0_0_37076407_18359.cpp:110:40: error: no matching function for call to 'std::vector<std::pair<int, int> >::emplace(int&, int)'
         if(id[2 * u].emplace(a, tot + 1).second)
                                        ^
0_0_37076407_18359.cpp:110:40: note: candidate is:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/random.h:34,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:49,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
                 from 0_0_37076407_18359.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:970:9: note: template<class ... _Args> std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::emplace(std::vector<_Tp, _Alloc>::const_iterator, _Args&& ...) [with _Args = {_Args ...}; _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >]
         emplace(const_iterator __position, _Args&&... __args);
         ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:970:9: note:   template argument deduction/substitution failed:
0_0_37076407_18359.cpp:110:40: note:   cannot convert 'a' (type 'int') to type 'std::vector<std::pair<int, int> >::const_iterator {aka __gnu_cxx::__normal_iterator<const std::pair<int, int>*, std::vector<std::pair<int, int> > >}'
         if(id[2 * u].emplace(a, tot + 1).second)
                                        ^
0_0_37076407_18359.cpp:112:44: error: no matching function for call to 'std::vector<std::pair<int, int> >::emplace(int&, int)'
         if(id[2 * u + 1].emplace(a, tot + 1).second)
                                            ^
0_0_37076407_18359.cpp:112:44: note: candidate is:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/random.h:34,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:49,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
                 from 0_0_37076407_18359.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:970:9: note: template<class ... _Args> std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::emplace(std::vector<_Tp, _Alloc>::const_iterator, _Args&& ...) [with _Args = {_Args ...}; _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >]
         emplace(const_iterator __position, _Args&&... __args);
         ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:970:9: note:   template argument deduction/substitution failed:
0_0_37076407_18359.cpp:112:44: note:   cannot convert 'a' (type 'int') to type 'std::vector<std::pair<int, int> >::const_iterator {aka __gnu_cxx::__normal_iterator<const std::pair<int, int>*, std::vector<std::pair<int, int> > >}'
         if(id[2 * u + 1].emplace(a, tot + 1).second)
                                            ^
0_0_37076407_18359.cpp:118:28: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}' to 'int' in initialization
         int x = id[2 * u][a], y = find_up(id[2 * v], a + 1);
                            ^
0_0_37076407_18359.cpp:118:51: error: invalid initialization of reference of type 'std::map<int, int>&' from expression of type 'std::vector<std::pair<int, int> >'
         int x = id[2 * u][a], y = find_up(id[2 * v], a + 1);
                                                   ^
0_0_37076407_18359.cpp:76:5: note: in passing argument 1 of 'int find_up(std::map<int, int>&, int)'
 int find_up(map<int, int>& mp, int x) {
     ^
0_0_37076407_18359.cpp:119:33: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}' to 'int' in initialization
         int xx = id[2 * u + 1][a], yy = find_down(id[2 * v + 1], a);
                                 ^
0_0_37076407_18359.cpp:119:63: error: invalid initialization of reference of type 'std::map<int, int>&' from expression of type 'std::vector<std::pair<int, int> >'
         int xx = id[2 * u + 1][a], yy = find_down(id[2 * v + 1], a);
                                                               ^
0_0_37076407_18359.cpp:81:5: note: in passing argument 1 of 'int find_down(std::map<int, int>&, int)'
 int find_down(map<int, int>& mp, int x) {
     ^


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-23 03:53:48, Gzip enabled