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_27356854_6292.cpp: In constructor 'Trie::Trie(int, int)':
0_0_27356854_6292.cpp:53:35: error: no matching function for call to 'std::vector<std::map<char, int> >::assign(int&, std::map<int, int>)'
   ch.assign(maxnode,map<int,int>());
                                   ^
0_0_27356854_6292.cpp:53:35: 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_27356854_6292.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:488:7: note: void std::vector<_Tp, _Alloc>::assign(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = std::map<char, int>; _Alloc = std::allocator<std::map<char, int> >; std::vector<_Tp, _Alloc>::size_type = long long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::map<char, int>]
       assign(size_type __n, const value_type& __val)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:488:7: note:   no known conversion for argument 2 from 'std::map<int, int>' to 'const value_type& {aka const std::map<char, int>&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:507:9: note: template<class _InputIterator, class> void std::vector<_Tp, _Alloc>::assign(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _Tp = std::map<char, int>; _Alloc = std::allocator<std::map<char, int> >]
         assign(_InputIterator __first, _InputIterator __last)
         ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:507:9: note:   template argument deduction/substitution failed:
0_0_27356854_6292.cpp:53:35: note:   deduced conflicting types for parameter '_InputIterator' ('int' and 'std::map<int, int>')
   ch.assign(maxnode,map<int,int>());
                                   ^
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_27356854_6292.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:533:7: note: void std::vector<_Tp, _Alloc>::assign(std::initializer_list<_Tp>) [with _Tp = std::map<char, int>; _Alloc = std::allocator<std::map<char, int> >]
       assign(initializer_list<value_type> __l)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:533:7: note:   candidate expects 1 argument, 2 provided


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-07-03 17:57:03, Gzip enabled