Borderou de evaluare (job #2313578)

Utilizator BlaugranasEnal Gemaledin Blaugranas Data 7 ianuarie 2019 09:57:40
Problema Algoritmul lui Dijkstra Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:15:11: error: request for member 'push_back' in 'h', which is of non-class type 'std::vector<int> [50001]' for(h.push_back(1);k;) ^~~~~~~~~ main.cpp:17:14: error: cannot convert 'std::vector<int>' to 'int' in assignment i=h[1],swap(h[1],h[k--]),p[h[1]]=1,push_heap(h.begin(),h.end()),push_heap(p.begin(),p.end()); ^ main.cpp:17:35: error: no match for 'operator[]' (operand types are 'int [50001]' and 'std::vector<int>') i=h[1],swap(h[1],h[k--]),p[h[1]]=1,push_heap(h.begin(),h.end()),push_heap(p.begin(),p.end()); ^ main.cpp:17:56: error: request for member 'begin' in 'h', which is of non-class type 'std::vector<int> [50001]' i=h[1],swap(h[1],h[k--]),p[h[1]]=1,push_heap(h.begin(),h.end()),push_heap(p.begin(),p.end()); ^~~~~ main.cpp:17:66: error: request for member 'end' in 'h', which is of non-class type 'std::vector<int> [50001]' i=h[1],swap(h[1],h[k--]),p[h[1]]=1,push_heap(h.begin(),h.end()),push_heap(p.begin(),p.end()); ^~~ main.cpp:17:85: error: request for member 'begin' in 'p', which is of non-class type 'int [50001]' i=h[1],swap(h[1],h[k--]),p[h[1]]=1,push_heap(h.begin(),h.end()),push_heap(p.begin(),p.end()); ^~~~~ main.cpp:17:95: error: request for member 'end' in 'p', which is of non-class type 'int [50001]' i=h[1],swap(h[1],h[k--]),p[h[1]]=1,push_heap(h.begin(),h.end()),push_heap(p.begin(),p.end()); ^~~ main.cpp:23:33: error: request for member 'begin' in 'p', which is of non-class type 'int [50001]' push_heap(p.begin(),p.end()); ^~~~~ main.cpp:23:43: error: request for member 'end' in 'p', which is of non-class type 'int [50001]' push_heap(p.begin(),p.end()); ^~~ main.cpp:25:34: error: no match for 'operator=' (operand types are 'std::vector<int>' and '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}') h[++k]=a[i][j],p[h[k]]=k,push_heap(h.begin(),h.end()),push_heap(p.begin(),p.end()); ^ In file included from /usr/include/c++/6/vector:69:0, from main.cpp:3: /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 = int; _Alloc = std::allocator<int>] vector<_Tp, _Alloc>:: ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/6/bits/vector.tcc:167:5: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}' to 'const std::vector<int>&' In file included from /usr/include/c++/6/vector:64:0, from main.cpp:3: /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 = int; _Alloc = std::allocator<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 '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}' to 'std::vector<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 = int; _Alloc = std::allocator<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 '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}' to 'std::initializer_list<int>' main.cpp:25:37: error: no match for 'operator[]' (operand types are 'int [50001]' and 'std::vector<int>') h[++k]=a[i][j],p[h[k]]=k,push_heap(h.begin(),h.end()),push_heap(p.begin(),p.end()); ^ Non zero exit status: 1

Ceva nu functioneaza?