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_25985588_9567.cpp: In function 'int main()':
0_0_25985588_9567.cpp:18:35: error: no matching function for call to 'std::vector<long long int>::insert(ll&)'
             vec[fa[i]].insert(A[i]);
                                   ^
0_0_25985588_9567.cpp:18:35: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:69: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_25985588_9567.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/vector.tcc:107:5: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, const value_type&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = long long int*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const long long int*, std::vector<long long int> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const long long int*; std::vector<_Tp, _Alloc>::value_type = long long int]
     vector<_Tp, _Alloc>::
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/vector.tcc:107:5: note:   candidate expects 2 arguments, 1 provided
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_25985588_9567.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1014:7: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = long long int*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const long long int*, std::vector<long long int> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const long long int*; std::vector<_Tp, _Alloc>::value_type = long long int]
       insert(const_iterator __position, value_type&& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1014:7: note:   candidate expects 2 arguments, 1 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1031:7: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, std::initializer_list<_Tp>) [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = long long int*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const long long int*, std::vector<long long int> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const long long int*]
       insert(const_iterator __position, initializer_list<value_type> __l)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1031:7: note:   candidate expects 2 arguments, 1 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1051:7: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = long long int*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const long long int*, std::vector<long long int> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const long long int*; std::vector<_Tp, _Alloc>::size_type = long long unsigned int; std::vector<_Tp, _Alloc>::value_type = long long int]
       insert(const_iterator __position, size_type __n, const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1051:7: note:   candidate expects 3 arguments, 1 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1095:9: note: template<class _InputIterator, class> std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, _InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _Tp = long long int; _Alloc = std::allocator<long long int>]
         insert(const_iterator __position, _InputIterator __first,
         ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1095:9: note:   template argument deduction/substitution failed:
0_0_25985588_9567.cpp:18:34: note:   cannot convert 'A[i]' (type 'll {aka long long int}') to type 'std::vector<long long int>::const_iterator {aka __gnu_cxx::__normal_iterator<const long long int*, std::vector<long long int> >}'
             vec[fa[i]].insert(A[i]);
                                  ^
0_0_25985588_9567.cpp:23:31: error: no match for 'operator[]' (operand types are 'std::vector<long long int>' and '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >')
                 ansmax+=vec[i][vec[i].end()-1];
                               ^
0_0_25985588_9567.cpp:23:31: note: candidates are:
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_25985588_9567.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:779:7: note: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::reference = long long int&; std::vector<_Tp, _Alloc>::size_type = long long unsigned int]
       operator[](size_type __n) _GLIBCXX_NOEXCEPT
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:779:7: note:   no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >' to 'std::vector<long long int>::size_type {aka long long unsigned int}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:794:7: note: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::const_reference = const long long int&; std::vector<_Tp, _Alloc>::size_type = long long unsigned int]
       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:794:7: note:   no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >' to 'std::vector<long long int>::size_type {aka long long unsigned int}'
0_0_25985588_9567.cpp:24:31: error: no match for 'operator[]' (operand types are 'std::vector<long long int>' and 'std::vector<long long int>::iterator {aka __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >}')
                 ansmin+=vec[i][vec[i].begin()];
                               ^
0_0_25985588_9567.cpp:24:31: note: candidates are:
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_25985588_9567.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:779:7: note: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _A


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-06-26 18:35:50, Gzip enabled