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_39270771_31042.cpp: In member function 'void MinCover::init(int, int)':
0_0_39270771_31042.cpp:42:15: error: no matching function for call to 'std::vector<int>::assign(int)'
   42 |     Rth.assign((row_size + 1) * (col_size));
      |     ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/vector:66,
                 from 0_0_39270771_31042.cpp:20:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:823:9: note: candidate: 'template<class _InputIterator, class> constexpr void std::vector<_Tp, _Alloc>::assign(_InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _Tp = int; _Alloc = std::allocator<int>]'
  823 |         assign(_InputIterator __first, _InputIterator __last)
      |         ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:823:9: note:   template argument deduction/substitution failed:
0_0_39270771_31042.cpp:42:15: note:   candidate expects 2 arguments, 1 provided
   42 |     Rth.assign((row_size + 1) * (col_size));
      |     ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:803:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::assign(size_type, const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; size_type = long long unsigned int; value_type = int]'
  803 |       assign(size_type __n, const value_type& __val)
      |       ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:803:7: note:   candidate expects 2 arguments, 1 provided
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:850:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::assign(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
  850 |       assign(initializer_list<value_type> __l)
      |       ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:850:43: note:   no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
  850 |       assign(initializer_list<value_type> __l)
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
0_0_39270771_31042.cpp:43:15: error: no matching function for call to 'std::vector<int>::assign(int)'
   43 |     Cth.assign((row_size + 1) * (col_size));
      |     ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:823:9: note: candidate: 'template<class _InputIterator, class> constexpr void std::vector<_Tp, _Alloc>::assign(_InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _Tp = int; _Alloc = std::allocator<int>]'
  823 |         assign(_InputIterator __first, _InputIterator __last)
      |         ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:823:9: note:   template argument deduction/substitution failed:
0_0_39270771_31042.cpp:43:15: note:   candidate expects 2 arguments, 1 provided
   43 |     Cth.assign((row_size + 1) * (col_size));
      |     ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:803:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::assign(size_type, const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; size_type = long long unsigned int; value_type = int]'
  803 |       assign(size_type __n, const value_type& __val)
      |       ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:803:7: note:   candidate expects 2 arguments, 1 provided
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:850:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::assign(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
  850 |       assign(initializer_list<value_type> __l)
      |       ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:850:43: note:   no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
  850 |       assign(initializer_list<value_type> __l)
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~


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-22 16:43:15, Gzip enabled