QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#263894 | #7753. Energy Distribution | ucup-team2670 | Compile Error | / | / | C++17 | 2.1kb | 2023-11-25 09:55:21 | 2023-11-25 09:55:21 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code: In function ‘int main()’: answer.code:73:16: error: no match for ‘operator=’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::vector<double> >, std::vector<double> >::value_type’ {aka ‘std::vector<double>’} and ‘double’) 73 | b[n] = 0.0; | ^~~ In file included from /usr/include/c++/11/vector:72, from answer.code:2: /usr/include/c++/11/bits/vector.tcc:198:5: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = double; _Alloc = std::allocator<double>]’ 198 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/bits/vector.tcc:199:42: note: no known conversion for argument 1 from ‘double’ to ‘const std::vector<double>&’ 199 | operator=(const vector<_Tp, _Alloc>& __x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from /usr/include/c++/11/vector:67, from answer.code:2: /usr/include/c++/11/bits/stl_vector.h:709:7: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = double; _Alloc = std::allocator<double>]’ 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ^~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:709:26: note: no known conversion for argument 1 from ‘double’ to ‘std::vector<double>&&’ 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ~~~~~~~~~^~~ /usr/include/c++/11/bits/stl_vector.h:730:7: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = double; _Alloc = std::allocator<double>]’ 730 | operator=(initializer_list<value_type> __l) | ^~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:730:46: note: no known conversion for argument 1 from ‘double’ to ‘std::initializer_list<double>’ 730 | operator=(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~