Borderou de evaluare (job #2717729)

Utilizator TarceaIonutTarcea Tudor Ionut TarceaIonut Data 7 martie 2021 20:56:52
Problema Rover Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void read()': main.cpp:54:53: error: no match for 'operator=' (operand types are 'std::vector<std::vector<short int> >' and 'std::vector<std::vector<int> >') a = vector < vector <int> > (n, vector <int> (n)); ^ In file included from /usr/include/c++/6/vector:69:0, from /usr/include/c++/6/queue:61, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:86, from main.cpp:1: /usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = std::vector<short int>; _Alloc = std::allocator<std::vector<short int> >] vector<_Tp, _Alloc>:: ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/6/bits/vector.tcc:167:5: note: no known conversion for argument 1 from 'std::vector<std::vector<int> >' to 'const std::vector<std::vector<short int> >&' In file included from /usr/include/c++/6/vector:64:0, from /usr/include/c++/6/queue:61, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:86, from main.cpp:1: /usr/include/c++/6/bits/stl_vector.h:450:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = std::vector<short int>; _Alloc = std::allocator<std::vector<short int> >] operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:450:7: note: no known conversion for argument 1 from 'std::vector<std::vector<int> >' to 'std::vector<std::vector<short int> >&&' /usr/include/c++/6/bits/stl_vector.h:471:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = std::vector<short int>; _Alloc = std::allocator<std::vector<short int> >] operator=(initializer_list<value_type> __l) ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:471:7: note: no known conversion for argument 1 from 'std::vector<std::vector<int> >' to 'std::initializer_list<std::vector<short int> >' main.cpp:55:53: error: no match for 'operator=' (operand types are 'std::vector<std::vector<short int> >' and 'std::vector<std::vector<int> >') f = vector < vector <int> > (n, vector <int> (n)); ^ In file included from /usr/include/c++/6/vector:69:0, from /usr/include/c++/6/queue:61, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:86, from main.cpp:1: /usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = std::vector<short int>; _Alloc = std::allocator<std::vector<short int> >] vector<_Tp, _Alloc>:: ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/6/bits/vector.tcc:167:5: note: no known conversion for argument 1 from 'std::vector<std::vector<int> >' to 'const std::vector<std::vector<short int> >&' In file included from /usr/include/c++/6/vector:64:0, from /usr/include/c++/6/queue:61, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:86, from main.cpp:1: /usr/include/c++/6/bits/stl_vector.h:450:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = std::vector<short int>; _Alloc = std::allocator<std::vector<short int> >] operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:450:7: note: no known conversion for argument 1 from 'std::vector<std::vector<int> >' to 'std::vector<std::vector<short int> >&&' /usr/include/c++/6/bits/stl_vector.h:471:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = std::vector<short int>; _Alloc = std::allocator<std::vector<short int> >] operator=(initializer_list<value_type> __l) ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:471:7: note: no known conversion for argument 1 from 'std::vector<std::vector<int> >' to 'std::initializer_list<std::vector<short int> >' main.cpp: In function 'int p1()': main.cpp:96:72: warning: narrowing conversion of '(((int)p.coo::val) + 1)' from 'int' to 'short int' inside { } [-Wnarrowing] r.push_back({p.p1 + poz1[i], p.p2 + poz2[i], p.val + 1}); Non zero exit status: 1

Ceva nu functioneaza?